* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: 100vh;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.modal-open { overflow: hidden; }

.container {
    width: 100%;
    max-width: 448px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 40px 36px;
    transition: box-shadow 0.3s ease;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
}

.container:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); }

.form-group { margin-bottom: 40px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 20px;
}

.amount-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.currency {
    font-size: 24px;
    font-weight: 500;
    color: #666666;
    margin-right: 4px;
}

.amount {
    font-size: 48px;
    font-weight: 700;
    color: #dc3545;
    line-height: 1;
}

.denomination-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.denomination-btn {
    padding: 16px;
    border: 2px solid #d0d0d0;
    border-radius: 12px;
    background: white;
    font-size: 16px;
    font-weight: 600;
    color: #555555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.denomination-btn:hover {
    border-color: #dc3545;
    background: #fff5f5;
    color: #dc3545;
    transform: translateY(-1px);
}

.denomination-btn:active { transform: translateY(0); }

.control-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.control-btn {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    background: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn.custom {
    color: #666666;
    border-color: #999999;
}

.control-btn.clear {
    color: #dc3545;
    border-color: #dc3545;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.control-btn.custom:hover {
    background: #f8f8f8;
    border-color: #666666;
}

.control-btn.clear:hover {
    background: #fff5f5;
    border-color: #c82333;
}

.custom-input-inline {
    display: none;
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #999999;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    background: #f8f8f8;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.payment-method {
    padding: 20px 16px;
    border: 2px solid #d0d0d0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.payment-method:hover {
    border-color: #dc3545;
    background: #fff5f5;
    transform: translateY(-1px);
}

.payment-method.active {
    border-color: #dc3545;
    background: #fff5f5;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.payment-method.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.payment-method.disabled:hover {
    border-color: #d0d0d0;
    background: #f5f5f5;
    transform: none;
}

.payment-name {
    font-size: 16px;
    font-weight: 600;
    color: #555555;
}

.payment-method.active .payment-name { color: #dc3545; }

.pay-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}

.pay-button:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.4);
}

.pay-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}

.pay-button:disabled {
    background: #999999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.error-message, .success-message {
    display: none;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.error-message {
    background: #fff5f5;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #f8f9fa;
    color: #666666;
    border: 1px solid #d0d0d0;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid #e0e0e0;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #666666;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
    text-align: center;
}

.modal-subtitle {
    font-size: 14px;
    color: #999999;
    margin-bottom: 24px;
    text-align: center;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.qr-image {
    width: 200px;
    height: 200px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #999999;
    font-size: 14px;
}

.status-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 入场提示样式 */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: welcomeSlideIn 0.4s ease-out;
}

.welcome-modal {
    background: white;
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.welcome-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.welcome-link-tip {
    margin-bottom: 16px;
    text-align: center;
}

.add-friend-link {
    color: #dc3545;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
    padding: 6px 12px;
    border: 1px solid #dc3545;
    border-radius: 4px;
    background: white;
    transition: all 0.2s ease;
    display: inline-block;
}

.add-friend-link:hover {
    color: white;
    background: #dc3545;
}

.welcome-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.5;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.welcome-countdown {
    font-size: 14px;
    color: #999;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 20px;
}

.welcome-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
    min-width: 120px;
}

.welcome-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.4);
}

@keyframes welcomeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes welcomeSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container { padding: 24px 20px; }
    .denomination-grid { gap: 8px; }
    .payment-methods { grid-template-columns: 1fr; gap: 8px; }
    .control-buttons { flex-direction: column; }
    .amount { font-size: 36px; }
    .currency { font-size: 20px; }
    .qr-modal { padding: 24px; }
    .pay-button { font-size: 16px; min-height: 52px; }
}