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

.recharge-page {
    min-height: 100vh;
    background: linear-gradient(to bottom, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #e5e7eb;
}

.recharge-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-back {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-back:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: translateX(-2px);
}

.header-back svg {
    width: 20px;
    height: 20px;
    color: #3b82f6;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: #f9fafb;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: -0.5px;
}

.header-history {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-history:hover {
    background: rgba(59, 130, 246, 0.25);
}

.header-history svg {
    width: 20px;
    height: 20px;
    color: #3b82f6;
}

.recharge-main {
    padding: 24px 20px 100px;
    max-width: 900px;
    margin: 0 auto;
}

.balance-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    border-radius: 24px;
    padding: 32px 28px;
    margin-bottom: 32px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.3);
    position: relative;
    overflow: hidden;
}

.balance-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.balance-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.balance-icon svg {
    width: 32px;
    height: 32px;
    color: #ffffff;
}

.balance-info {
    flex: 1;
}

.balance-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -2px;
    font-family: 'Outfit', sans-serif;
}

.amounts-section {
    margin-bottom: 28px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #f9fafb;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

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

.amount-card {
    position: relative;
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 28px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    min-width: 0;
    overflow: hidden;
}

.amount-card:hover {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.amount-card.selected {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
    transform: translateY(-4px) scale(1.02);
}

.amount-card.selected .amount-value {
    color: #ffffff;
}

.amount-card.selected .amount-check {
    opacity: 1;
    transform: scale(1);
}

.amount-value {
    font-size: 28px;
    font-weight: 800;
    color: #e5e7eb;
    letter-spacing: -1px;
    font-family: 'Outfit', sans-serif;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.amount-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.amount-check svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.guidelines-section {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 18px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
}

.guidelines-toggle {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease;
}

.guidelines-toggle:hover {
    background: rgba(59, 130, 246, 0.08);
}

.toggle-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toggle-left svg {
    width: 24px;
    height: 24px;
    color: #3b82f6;
}

.toggle-left span {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.toggle-chevron {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.guidelines-section.expanded .toggle-chevron {
    transform: rotate(180deg);
}

.guidelines-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.guidelines-section.expanded .guidelines-content {
    max-height: 800px;
}

.guideline-card {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
}

.guideline-num {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.guideline-body {
    flex: 1;
    padding-top: 4px;
}

.guideline-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #f9fafb;
    margin-bottom: 6px;
}

.guideline-body p {
    font-size: 14px;
    line-height: 1.7;
    color: #9ca3af;
}

.recharge-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    padding: 20px;
    z-index: 900;
}

.submit-btn {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

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

.submit-btn svg {
    width: 20px;
    height: 20px;
}

.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    background: rgba(17, 24, 39, 0.95);
    color: #e5e7eb;
    padding: 16px 28px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 15px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: rgba(16, 185, 129, 0.95);
    border-color: #10b981;
    color: #ffffff;
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
    border-color: #ef4444;
    color: #ffffff;
}

.toast.warning {
    background: rgba(245, 158, 11, 0.95);
    border-color: #f59e0b;
    color: #ffffff;
}

.toast.info {
    background: rgba(59, 130, 246, 0.95);
    border-color: #3b82f6;
    color: #ffffff;
}

.loading {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 39, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .amount-card {
        padding: 24px 16px;
        min-height: 100px;
    }

    .amount-value {
        font-size: 24px;
    }

    .balance-hero {
        padding: 28px 24px;
    }

    .balance-amount {
        font-size: 36px;
    }

    .balance-icon {
        width: 56px;
        height: 56px;
    }

    .balance-icon svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .recharge-header {
        padding: 14px 16px;
    }

    .header-title {
        font-size: 18px;
    }

    .header-back,
    .header-history {
        width: 38px;
        height: 38px;
    }

    .recharge-main {
        padding: 20px 16px 100px;
    }

    .balance-hero {
        padding: 24px 20px;
        margin-bottom: 24px;
    }

    .balance-amount {
        font-size: 32px;
    }

    .balance-icon {
        width: 52px;
        height: 52px;
    }

    .balance-icon svg {
        width: 26px;
        height: 26px;
    }

    .section-title {
        font-size: 18px;
    }

    .amounts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .amount-card {
        padding: 16px 8px;
        min-height: 82px;
        border-radius: 14px;
    }

    .amount-value {
        font-size: clamp(16px, 4.9vw, 20px);
    }

    .guidelines-toggle {
        padding: 18px 20px;
    }

    .guideline-card {
        padding: 18px 20px;
        gap: 16px;
    }

    .guideline-num {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .guideline-body h3 {
        font-size: 15px;
    }

    .guideline-body p {
        font-size: 13px;
    }

    .submit-btn {
        padding: 16px 32px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .recharge-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .amounts-grid {
        gap: 7px;
    }

    .amount-card {
        padding: 14px 6px;
        min-height: 76px;
    }

    .amount-value {
        font-size: clamp(15px, 4.7vw, 17px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
