:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-dark: #4338ca;
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --success-text: #047857;
    --error-color: #ef4444;
    --error-bg: #fee2e2;
    --error-text: #dc2626;
    --warning-color: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-text: #d97706;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --bg-light: #f3f4f6;
    --bg-white: #ffffff;
    --border-color: #d1d5db;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-gradient-start: #1e293b;
    --bg-gradient-end: #0f172a;
    --bg-light: #1f2937;
    --bg-white: #111827;
    --border-color: #374151;
    --glass-bg: rgba(17, 24, 39, 0.9);
    --glass-border: rgba(75, 85, 99, 0.3);
    --success-bg: rgba(16, 185, 129, 0.15);
    --success-text: #34d399;
    --error-bg: rgba(239, 68, 68, 0.15);
    --error-text: #f87171;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --warning-text: #fbbf24;
}

/* ============================================
   LIGHT MODE OVERRIDES - All Text Visible
   ============================================ */

/* Header Section */
[data-theme="light"] .header {
    color: white;
}

[data-theme="light"] .header h1 {
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Dark mode - keep h1 white with shadow */
[data-theme="dark"] .header h1 {
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .subtitle {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    font-weight: 600;
}

[data-theme="light"] .stat-badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Progress Bar */
[data-theme="light"] .progress-bar {
    background: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) inset;
}

[data-theme="light"] .progress-steps::before {
    background: rgba(0, 0, 0, 0.08);
    display: none; /* Hide the connecting line in light mode too */
}

[data-theme="light"] .progress-step-circle {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--border-color);
    color: var(--text-primary);
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1),
                0 0 0 0 rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .progress-step-label {
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

[data-theme="light"] .progress-step.active .progress-step-circle {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5),
                0 0 60px rgba(99, 102, 241, 0.25),
                0 8px 20px rgba(0, 0, 0, 0.15),
                0 0 0 8px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .progress-step.active .progress-step-label {
    color: white;
    text-shadow: 0 2px 8px rgba(99, 102, 241, 0.6),
                 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .progress-step.completed .progress-step-circle {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4),
                0 6px 15px rgba(0, 0, 0, 0.1),
                0 0 0 6px rgba(16, 185, 129, 0.1);
}

[data-theme="light"] .progress-step.completed .progress-step-label {
    color: #10b981;
    text-shadow: 0 2px 8px rgba(16, 185, 129, 0.6),
                 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Step Cards */
[data-theme="light"] .step-title {
    color: var(--text-primary);
}

[data-theme="light"] .form-description {
    color: var(--text-secondary);
}

/* Form Labels */
[data-theme="light"] .form-group label {
    color: var(--text-primary);
}

[data-theme="light"] .form-hint {
    color: var(--text-secondary);
}

/* Selected Amount Display */
[data-theme="light"] .selected-amount-label {
    color: var(--text-secondary);
}

[data-theme="light"] .selected-amount-value {
    color: var(--text-primary);
}

[data-theme="light"] .selected-epoints {
    color: var(--primary-color);
}

/* Payment Summary */
[data-theme="light"] .payment-summary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(79, 70, 229, 0.08));
}

[data-theme="light"] .summary-row {
    color: var(--text-primary);
}

/* Security Badges */
[data-theme="light"] .security-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-text);
}

/* Success Page */
[data-theme="light"] .success-title {
    background: linear-gradient(135deg, var(--success-color), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .success-message {
    color: var(--text-secondary);
}

[data-theme="light"] .verification-text strong {
    color: var(--text-primary);
}

[data-theme="light"] .verification-text small {
    color: var(--text-secondary);
}

[data-theme="light"] .detail-label {
    color: var(--text-secondary);
}

[data-theme="light"] .detail-value {
    color: var(--text-primary);
}

/* Footer Section */
[data-theme="light"] .footer {
    color: white;
}

[data-theme="light"] .footer-text,
[data-theme="light"] .footer-subtext,
[data-theme="light"] .footer-copyright,
[data-theme="light"] .footer-developed {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

[data-theme="light"] .conversion-info {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .info-box {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .footer-badges .badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .payment-methods-text {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .vertex-link {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .vertex-link:hover {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Captcha Group Styling */
.captcha-group {
    margin: 25px 0;
}

.captcha-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

[data-theme="light"] .captcha-wrapper {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: url('InternationalTopUpBG.png') center center no-repeat fixed;
    background-size: cover;
    background-color: var(--bg-gradient-start);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 15px 20px;
    position: relative;
    overflow-x: hidden;
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.75) 0%, rgba(118, 75, 162, 0.75) 100%);
    z-index: -1;
    pointer-events: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 75, 175, 0.3), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: var(--shadow-xl);
}

.theme-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: var(--transition);
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
}

.header-logo:hover {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.1rem;
    color: white;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
    transition: var(--transition);
}

.stat-badge:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Message Area */
.message-area {
    margin-bottom: 15px;
    min-height: 15px;
}

.message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInDown 0.3s ease-out;
    backdrop-filter: blur(20px);
    border: 1px solid;
}

.message-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-color);
}

.message-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-color);
}

