:root {
    /* Electric Charging Theme */
    --primary-color: #00d9ff;
    /* Electric Cyan - main charging color */
    --primary-dim: #00a8cc;
    --secondary-color: #00ff88;
    /* Energy Green - eco-friendly */
    --charging-color: #ffd700;
    /* Gold - active charging */
    --bg-color: #0a0e1a;
    /* Deep space blue-black */
    --card-bg: linear-gradient(135deg, #1a1f2e 0%, #151923 100%);
    --card-bg-solid: #1a1f2e;
    --text-color: #ffffff;
    --text-secondary: #8b95b0;
    --accent-color: #232938;
    --danger-color: #ff4d6d;
    --glass-bg: rgba(26, 31, 46, 0.85);
    --border-radius: 16px;
    --nav-height: 65px;

    /* Energy glow effects */
    --glow-cyan: 0 0 20px rgba(0, 217, 255, 0.3);
    --glow-green: 0 0 20px rgba(0, 255, 136, 0.3);
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg,
            #0a0e1a 0%,
            #0f1420 25%,
            #1a1f2e 50%,
            #0f1420 75%,
            #0a0e1a 100%);
    background-size: 400% 400%;
    animation: energyFlow 15s ease infinite;
    color: var(--text-color);
    font-size: 14px;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + 20px);
    position: relative;
}

/* Animated energy gradient */
@keyframes energyFlow {

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

    50% {
        background-position: 100% 50%;
    }
}

/* Energy particles overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 217, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 136, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 215, 0, 0.02) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

#app {
    max-width: 480px;
    /* Better for desktop */
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    /* Slight tint */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
        0 1px 10px rgba(0, 217, 255, 0.05);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    font-size: 24px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

#username {
    font-weight: 600;
    font-size: 14px;
}

.balance-badge {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

.lang-switch {
    background: var(--accent-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* CONTENT */
.content {
    padding: 15px;
    flex: 1;
}

section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.active-section {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARDS */
.hero-card,
.wallet-card,
.status-card,
.info-block {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border: 1px solid rgba(0, 217, 255, 0.15);
    position: relative;
    overflow: hidden;
}

/* Energy border pulse */
.hero-card::before,
.wallet-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--primary-color),
            var(--secondary-color),
            var(--charging-color),
            var(--primary-color));
    background-size: 300% 300%;
    border-radius: var(--border-radius);
    z-index: -1;
    opacity: 0;
    animation: energyBorderPulse 3s ease infinite;
    filter: blur(8px);
}

@keyframes energyBorderPulse {

    0%,
    100% {
        opacity: 0.1;
        background-position: 0% 50%;
    }

    50% {
        opacity: 0.3;
        background-position: 100% 50%;
    }
}

.hero-card h2 {
    font-size: 24px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), #fff, var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hero-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.status-card {
    border: 1px solid var(--primary-color);
    background: linear-gradient(135deg,
            rgba(0, 217, 255, 0.1) 0%,
            rgba(0, 255, 136, 0.08) 100%);
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    box-shadow: var(--glow-cyan);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        box-shadow: var(--glow-cyan);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 30px rgba(0, 217, 255, 0.4);
        transform: scale(1.01);
    }
}

/* FORMS */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    background: var(--accent-color);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    font-size: 16px;
    /* Prevents iOS zoom */
    outline: none;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: var(--glow-cyan),
        inset 0 0 10px rgba(0, 217, 255, 0.1);
    background: rgba(35, 41, 56, 0.8);
}

.file-upload {
    background: var(--accent-color);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
}

.file-upload:hover {
    border-color: var(--primary-color);
}

.file-upload input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload i {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    display: block;
}

#preview-img {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    display: none;
}

#preview-img.visible {
    display: block;
}

/* BUTTONS */
button {
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-primary::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.5s;
}

.btn-primary:hover {
    box-shadow: var(--glow-cyan), 0 6px 20px rgba(0, 217, 255, 0.4);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.4);
}

.btn-secondary {
    background: var(--accent-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
}

.btn-outline {
    width: 100%;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px;
    border-radius: 12px;
    margin-top: 10px;
}

.btn-close {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--danger-color);
    margin-top: 10px;
}

