/* 筑梦方舟充值中心 - 现代毛玻璃设计 */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-light: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.bg-circle-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    top: -150px;
    right: -100px;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    bottom: 5%;
    left: -100px;
}

.bg-circle-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    top: 35%;
    right: 5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.navbar-glass {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.navbar-brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: all 0.2s ease;
}

.navbar-brand:hover {
    color: var(--primary-dark);
}

.navbar-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-name {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
}

.balance-display {
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius);
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
}

.logout-btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}

.main-content {
    position: relative;
    z-index: 1;
    padding: 32px 0;
}

.center-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 720px;
    margin: 0 auto;
}

.recharge-card .amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-method:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.8);
}

.payment-method.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.payment-method.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(200, 200, 200, 0.2);
}

.payment-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.payment-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.card-header {
    padding: 28px 28px 24px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.4);
}

.card-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.card-body {
    padding: 28px;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.amount-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.amount-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.amount-card.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.amount-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.amount-card.selected .amount-value {
    color: var(--primary);
}

.amount-coins {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.custom-amount-form {
    margin-top: 8px;
}

.input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.input-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 16px 20px;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-suffix {
    padding: 0 20px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
}

.btn-primary {
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.amount-preview {
    margin-top: 14px;
    padding: 14px 18px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: var(--radius);
    color: var(--success);
    font-weight: 500;
    text-align: center;
    display: none;
}

.amount-preview.show {
    display: block;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state span {
    font-size: 14px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

.modal-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 24px;
}

.modal-content {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.modal-body {
    padding: 28px;
}

.payment-summary {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 18px;
    letter-spacing: -0.3px;
}

.summary-value.coins {
    color: var(--success);
}

.modal-footer {
    padding: 24px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
}

.btn-secondary {
    flex: 1;
    padding: 14px 24px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-white);
    border-color: var(--text-muted);
}

.modal-footer .btn-primary {
    flex: 2;
    justify-content: center;
    border-radius: var(--radius);
}

@media (max-width: 768px) {
    .recharge-card .amount-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .navbar-info {
        gap: 16px;
    }
    
    .user-name {
        display: none;
    }
    
    .card-header,
    .card-body {
        padding: 24px;
    }
    
    .amount-card {
        padding: 18px 14px;
    }
    
    .amount-value {
        font-size: 22px;
    }
    
    .input-group {
        flex-wrap: wrap;
    }
    
    .btn-primary {
        width: 100%;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .main-content {
        padding: 24px 0;
    }
    
    .navbar-content {
        padding: 16px 0;
    }
    
    .navbar-brand {
        font-size: 20px;
    }
    
    .balance-display {
        font-size: 14px;
        padding: 6px 12px;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeIn 0.4s ease;
}

.glass-card:nth-child(1) {
    animation-delay: 0.05s;
}

.glass-card:nth-child(2) {
    animation-delay: 0.1s;
}

.amount-card {
    animation: fadeIn 0.3s ease;
}

.amount-card:nth-child(1) { animation-delay: 0.05s; }
.amount-card:nth-child(2) { animation-delay: 0.1s; }
.amount-card:nth-child(3) { animation-delay: 0.15s; }
.amount-card:nth-child(4) { animation-delay: 0.2s; }

.payment-method {
    animation: fadeIn 0.3s ease;
}