.message-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: var(--warning-color);
}

/* Progress Bar */
.progress-container {
    margin: 30px 0 40px 0;
    animation: fadeInDown 0.6s ease-out 0.2s both;
    padding: 0 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 12px;
    overflow: visible;
    margin-bottom: 25px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) inset,
                0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: progressBarShine 3s linear infinite;
    border-radius: 12px;
}

@keyframes progressBarShine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        #10b981 0%, 
        #34d399 25%,
        #10b981 50%,
        #059669 75%,
        #10b981 100%);
    background-size: 300% 100%;
    border-radius: 12px;
    width: 25%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.8),
                0 0 50px rgba(16, 185, 129, 0.4),
                0 2px 10px rgba(16, 185, 129, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    animation: progressShimmer 3s ease-in-out infinite,
               progressPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent);
    animation: progressGleam 2.5s ease-in-out infinite;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%);
    border-radius: 12px;
}

@keyframes progressShimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes progressPulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.8),
                    0 0 50px rgba(16, 185, 129, 0.4),
                    0 2px 10px rgba(16, 185, 129, 0.6),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3),
                    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 35px rgba(16, 185, 129, 1),
                    0 0 70px rgba(16, 185, 129, 0.6),
                    0 4px 15px rgba(16, 185, 129, 0.8),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4),
                    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    }
}

@keyframes progressGleam {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    z-index: -1;
    border-radius: 10px;
    display: none; /* Hide the connecting line */
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.progress-step:hover {
    opacity: 0.85;
    transform: translateY(-3px);
}

.progress-step.active {
    opacity: 1;
}

.progress-step.active:hover {
    transform: translateY(-5px);
}

.progress-step.completed {
    opacity: 1;
}

.progress-step-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
                0 0 0 0 rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 1;
}

.progress-step.active .progress-step-circle {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-color: var(--primary-color);
    border-width: 4px;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.8),
                0 0 60px rgba(99, 102, 241, 0.4),
                0 8px 20px rgba(0, 0, 0, 0.3),
                0 0 0 8px rgba(99, 102, 241, 0.2);
    animation: stepPulse 2s ease-in-out infinite, stepRotate 20s linear infinite;
    transform: scale(1.1);
}

.progress-step.active .progress-step-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: circleShine 3s ease-in-out infinite;
}

@keyframes stepPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.8),
                    0 0 60px rgba(99, 102, 241, 0.4),
                    0 8px 20px rgba(0, 0, 0, 0.3),
                    0 0 0 8px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 1),
                    0 0 80px rgba(99, 102, 241, 0.6),
                    0 10px 25px rgba(0, 0, 0, 0.4),
                    0 0 0 12px rgba(99, 102, 241, 0.3);
    }
}

@keyframes stepRotate {
    from {
        filter: hue-rotate(0deg);
    }
    to {
        filter: hue-rotate(360deg);
    }
}

@keyframes circleShine {
    0%, 100% {
        transform: rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(180deg);
    }
}