/* PRICES MINI */
.prices-mini {
    margin-top: 20px;
    background: var(--accent-color);
    border-radius: var(--border-radius);
    padding: 15px;
}

.prices-mini h3 {
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.dot.green {
    background: #00ff88;
}

.dot.red {
    background: #ff4d4d;
}

/* WALLET */
.wallet-card {
    text-align: center;
    background: linear-gradient(135deg,
            rgba(0, 217, 255, 0.08) 0%,
            rgba(26, 31, 46, 1) 50%,
            rgba(0, 255, 136, 0.08) 100%);
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.wallet-balance h1 {
    font-size: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--charging-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 8px 0 18px 0;
    font-weight: 800;
    text-shadow: var(--glow-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.3));
}

.wallet-free h3 {
    font-size: 22px;
    color: var(--secondary-color);
    margin: 8px 0;
    font-weight: 700;
    text-shadow: var(--glow-green);
}

.label {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}

.topup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.topup-btn {
    background: linear-gradient(135deg,
            rgba(0, 217, 255, 0.15),
            rgba(35, 41, 56, 1));
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: var(--primary-color);
    padding: 18px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.topup-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 217, 255, 0.2),
            transparent);
    transition: left 0.4s;
}

.topup-btn:hover {
    background: linear-gradient(135deg,
            rgba(0, 217, 255, 0.25),
            rgba(35, 41, 56, 1));
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.topup-btn:hover::before {
    left: 100%;
}

.topup-btn:active {
    transform: translateY(0) scale(0.97);
}

.custom-amount {
    display: flex;
    gap: 10px;
}

/* FAQ */
details {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

details summary {
    cursor: pointer;
    font-weight: 500;
    outline: none;
}

details p {
    margin-top: 5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(0, 217, 255, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 101;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3),
        0 -1px 10px rgba(0, 217, 255, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 11px;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 70px;
    padding: 5px;
    border-radius: 12px;
    position: relative;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    filter: drop-shadow(0 0 8px var(--primary-color));
    transform: scale(1.1);
}

.nav-item:hover:not(.active) {
    color: rgba(0, 217, 255, 0.7);
}

/* Active indicator */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 3px 3px;
    box-shadow: var(--glow-cyan);
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
}

.modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    width: 80%;
    max-width: 300px;
    text-align: center;
}

.lang-list button {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 5px 0;
    background: var(--accent-color);
    color: #fff;
    border-radius: 8px;
    text-align: left;
}

/* PAYMENT METHOD SWITCH */
.payment-method-switch {
    margin: 15px 0;
}

.pm-slider-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0;
}

.pm-slider-thumb {
    display: none;
}

.pm-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.6), rgba(30, 30, 30, 0.8));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px;
    overflow: hidden;
}

.pm-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.pm-option:hover::before {
    opacity: 1;
}

.pm-option:active {
    transform: scale(0.97);
}

.pm-option .pm-icon {
    font-size: 36px;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0.5) brightness(0.8);
}

.pm-option .pm-label {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pm-option .pm-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
    font-weight: 500;
}

/* Active state - Stars (default) */
.pm-option.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2),
        0 0 40px rgba(255, 215, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pm-option.active .pm-icon {
    transform: scale(1.1);
    filter: grayscale(0) brightness(1.2) drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

.pm-option.active .pm-label {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.pm-option.active .pm-desc {
    color: rgba(255, 215, 0, 0.7);
}

/* Crypto-specific active state */
.pm-option[data-method="crypto"].active {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 204, 106, 0.1));
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.2),
        0 0 40px rgba(0, 255, 136, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pm-option[data-method="crypto"].active .pm-icon {
    filter: grayscale(0) brightness(1.2) drop-shadow(0 0 8px rgba(0, 255, 136, 0.6));
}

.pm-option[data-method="crypto"].active .pm-label {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.pm-option[data-method="crypto"].active .pm-desc {
    color: rgba(0, 255, 136, 0.7);
}

.hidden {
    display: none;
}