:root {
    --bg: #f0f4f8;
    --text: #001f3f;
    --accent: #00d4ff;
    --accent-glow: #00f0ff;
    --accent-dark: #0099cc;
    --card-bg: rgba(255,255,255,0.7);
    --shadow: 0 8px 32px rgba(0,212,255,0.15);
}

[data-theme="dark"] {
    --bg: #0d1117;
    --text: #c9d1d9;
    --accent: #00d4ff;
    --accent-glow: #00f0ff;
    --accent-dark: #0099cc;
    --card-bg: rgba(22,27,34,0.7);
    --shadow: 0 8px 32px rgba(0,212,255,0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.5s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 30px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -1px;
    text-shadow: 0 0 10px rgba(0,212,255,0.5);
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.top-row {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.price-glow {
    color: var(--accent);
    font-weight: 800;
    text-shadow: 0 0 8px var(--accent-glow);
    min-width: 100px;
}

#currency-select {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
}

.btn, .glow-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(0,212,255,0.5);
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.glow-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0,240,255,0.6), 0 0 80px rgba(0,212,255,0.4);
    background: linear-gradient(135deg, var(--accent-glow), var(--accent));
    animation: pulse-glow 1.5s infinite ease-in-out;
}

.glow-btn:active {
    transform: translateY(-2px) scale(0.98);
}

@keyframes pulse-glow {
    0%, 100% { transform: translateY(-4px) scale(1.05); box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0,240,255,0.6); }
    50% { transform: translateY(-6px) scale(1.08); box-shadow: 0 0 35px var(--accent-glow), 0 0 70px rgba(0,240,255,0.8); }
}

.glow-btn::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,240,255,0.4) 0%, transparent 70%);
    opacity: 0;
    transform: perspective(1em) rotateX(60deg) scale(1, 0.4);
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.glow-btn:hover::after {
    opacity: 0.7;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn:hover {
    transform: rotate(20deg) scale(1.2);
    text-shadow: 0 0 15px var(--accent-glow);
}

.navbar {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,212,255,0.15);
}

.nav-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    list-style: none;
}

.nav-btn {
    background: rgba(0,212,255,0.08);
    color: var(--accent);
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn:hover, .nav-btn.active {
    background: rgba(0,212,255,0.2);
    box-shadow: 0 0 25px rgba(0,212,255,0.5);
    transform: translateY(-5px);
    border-color: var(--accent-glow);
    text-shadow: 0 0 10px var(--accent-glow);
}

.nav-btn .glow-icon {
    font-size: 1.3rem;
    color: var(--accent);
    text-shadow: 0 0 6px rgba(0,212,255,0.4);
    transition: all 0.4s ease;
}

.nav-btn:hover .glow-icon,
.nav-btn.active .glow-icon {
    transform: scale(1.25);
    text-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent-glow), 0 0 32px rgba(0,240,255,0.7), 0 0 60px rgba(0,212,255,0.5);
    color: var(--accent-glow);
    animation: pulse-icon 1.6s infinite ease-in-out;
}

.hero {
    text-align: center;
    padding: 120px 20px 80px;
}

.gradient-text {
    font-size: 5.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, #00d4ff, #00f0ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    animation: glow 3s infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #00d4ff; }
    to   { text-shadow: 0 0 30px #00f0ff, 0 0 50px #0099cc; }
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.features {
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    font-size: 3.2rem;
    margin-bottom: 60px;
    color: var(--accent);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
}

.card, .glow-card {
    background: var(--card-bg);
    padding: 45px 35px;
    border-radius: 24px;
    text-align: center;
    transition: all 0.5s ease;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,212,255,0.15);
    box-shadow: var(--shadow);
}

.glow-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 60px rgba(0,212,255,0.4);
    border-color: var(--accent-glow);
}

.glow-card i.glow-icon {
    font-size: 4rem;
    margin-bottom: 25px;
    transition: all 0.4s ease;
    text-shadow: 0 0 8px rgba(0,212,255,0.3);
}

.glow-card:hover .glow-icon {
    transform: scale(1.15);
    text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-glow), 0 0 40px rgba(0,240,255,0.6), 0 0 80px rgba(0,212,255,0.4);
    animation: pulse-icon 1.8s infinite ease-in-out;
    color: var(--accent-glow);
}

@keyframes pulse-icon {
    0%, 100% { text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-glow), 0 0 40px rgba(0,240,255,0.6); transform: scale(1.15); }
    50% { text-shadow: 0 0 15px var(--accent), 0 0 35px var(--accent-glow), 0 0 70px rgba(0,240,255,0.9), 0 0 100px rgba(0,212,255,0.5); transform: scale(1.22); }
}

.card h3, .glow-card h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.card a, .glow-card a {
    color: var(--accent-glow);
    text-decoration: none;
    font-weight: 700;
}