.progress-step.completed .progress-step-circle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    border-width: 3px;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.6),
                0 6px 15px rgba(0, 0, 0, 0.2),
                0 0 0 6px rgba(16, 185, 129, 0.15);
    animation: completedBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes completedBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.progress-step-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
                 0 4px 16px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.progress-step.active .progress-step-label {
    font-size: 1rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(99, 102, 241, 0.6),
                 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.progress-step.completed .progress-step-label {
    color: #10b981;
    text-shadow: 0 2px 8px rgba(16, 185, 129, 0.4),
                 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Step Sections */
.step-section {
    display: none;
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Step Transitions */
.step-section.exit-forward {
    animation: slideOutLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.step-section.exit-backward {
    animation: slideOutRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.step-section.enter-forward {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.step-section.enter-backward {
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(-100px) scale(0.9);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.step-section.active {
    display: block;
}

.step-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 50px;
    box-shadow: var(--shadow-xl), 
                0 0 0 1px rgba(255, 255, 255, 0.1) inset,
                0 20px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    position: relative;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.card-header {
    margin-bottom: 30px;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    animation: stepNumberPulse 2s ease-in-out infinite;
}

@keyframes stepNumberPulse {
    0%, 100% {
        box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 8px 20px rgba(99, 102, 241, 0.6);
    }
}

.step-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.form-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-left: 58px;
    font-weight: 500;
    line-height: 1.5;
}

/* Amount Cards Grid */
.amount-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 32px;
    margin-top: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    justify-items: center;
    perspective: 1000px;
}

.amount-card {
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    max-width: 650px;
    aspect-ratio: 16 / 9;
    height: auto;
    animation: fadeInUp 0.6s ease-out backwards;
    transform-style: preserve-3d;
    will-change: transform;
}

/* 3D Tilt Effect on Hover */
.amount-card:hover {
    transform: translateY(-12px) rotateX(var(--card-rotate-x, 0deg)) rotateY(var(--card-rotate-y, 0deg));
    box-shadow: 
        0 20px 60px rgba(99, 102, 241, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
}

.amount-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--card-mouse-x, 50%) var(--card-mouse-y, 50%), 
                                rgba(255, 255, 255, 0.2) 0%, 
                                transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.amount-card:hover::after {
    opacity: 1;
}

.amount-card:nth-child(1) { animation-delay: 0.1s; }
.amount-card:nth-child(2) { animation-delay: 0.2s; }
.amount-card:nth-child(3) { animation-delay: 0.3s; }
.amount-card:nth-child(4) { animation-delay: 0.4s; }
.amount-card:nth-child(5) { animation-delay: 0.5s; }

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

/* Individual card backgrounds */
.amount-card[data-amount="1000"] {
    background-image: url('TopUp1K.png');
}

.amount-card[data-amount="2000"] {
    background-image: url('TopUp2K.png');
}

.amount-card[data-amount="3000"] {
    background-image: url('TopUp3K.png');
}

.amount-card[data-amount="4000"] {
    background-image: url('TopUp4K.png');
}

.amount-card[data-amount="5000"] {
    background-image: url('TopUp5K.png');
}

/* Gradient border effect */
.amount-card::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.3) 0%, 
        rgba(168, 85, 247, 0.3) 50%, 
        rgba(236, 72, 153, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.amount-card:hover::after {
    opacity: 1;
}

/* Shine effect on hover */
.amount-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.7s ease;
    z-index: 3;
}

.amount-card:hover::before {
    left: 100%;
}


.amount-card.selected {
    border-color: var(--primary-color);
    border-width: 4px;
    box-shadow: 
        0 0 0 6px rgba(99, 102, 241, 0.3),
        0 20px 60px rgba(99, 102, 241, 0.5),
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
    animation: selectedPulse 2.5s ease-in-out infinite;
}

.amount-card.selected::after {
    opacity: 1;
}

@keyframes selectedPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3), 0 16px 40px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.2), 0 20px 50px rgba(99, 102, 241, 0.5);
    }
}

/* All text and icon elements removed - cards now display pure images */

/* Selected Amount Display */
.selected-amount-display {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(79, 70, 229, 0.1));
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.selected-amount-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.selected-package-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

#selectedPackageImage {
    width: 100%;
    height: auto;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    object-fit: contain;
}

#selectedPackageImage:hover {
    transform: scale(1.02);
}

.package-placeholder {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.75;
    letter-spacing: 0.2px;
}

.selected-amount-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.selected-epoints {
    display: block;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 5px;
}

/* Form Groups */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.label-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.label-required {
    color: var(--error-color);
    font-weight: 800;
}

.label-optional {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    font-style: italic;
}

.input-wrapper {
    position: relative;
}

/* Floating Label Enhancement */
.input-wrapper.has-floating-label {
    position: relative;
    margin-top: 8px;
}

.input-wrapper .floating-label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 600;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-white);
    padding: 0 5px;
    z-index: 1;
}

.input-wrapper input:focus ~ .floating-label,
.input-wrapper input:not(:placeholder-shown) ~ .floating-label {
    top: 0;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 50px 16px 18px;
    border: 3px solid var(--border-color);
    border-radius: 14px;
    font-size: 1.05rem;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
    font-weight: 600;
    line-height: 1.5;
    position: relative;
}

/* Animated Glow Ring on Focus */
.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 
                0 8px 16px rgba(99, 102, 241, 0.1),
                0 0 30px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 
                    0 8px 16px rgba(99, 102, 241, 0.1),
                    0 0 30px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.2), 
                    0 10px 20px rgba(99, 102, 241, 0.15),
                    0 0 40px rgba(99, 102, 241, 0.3);
    }
}

.input-wrapper input:focus + .input-icon {
    color: var(--primary-color);
    animation: iconBounce 0.5s ease-in-out;
}

/* Valid Input State with Checkmark */
.input-wrapper input:valid:not(:placeholder-shown):not(:focus) {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-wrapper input:valid:not(:placeholder-shown):not(:focus) + .input-icon {
    color: var(--success-color);
}

.input-wrapper .validation-checkmark {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 20px;
    height: 20px;
    color: var(--success-color);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.input-wrapper input:valid:not(:placeholder-shown):not(:focus) ~ .validation-checkmark {
    transform: translateY(-50%) scale(1);
    opacity: 1;
    animation: checkmarkSlide 0.5s ease-out;
}

@keyframes checkmarkSlide {
    0% {
        transform: translateY(-50%) translateX(20px) scale(0);
        opacity: 0;
    }
    60% {
        transform: translateY(-50%) translateX(-5px) scale(1.2);
    }
    100% {
        transform: translateY(-50%) translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
}

.input-wrapper input.error {
    border-color: var(--error-color);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.input-wrapper input.success {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    display: block;
    font-size: 0.85rem;
    color: var(--error-color);
    margin-top: 6px;
    font-weight: 600;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Payment Summary */
.payment-summary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(79, 70, 229, 0.08));
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    animation: slideInUp 0.4s ease-out;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    padding-top: 18px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.3rem;
}

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--success-bg);
    border: 1px solid var(--success-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success-text);
    animation: badgeFadeIn 0.6s ease-out backwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.security-badge:nth-child(1) {
    animation-delay: 0.1s;
}

.security-badge:nth-child(2) {
    animation-delay: 0.2s;
}

.security-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

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

.security-badge svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
    animation: shieldPulse 2s ease-in-out infinite;
}

@keyframes shieldPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(16, 185, 129, 0));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
    }
}

/* Payment Methods Section */
.payment-methods {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(79, 70, 229, 0.05));
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.payment-method-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 0.3px;
}

.payment-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-logo {
    width: 48px;
    height: 32px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0.6);
    opacity: 0.7;
    cursor: pointer;
    animation: logoFadeIn 0.5s ease-out backwards;
}

.payment-logo:nth-child(1) { animation-delay: 0.4s; }
.payment-logo:nth-child(2) { animation-delay: 0.5s; }
.payment-logo:nth-child(3) { animation-delay: 0.6s; }
.payment-logo:nth-child(4) { animation-delay: 0.7s; }
.payment-logo:nth-child(5) { animation-delay: 0.8s; }
.payment-logo:nth-child(6) { animation-delay: 0.9s; }

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    to {
        opacity: 0.7;
        transform: scale(1) translateY(0);
    }
}

.payment-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.payment-logo svg {
    width: 100%;
    height: 100%;
}

/* Stripe Elements */
.stripe-element {
    background: var(--bg-white);
    border: 3px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.stripe-element:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), var(--shadow-lg);
    transform: translateY(-2px);
}

.payment-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.payment-message.error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-color);
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

/* Material Ripple Effect */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Button Loading State */
.btn.loading {
    pointer-events: none;
    position: relative;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-icon {
    opacity: 0;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Enhanced 3D Lift Effect */
.btn:not(:disabled):hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-dark));
}

.btn-primary:hover:not(:disabled) .btn-icon {
    transform: translateX(3px);
    animation: iconSlide 0.6s ease-in-out infinite;
}