footer {
    padding: clamp(40px, 8vw, 80px) 0;
    text-align: center;
    border-top: 1px solid rgba(0,212,255,0.15);
    background: var(--bg);
    transition: all 0.4s ease;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(15px, 3vw, 25px);
}

.footer-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(20px, 5vw, 40px);
    margin-bottom: 10px;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.4s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-link:hover {
    transform: translateY(-4px);
}

.footer-link .glow-icon {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--accent);
    text-shadow: 0 0 8px rgba(0,212,255,0.4);
    transition: all 0.4s ease;
}

.footer-link:hover .glow-icon {
    transform: scale(1.3);
    color: var(--accent-glow);
    text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-glow), 0 0 40px rgba(0,240,255,0.7), 0 0 70px rgba(0,212,255,0.5);
    animation: pulse-icon 1.5s infinite ease-in-out;
}

.footer-text {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    opacity: 0.9;
    margin: 0;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 5px;
    background: var(--accent);
    border-radius: 10px;
    transition: all 0.4s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* Responsive Nav */
@media (max-width: 1024px) {
    .hamburger { display: flex; margin-left: auto; }

    .nav-tabs {
        position: fixed;
        inset: 0;
        top: 0;
        height: 100vh;
        background: rgba(13,17,23,0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        padding: 100px 20px 40px;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.6s cubic-bezier(0.23,1,0.32,1), opacity 0.6s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-tabs.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-btn {
        font-size: 1.3rem;
        padding: 14px 40px;
        min-width: 260px;
        border-radius: 16px;
        background: rgba(0,212,255,0.08);
        box-shadow: inset 0 0 15px rgba(0,212,255,0.12);
        transition: all 0.4s ease;
    }

    .nav-btn:hover, .nav-btn:active {
        transform: scale(1.08) translateY(-4px);
        box-shadow: 0 0 40px rgba(0,240,255,0.6), inset 0 0 30px rgba(0,240,255,0.3);
        background: linear-gradient(135deg, rgba(0,244,255,0.2), rgba(0,212,255,0.1));
    }

    .nav-btn:active { transform: scale(0.96); transition: transform 0.1s ease; }

    .nav-btn .glow-icon {
        font-size: 2.2rem;
        margin-right: 20px;
        animation: pulse-icon 2s infinite alternate;
    }

    .hero h1.gradient-text { font-size: clamp(3rem, 12vw, 5rem); }
    .hero p { font-size: 1.3rem; }
    .grid { grid-template-columns: 1fr; gap: 40px; }
    .card, .glow-card { padding: 50px 30px; border-radius: 28px; }
    .glow-btn, .btn { padding: 16px 40px; font-size: 1.2rem; min-width: 220px; }
    .footer-icons { gap: 35px; }
    .footer-link .glow-icon { font-size: clamp(2rem, 8vw, 2.8rem); }
    .price-section { font-size: 1.1rem; flex-wrap: wrap; justify-content: center; }
}

/* QR Form Styling */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(0,212,255,0.4);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    font-size: 1.1rem;
    background: rgba(0,212,255,0.08);
    border: 1px solid var(--accent);
    border-radius: 12px;
    color: var(--text);
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0,212,255,0.1);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-glow);
    box-shadow: 0 0 20px rgba(0,240,255,0.5), inset 0 0 15px rgba(0,240,255,0.2);
    background: rgba(0,212,255,0.12);
}

.form-group input::placeholder {
    color: rgba(0,212,255,0.5);
}

.fee-notice {
    margin: 25px 0;
    padding: 18px;
    background: rgba(0,212,255,0.1);
    border: 1px solid var(--accent);
    border-radius: 16px;
    box-shadow: 0 0 25px rgba(0,212,255,0.3);
    transition: all 0.3s ease;
}

.fee-notice:hover {
    box-shadow: 0 0 40px rgba(0,240,255,0.5);
    transform: translateY(-3px);
}

.fee-notice strong {
    color: var(--accent-glow);
    text-shadow: 0 0 10px var(--accent-glow);
}

.fee-notice small {
    opacity: 0.8;
    display: block;
    margin-top: 6px;
}

/* Explorer / Bridge Iframe Wrapper */
.explorer-wrapper, .bridge-wrapper, .swap-wrapper {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 2px solid var(--accent);
    overflow: hidden;
    position: relative;
}

.loading-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(13,17,23,0.7);
    backdrop-filter: blur(8px);
    color: var(--accent-glow);
    font-size: 1.4rem;
    text-shadow: 0 0 10px var(--accent-glow);
    z-index: 10;
}

.loading-spinner i {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Responsive iframe height */
@media (max-width: 1024px) {
    iframe {
        height: 70vh;
    }
}

@media (max-width: 768px) {
    iframe {
        height: 60vh;
    }
}