@keyframes iconSlide {
    0%, 100% {
        transform: translateX(3px);
    }
    50% {
        transform: translateX(6px);
    }
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover .btn-icon {
    transform: translateX(-3px);
}

/* Success Card */
.success-card {
    text-align: center;
    position: relative;
    overflow: visible;
}

/* Confetti Canvas Container */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.success-card::before {
    content: '🎉';
    position: absolute;
    font-size: 4rem;
    top: -30px;
    left: 10%;
    animation: confettiLeft 3s ease-out infinite;
}

.success-card::after {
    content: '✨';
    position: absolute;
    font-size: 3rem;
    top: -20px;
    right: 10%;
    animation: confettiRight 3s ease-out infinite 0.5s;
}

@keyframes confettiLeft {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes confettiRight {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100px) rotate(-360deg);
        opacity: 0;
    }
}

.success-animation {
    margin-bottom: 35px;
    position: relative;
}

.checkmark {
    width: 90px;
    height: 90px;
    margin: 0 auto;
    animation: scaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.3));
}

.checkmark-circle {
    stroke: var(--success-color);
    stroke-width: 3;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: strokeCircle 0.8s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: var(--success-color);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: strokeCheck 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.success-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--success-color), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: titleBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.5s both;
}

@keyframes titleBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
    animation: fadeIn 0.6s ease-out 0.8s both;
}

/* Verification Status Steps */
.verification-status {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 20px;
    animation: slideInUp 0.5s ease-out 0.9s both;
}

.verification-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--bg-white);
    border-radius: 10px;
    opacity: 0;
    transform: translateX(-20px);
    transition: var(--transition);
}

.verification-step.completed {
    opacity: 1;
    transform: translateX(0);
    animation: slideInRight 0.5s ease-out both;
}

.verification-step:nth-child(1) { animation-delay: 1s; }
.verification-step:nth-child(2) { animation-delay: 1.2s; }
.verification-step:nth-child(3) { animation-delay: 1.4s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.verification-step:last-child {
    margin-bottom: 0;
}

.verification-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.verification-text {
    flex: 1;
    text-align: left;
}

.verification-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.verification-text small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Success Actions */
.success-actions {
    margin-bottom: 20px;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(79, 70, 229, 0.1));
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    animation: fadeIn 0.6s ease-out 1.8s both;
}

.info-box svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* EPoints Counter Animation */
.epoints-counter {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: countUp 1s ease-out 1.3s both;
}

@keyframes countUp {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.detail-value.highlight {
    background: linear-gradient(135deg, var(--success-color), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.status-completed {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-color);
}

.success-details {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
    animation: slideInUp 0.5s ease-out 1s both;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    animation: fadeIn 0.4s ease-out both;
}

.detail-row:nth-child(1) { animation-delay: 1.1s; }
.detail-row:nth-child(2) { animation-delay: 1.2s; }
.detail-row:nth-child(3) { animation-delay: 1.3s; }
.detail-row:nth-child(4) { animation-delay: 1.4s; }

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.detail-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: 0.2px;
}

.detail-value.highlight {
    background: linear-gradient(135deg, var(--success-color), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
}

.detail-value.small {
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    background: var(--bg-light);
    padding: 4px 8px;
    border-radius: 6px;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 25px;
    padding: 15px;
    opacity: 0.95;
}

.footer-content {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-section p {
    margin: 3px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
}

.conversion-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.info-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    color: #10b981;
}

.footer-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    opacity: 0.9;
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.footer-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.footer-subtext {
    color: white;
    opacity: 0.85;
    font-size: 0.85rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Payment Methods */
.payment-methods {
    margin-bottom: 10px;
}

.payment-methods-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    opacity: 0.9;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.payment-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.payment-card {
    background: white;
    padding: 3px 6px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    cursor: pointer;
}

.payment-card:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.payment-card svg {
    width: 40px;
    height: 26px;
    display: block;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.footer-developed {
    margin-top: 8px;
    font-size: 0.9rem;
    opacity: 0.95;
}

.vertex-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--primary-color);
}

[data-theme="dark"] .vertex-link {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
}

.vertex-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    background: rgba(99, 102, 241, 0.9);
    color: white;
}

[data-theme="dark"] .vertex-link:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.vertex-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.footer-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.footer-badges .badge {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.footer-badges .badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Payment Option Switch */
.payment-option-switch {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    text-align: center;
    animation: containerPulse 4s ease-in-out infinite;
}

@keyframes containerPulse {
    0%, 100% { 
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 0 rgba(0, 200, 83, 0);
    }
    50% { 
        border-color: rgba(0, 200, 83, 0.4);
        box-shadow: 0 0 20px rgba(0, 200, 83, 0.2);
    }
}

.switch-text {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 12px;
    opacity: 0.9;
}

[data-theme="light"] .switch-text {
    color: var(--text-primary);
}

.switch-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(0, 150, 63, 0.05));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 200, 83, 0.3);
    border-radius: 14px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 200, 83, 0.2);
    position: relative;
    overflow: hidden;
}

.switch-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.switch-button:active::before {
    width: 300px;
    height: 300px;
}

.switch-button:hover {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.2), rgba(0, 150, 63, 0.15));
    border-color: rgba(0, 200, 83, 0.6);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 200, 83, 0.4);
}

.button-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 200, 83, 0.15);
    border-radius: 8px;
    transition: var(--transition);
}

.switch-button:hover .button-icon-wrapper {
    background: rgba(0, 200, 83, 0.3);
    transform: rotate(-5deg) scale(1.1);
}

.button-icon-wrapper svg {
    width: 20px;
    height: 20px;
    animation: iconGentle 3s ease-in-out infinite;
}

.switch-button:hover .button-icon-wrapper svg {
    animation: iconBounce 0.6s ease-in-out;
}

@keyframes iconGentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(5deg); }
}

[data-theme="light"] .payment-option-switch {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .switch-button {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .switch-button:hover {
    background: var(--primary-color);
    color: white;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes strokeCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes strokeCheck {
    to {
        stroke-dashoffset: 0;
    }
}

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

/* Touch Feedback for Mobile */
@media (hover: none) and (pointer: coarse) {
    .amount-card:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Disable heavy animations on mobile for performance */
    .amount-card:hover {
        animation: none;
    }
    
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* Swipe Gesture Support */
.step-section {
    touch-action: pan-y;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px 10px;
    }
    
    /* Larger touch targets for mobile */
    .btn {
        min-height: 48px;
        padding: 16px 24px;
    }
    
    .amount-card {
        min-height: 120px;
    }
    
    /* Reduce animation complexity on mobile */
    .amount-card {
        animation-duration: 0.4s;
    }
    
    /* Simplify 3D effects on mobile */
    .amount-card:hover {
        transform: translateY(-8px);
    }

    .header {
        margin-bottom: 25px;
    }

    .header-logo {
        width: 90px;
        height: 90px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .header-stats {
        gap: 10px;
    }

    .stat-badge {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .progress-container {
        margin: 20px 0;
    }

    .progress-step-circle {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .progress-step.active .progress-step-circle {
        transform: scale(1.05);
    }

    .progress-step-label {
        font-size: 0.8rem;
    }

    .progress-step.active .progress-step-label {
        font-size: 0.85rem;
    }

    .amount-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .amount-card:nth-child(1),
    .amount-card:nth-child(2),
    .amount-card:nth-child(3),
    .amount-card:nth-child(4),
    .amount-card:nth-child(5) {
        flex: 0 0 calc(50% - 12px);
    }

    .amount-card {
        min-height: 100px;
    }

    .step-card {
        padding: 25px 20px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .step-title {
        font-size: 1.3rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem;
    }

    .payment-summary {
        padding: 20px;
    }

    .success-title {
        font-size: 2rem;
    }

    .checkmark {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 8px;
    }

    .header-logo {
        width: 75px;
        height: 75px;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .stat-badge {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .progress-container {
        padding: 0 10px;
    }

    .progress-step-circle {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .progress-step.active .progress-step-circle {
        transform: scale(1);
    }

    .progress-step-label {
        font-size: 0.7rem;
    }

    .progress-step.active .progress-step-label {
        font-size: 0.75rem;
    }

    .progress-steps::before {
        left: 5%;
        right: 5%;
    }

    .amount-cards-grid {
        gap: 10px;
    }
    
    .amount-card:nth-child(1),
    .amount-card:nth-child(2),
    .amount-card:nth-child(3),
    .amount-card:nth-child(4),
    .amount-card:nth-child(5) {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .amount-card {
        min-height: 80px;
    }

    .step-card {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
        top: 12px;
        right: 12px;
    }

    .selected-amount-display {
        padding: 15px;
    }

    #selectedPackageImage {
        max-width: 100%;
    }

    .selected-amount-value {
        font-size: 1.6rem;
    }

    .conversion-info {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}
