:root {
    /* Core Colors (Light Mode) */
    --color-bg: #f5f7fa;
    --color-surface-1: #ffffff;
    --color-surface-2: rgba(255, 255, 255, 0.8);
    --color-primary: #007bff;
    --color-primary-dim: rgba(0, 123, 255, 0.15);
    --color-secondary: #6c757d;
    --color-text: #1a1a1a;
    --color-text-muted: #4a5568;
    --color-primary-alpha: rgba(0, 123, 255, 0.2);
    --widget-border: rgba(0, 0, 0, 0.1);

    /* Utilities */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-glow: 0 4px 12px var(--color-primary-dim);
}

.dark-mode {
    /* Core Colors (Dark Mode) */
    --color-bg: #0b0c10;
    --color-surface-1: #1f2833;
    --color-surface-2: rgba(31, 40, 51, 0.6);
    --color-primary: #66fcf1;
    --color-primary-dim: rgba(102, 252, 241, 0.2);
    --color-secondary: #45a29e;
    --color-text: #ffffff;
    --color-text-muted: #c5c6c7;
    --color-primary-alpha: rgba(102, 252, 241, 0.2);
    --widget-border: rgba(255, 255, 255, 0.2);
    --shadow-glow: 0 0 20px var(--color-primary-dim);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--color-surface-2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Base Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    padding: 1.5rem 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -1px;
}

.nav-logo .logo-icon-wrapper {
    height: 28px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.nav-logo .logo-icon {
    font-size: 38px !important;
    color: #4df0cd;
    /* Cyan color */
    font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 48;
}

.nav-logo .logo-text {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
}

[data-theme="light"] .nav-logo .logo-text {
    color: #000000;
}

.nav-logo .logo-accent {
    color: #4df0cd;
    /* Cyan color */
    margin-left: 0 !important;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-bg);
    box-shadow: 0 4px 15px var(--color-primary-dim);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 252, 241, 0.4);
    background-color: #79fcf3;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text-muted);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary-dim);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 5rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-primary-dim) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    filter: blur(60px);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-glow);
    transform: perspective(1000px) rotateY(-15deg);
    transition: var(--transition-normal);
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.store-badges {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.store-badge {
    height: 50px;
    transition: var(--transition-fast);
}

.store-badge:hover {
    transform: translateY(-2px);
}

/* Features Grid */
.features {
    padding: 6rem 0;
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    /* Equal height rows */
    gap: 1.5rem;
    /* Apple bento style tight gap */
    margin-top: 4rem;
}

.bento-large {
    grid-column: span 2;
}

.feature-slot {
    perspective: 1200px;
    height: 100%;
    min-height: 280px;
}

.feature-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Smoother apple-like curve */
}

.feature-slot.flipped .feature-inner {
    transform: rotateY(180deg);
}

.feature-slot:hover {
    z-index: 10;
}

.feature-slot:hover .feature-inner {
    transform: scale(1.02);
}

.feature-slot.flipped:hover .feature-inner {
    transform: scale(1.02) rotateY(180deg);
}

.feature-card {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 2.5rem;
    text-align: left;
    transition: box-shadow var(--transition-normal);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--border-radius-md);
    background: var(--color-surface-2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* slightly stronger border */
    display: flex;
    flex-direction: column;
}

/* Force back face to be absolutely positioned so they overlap perfectly */
.feature-back {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateY(180deg);
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), var(--shadow-glow);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--color-primary-dim);
    color: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}


/* Feature Graphics */
.feature-graphic {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    position: relative;
    min-height: 110px;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Chat Widget */
.chat-widget {
    position: relative;
    width: 100%;
    background: rgba(10, 15, 25, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 160px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    gap: 8px;
}

.chat-header .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--color-primary);
}

.chat-title {
    flex: 1;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.chat-status {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}

.chat-body {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-end;
}

.chat-bubble {
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.85rem;
    max-width: 85%;
    line-height: 1.4;
    opacity: 0;
    position: relative;
}

@keyframes userMsg {

    0%,
    100% {
        opacity: 0;
        transform: translateY(10px);
    }

    5%,
    90% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes botTyping {

    0%,
    15%,
    40%,
    100% {
        opacity: 0;
        transform: translateY(10px);
    }

    20%,
    35% {
        opacity: 1;
        transform: translateY(0);
        display: flex;
    }
}

@keyframes botReply {

    0%,
    38%,
    100% {
        opacity: 0;
        transform: translateY(10px);
    }

    43%,
    90% {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-bubble.right {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    animation: userMsg 12s infinite;
}

.chat-bubble.left {
    background: var(--color-surface-2);
    color: var(--color-text-dim);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-bubble.left.typing {
    animation: botTyping 12s infinite;
    position: absolute;
    bottom: 50px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-bubble.left.response {
    animation: botReply 12s infinite;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--color-text-dim);
    border-radius: 50%;
    animation: typingBlink 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBlink {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.chat-input-bar {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.chat-placeholder {
    flex: 1;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.send-icon {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-left: 10px;
    opacity: 0.8;
}

/* Assets Widget */
.assets-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

.asset-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 70px;
    border-radius: 14px;
    background: var(--color-surface-1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.asset-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.asset-box.btc::before {
    background: #F7931A;
    box-shadow: 0 0 10px #F7931A;
}

.asset-box.eth::before {
    background: #627EEA;
    box-shadow: 0 0 10px #627EEA;
}

.asset-box.sol::before {
    background: #14F195;
    box-shadow: 0 0 10px #14F195;
}

.asset-box .ticker {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: var(--color-text);
    margin-top: 6px;
}

.asset-box .price-mini {
    font-size: 0.7rem;
    color: #22c55e;
    margin-top: 4px;
    font-weight: 700;
}

.assets-widget:hover .asset-box {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Chart Widget */
.chart-widget {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    height: 85px;
    width: 100%;
    position: relative;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-widget::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.chart-bar {
    width: 18px;
    background: linear-gradient(180deg, var(--color-primary) 0%, rgba(0, 123, 255, 0.05) 100%);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -2px 15px rgba(0, 123, 255, 0.4);
    animation: barGrow 2.5s ease-in-out infinite alternate;
    transform-origin: bottom;
}

.chart-bar:nth-child(1) {
    height: 40%;
    animation-delay: 0s;
}

.chart-bar:nth-child(2) {
    height: 65%;
    animation-delay: 0.3s;
}

.chart-bar:nth-child(3) {
    height: 45%;
    animation-delay: 0.6s;
}

.chart-bar:nth-child(4) {
    height: 90%;
    animation-delay: 0.9s;
}

.chart-bar:nth-child(5) {
    height: 75%;
    animation-delay: 1.2s;
}

/* Security Widget */
.security-widget {
    position: relative;
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--color-surface-1);
}

.security-widget .material-symbols-outlined {
    font-size: 2rem;
    color: var(--color-primary);
}

.security-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #66fcf1;
    box-shadow: 0 0 8px #66fcf1;
    animation: scanLaser 2s linear infinite;
}

/* API Widget */
.api-widget {
    position: relative;
    width: 100%;
    height: 100%;
}

.api-node {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.api-node::after {
    content: '';
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
}

.api-node.n1 {
    top: 20%;
    left: 20%;
    animation: pulseNode 2s infinite alternate;
}

.api-node.n2 {
    top: 60%;
    left: 45%;
    animation: pulseNode 2s infinite alternate 0.5s;
}

.api-node.n3 {
    top: 30%;
    right: 20%;
    animation: pulseNode 2s infinite alternate 1s;
}

.api-line {
    position: absolute;
    background: rgba(0, 123, 255, 0.4);
    height: 2px;
    transform-origin: 0 50%;
}

.api-line.l1 {
    top: 26%;
    left: 26%;
    width: 45px;
    transform: rotate(55deg);
}

.api-line.l2 {
    top: 62%;
    left: 52%;
    width: 50px;
    transform: rotate(-40deg);
}

/* Animations */
@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    100% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

@keyframes barGrow {
    0% {
        transform: scaleY(0.7);
    }

    100% {
        transform: scaleY(1.1);
    }
}

@keyframes scanLaser {
    0% {
        top: 0;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes pulseNode {
    0% {
        box-shadow: 0 0 5px var(--color-primary);
    }

    100% {
        box-shadow: 0 0 15px var(--color-primary);
        transform: scale(1.1);
    }
}


/* Quick Reveal Animation for Scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stats Section CSS */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
    padding: 4rem 0 2rem;
}

.stat-box h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.stat-box p {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
}

/* Steps Section CSS */
.steps-section {
    padding: 6rem 0;
    text-align: center;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
    text-align: left;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-primary-dim);
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
}

/* Footer */
footer {
    border-top: 1px solid var(--color-surface-1);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-col h4 {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-surface-1);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

    .store-badges {
        justify-content: center;
    }

    .hero-image img {
        transform: none;
    }

    .hero-image img:hover {
        transform: none;
    }

    .nav-links {
        display: none;
    }

    .features-grid,
    .stats,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .bento-large {
        grid-column: span 1;
    }

    .feature-slot {
        min-height: 380px;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    color: var(--color-text-muted);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--color-primary);
    background: var(--color-surface-2);
}

/* Phone Mockup */
.hero-image {
    perspective: 1000px;
}

.phone-mockup {
    width: 280px;
    height: 580px;
    background: #000;
    border-radius: 30px;
    border: 6px solid #1f2833;
    position: relative;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.5), 0 30px 60px -30px rgba(0, 0, 0, 0.3), var(--shadow-glow);
    overflow: hidden;
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: rotateY(-10deg) rotateX(5deg);
}

/* Screen Content */
.phone-screen {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #000;
}

.screen-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
}

.screen-slide.active {
    opacity: 1;
}

/* Notch / Dynamic Island */
.phone-notch {
    display: none;
}

/* Gloss Overlay */
.phone-gloss {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
    z-index: 5;
}

/* Animations and Responsive */
@media (max-width: 768px) {
    .phone-mockup {
        width: 240px;
        height: 500px;
        margin: 0 auto;
    }
}

/* ─── Waitlist Modal ──────────────────────────────────────── */
.wl-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: wlFadeIn 0.25s ease;
}

@keyframes wlFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes wlSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

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

.wl-card {
    background: var(--color-surface-1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 2rem 2rem 1.5rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    color: var(--color-text);
    font-family: 'Inter', sans-serif;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    animation: wlSlideUp 0.3s ease;
}

.wl-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.wl-close:hover {
    background: var(--color-primary-dim);
    color: var(--color-primary);
}

.wl-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.wl-header .wl-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.25rem;
}

.wl-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.wl-header p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.wl-header strong {
    color: var(--color-primary);
}

.wl-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(128, 128, 128, 0.3);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: border-color var(--transition-fast);
}

.wl-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-dim);
}

.wl-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.wl-consent {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 1.25rem;
}

.wl-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
}

.wl-consent span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.wl-consent a {
    color: var(--color-primary);
    text-decoration: none;
}

.wl-consent a:hover {
    text-decoration: underline;
}

.wl-submit {
    width: 100%;
    padding: 0.85rem;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.wl-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-primary-dim);
}

.wl-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wl-footnote {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 0;
    opacity: 0.7;
}

.wl-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 0.3rem;
}

.wl-success {
    text-align: center;
    padding: 1.5rem 0;
}

.wl-success .wl-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.wl-success h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.wl-success p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.wl-error {
    color: #f87171;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* =========================================
   BACK-FACE WIDGETS (3D FLIP)
   ========================================= */

/* 1. Radar (Mega Signal) */
.mega-signal-widget {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid var(--widget-border);
    position: relative;
    background:
        radial-gradient(circle, var(--color-primary-alpha) 0%, transparent 60%),
        linear-gradient(var(--color-primary-alpha) 1px, transparent 1px) center / 100% 50% no-repeat,
        linear-gradient(90deg, var(--color-primary-alpha) 1px, transparent 1px) center / 50% 100% no-repeat;
    overflow: hidden;
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, var(--color-primary-alpha) 360deg);
    border-radius: 50%;
    transform-origin: 50% 50%;
    animation: sweep 4s linear infinite;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 10;
    margin-top: -100%;
    margin-left: -100%;
}

@keyframes sweep {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.radar-blip {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary);
    opacity: 0;
    top: 25%;
    left: 65%;
    animation: blip 2s linear infinite 0.2s;
}

.radar-blip.b2 {
    top: 60%;
    left: 35%;
    animation-delay: 1.2s;
}

@keyframes sweep {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes blip {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0;
        transform: scale(2);
    }

    100% {
        opacity: 0;
    }
}

/* 2. Sonar (Whale Tracker) */
.sonar-widget {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sonar-core {
    width: 16px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--color-primary);
    z-index: 2;
}

.sonar-ring {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    animation: sonarPing 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.sonar-ring.delayed {
    animation-delay: 1.5s;
}

@keyframes sonarPing {
    0% {
        transform: scale(1);
        opacity: 0.8;
        border-width: 4px;
    }

    100% {
        transform: scale(6);
        opacity: 0;
        border-width: 1px;
    }
}

/* 3. Heatmap (Liquidation Map) */
.heatmap-widget {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 90px;
    width: 100%;
}

.heat-bar {
    width: 20px;
    height: 100%;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.heat-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    transform-origin: bottom;
    background: linear-gradient(to top, rgba(248, 113, 113, 0.4), #f87171);
    animation: heatPulse 2s ease-in-out infinite alternate;
}

.heat-bar.h-high::after {
    height: 90%;
    animation-delay: 0s;
}

.heat-bar.h-med::after {
    height: 50%;
    animation-delay: 0.5s;
    background: linear-gradient(to top, rgba(250, 204, 21, 0.4), #facc15);
}

.heat-bar.h-low::after {
    height: 25%;
    animation-delay: 1s;
    background: linear-gradient(to top, rgba(102, 252, 241, 0.4), var(--color-primary));
}

@keyframes heatPulse {
    0% {
        transform: scaleY(0.85);
        opacity: 0.7;
    }

    100% {
        transform: scaleY(1);
        opacity: 1;
        box-shadow: 0 -5px 20px currentColor;
        filter: brightness(1.2);
    }
}

/* 4. Algo Nodes (Smart Alerts) */
.algo-widget {
    position: relative;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.algo-widget::before {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 100%;
    height: 60%;
    background:
        linear-gradient(to right, transparent 48%, var(--color-primary-alpha) 50%, transparent 52%),
        linear-gradient(to top, transparent 48%, var(--color-primary-alpha) 50%, transparent 52%);
    background-size: 20px 20px;
    opacity: 0.3;
    z-index: 0;
}

.algo-widget::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 1px;
    background: dashed 1px var(--color-text-dim);
    z-index: 0;
}

.algo-chart-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.algo-chart-bg path {
    fill: none;
    stroke-linecap: round;
    opacity: 0.8;
}

.algo-chart-bg .ma-slow {
    stroke: var(--color-text-dim);
    stroke-width: 2;
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    animation: drawLines 3s ease-in-out infinite;
}

.algo-chart-bg .ma-fast {
    stroke: var(--color-primary);
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px var(--color-primary-alpha));
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    animation: drawLines 3s ease-in-out infinite;
}

@keyframes drawLines {
    0% {
        stroke-dashoffset: 120;
    }

    60%,
    100% {
        stroke-dashoffset: 0;
    }
}

.algo-node.trigger {
    width: 16px;
    height: 16px;
    background: #facc15;
    border-color: #facc15;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    animation: dotFlash 3s ease-in-out infinite;
    z-index: 10;
}

@keyframes dotFlash {

    0%,
    28% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
        box-shadow: none;
    }

    30% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
        box-shadow: 0 0 20px #facc15, 0 0 40px #facc15;
    }

    35%,
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
        box-shadow: 0 0 10px #facc15;
    }

    90%,
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
        box-shadow: none;
    }
}

/* 5. Shield (Intelligent Cooldowns) */
.shield-widget {
    position: relative;
    color: var(--color-primary);
}

.shield-widget span {
    font-size: 5rem;
    filter: drop-shadow(0 0 15px rgba(102, 252, 241, 0.4));
    animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(102, 252, 241, 0.3));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 25px rgba(102, 252, 241, 0.8));
    }
}

/* 6. Data Stream (Latency) */
.latency-widget {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--color-text-muted);
}

.latency-widget .server-node span {
    font-size: 2.5rem;
    color: var(--color-primary);
}

.data-stream {
    position: relative;
    width: 60px;
    height: 2px;
    background: rgba(102, 252, 241, 0.2);
}

.data-packet {
    position: absolute;
    top: -2px;
    left: 0;
    width: 15px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 3px;
    box-shadow: 0 0 10px var(--color-primary);
    opacity: 0;
    animation: beam 1.5s linear infinite;
}

.data-packet.p2 {
    animation-delay: 0.5s;
    background: #facc15;
    box-shadow: 0 0 10px #facc15;
}

.data-packet.p3 {
    animation-delay: 1.0s;
}

@keyframes beam {
    0% {
        left: 0%;
        opacity: 1;
        transform: scaleX(1);
    }

    90% {
        opacity: 1;
        transform: scaleX(2);
    }

    100% {
        left: 100%;
        opacity: 0;
        transform: scaleX(1);
    }
}

/* 7. Sync (Total Synchronization) */
.sync-widget {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    color: var(--color-text-muted);
}

.sync-widget span {
    font-size: 2.3rem;
    transition: color 0.3s;
}

.sync-widget span.sync-icon {
    animation: syncSpin 3s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    color: var(--color-primary);
    font-size: 2rem;
}

@keyframes syncSpin {
    100% {
        transform: rotate(360deg);
    }
}

/* 8. Indicators (Advanced Charting) */
.indicator-widget {
    position: relative;
    width: 120px;
    height: 80px;
    border-left: 2px solid var(--widget-border);
    border-bottom: 2px solid var(--widget-border);
}

.vwap-curve {
    position: absolute;
    width: 100%;
    height: 100%;
    border-right: 2px solid #facc15;
    border-top: 2px solid #facc15;
    border-radius: 0 100% 0 0;
    box-shadow: inset -2px 2px 10px rgba(250, 204, 21, 0.2);
    transform-origin: bottom left;
    animation: curveGrow 2s ease-out forwards;
}

.fib-chart-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.fib-chart-bg path {
    stroke: var(--color-primary);
    stroke-width: 2;
    fill: none;
    opacity: 0.3;
    stroke-dasharray: 4 4;
}

.fib-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    border-top: 2px dashed var(--color-primary);
    transform-origin: bottom;
    animation: fibRise 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    bottom: 0;
    opacity: 0;
}

.fib-lbl {
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(102, 252, 241, 0.4);
    margin-right: -45px;
    font-family: monospace;
    opacity: 0;
    animation: fibLblFade 2s ease-out forwards;
}

.fib-line.top {
    bottom: 76.4%;
    animation-delay: 0.6s;
}

.fib-line.mid {
    bottom: 50%;
    animation-delay: 0.4s;
}

.fib-line.bot {
    bottom: 38.2%;
    animation-delay: 0.2s;
}

.fib-line.top .fib-lbl {
    animation-delay: 0.6s;
}

.fib-line.mid .fib-lbl {
    animation-delay: 0.8s;
}

.fib-line.bot .fib-lbl {
    animation-delay: 1.0s;
}

@keyframes curveGrow {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fibRise {
    0% {
        transform: translateY(40px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fibGrow {
    0% {
        transform: scaleX(0);
    }

    100% {
        transform: scaleX(1);
    }
}

@keyframes fibLblFade {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 9. DeFi Dashboard Widget */
.defi-dashboard-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.defi-protocols {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.defi-proto {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--color-surface-1);
    border: 1px solid var(--widget-border);
    position: relative;
    overflow: hidden;
    min-width: 72px;
}

.defi-proto::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 252, 241, 0.08), transparent);
    animation: defiShimmer 3s ease-in-out infinite;
}

.defi-proto.aave::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #B6509E, #6C5CE7);
}

.defi-proto.kamino::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #14F195, #9945FF);
}

.proto-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.proto-val {
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 700;
    margin-top: 2px;
}

.defi-gauge {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.defi-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.defi-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 5;
}

.defi-ring-fill {
    fill: none;
    stroke: url(#defi-gradient);
    stroke: var(--color-primary);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 213.6;
    stroke-dashoffset: 213.6;
    animation: defiRingFill 2s ease-out forwards 0.5s;
    filter: drop-shadow(0 0 6px rgba(102, 252, 241, 0.5));
}

.defi-hf {
    position: absolute;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(102, 252, 241, 0.4);
}

.defi-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.7;
}

@keyframes defiRingFill {
    to {
        stroke-dashoffset: 38;
    }
}

@keyframes defiShimmer {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* 10. Rebalancing Pie Chart (Dynamic Rebalancing) */
.rebalance-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.rebalance-pie {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rebalance-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pie-slice {
    fill: transparent;
    stroke-width: 6;
    transition: all 1s ease-in-out;
}

.slice-btc {
    stroke: #F7931A;
    stroke-dasharray: 50 50;
    stroke-dashoffset: 0;
    animation: pieBTC 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.slice-eth {
    stroke: #627EEA;
    stroke-dasharray: 20 80;
    stroke-dashoffset: -50;
    animation: pieETH 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.slice-sol {
    stroke: #14F195;
    stroke-dasharray: 10 90;
    stroke-dashoffset: -70;
    animation: pieSOL 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.slice-usdt {
    stroke: #26A17B;
    stroke-dasharray: 10 90;
    stroke-dashoffset: -80;
    animation: pieUSDT 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.slice-alt {
    stroke: #eab308;
    stroke-dasharray: 10 90;
    stroke-dashoffset: -90;
    animation: pieALT 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.rebalance-icon {
    position: absolute;
    font-size: 1.8rem;
    color: var(--color-text);
    animation: rebalanceSpin 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.rebalance-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.leg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
}

.leg-dot:first-child {
    margin-left: 0;
}

/* Pie animations: imbalanced -> balanced (20% each) */
@keyframes pieBTC {

    0%,
    20% {
        stroke-dasharray: 50 50;
        stroke-dashoffset: 0;
    }

    80%,
    100% {
        stroke-dasharray: 20 80;
        stroke-dashoffset: 0;
    }
}

@keyframes pieETH {

    0%,
    20% {
        stroke-dasharray: 20 80;
        stroke-dashoffset: -50;
    }

    80%,
    100% {
        stroke-dasharray: 20 80;
        stroke-dashoffset: -20;
    }
}

@keyframes pieSOL {

    0%,
    20% {
        stroke-dasharray: 10 90;
        stroke-dashoffset: -70;
    }

    80%,
    100% {
        stroke-dasharray: 20 80;
        stroke-dashoffset: -40;
    }
}

@keyframes pieUSDT {

    0%,
    20% {
        stroke-dasharray: 10 90;
        stroke-dashoffset: -80;
    }

    80%,
    100% {
        stroke-dasharray: 20 80;
        stroke-dashoffset: -60;
    }
}

@keyframes pieALT {

    0%,
    20% {
        stroke-dasharray: 10 90;
        stroke-dashoffset: -90;
    }

    80%,
    100% {
        stroke-dasharray: 20 80;
        stroke-dashoffset: -80;
    }
}

@keyframes segReveal {
    from {
        opacity: 0;
        stroke-width: 0;
    }

    to {
        opacity: 1;
        stroke-width: 12;
    }
}

@keyframes rebalanceSpin {
    0% {
        transform: rotate(0deg);
        opacity: 0.5;
    }

    25% {
        opacity: 1;
    }

    50% {
        transform: rotate(360deg);
        opacity: 0.5;
    }

    100% {
        transform: rotate(360deg);
        opacity: 0.5;
    }
}

/* Stock ticker colors */
.asset-box.aapl::before {
    background: #A2AAAD;
    box-shadow: 0 0 10px #A2AAAD;
}

.asset-box.tsla::before {
    background: #CC0000;
    box-shadow: 0 0 10px #CC0000;
}

.asset-box.nvda::before {
    background: #76B900;
    box-shadow: 0 0 10px #76B900;
}

/* 7. Security Laser (Biometric) */
.security-widget {
    position: relative;
    display: inline-block;
    color: var(--color-primary-dim);
}

.security-widget span.material-symbols-outlined {
    font-size: 5rem;
    opacity: 0.7;
}

.security-laser {
    position: absolute;
    top: 0;
    left: -10%;
    width: 120%;
    height: 3px;
    background: #66fcf1;
    box-shadow: 0 0 10px #66fcf1, 0 0 20px #66fcf1;
    animation: scanLaser 2.5s ease-in-out infinite alternate;
}

@keyframes scanLaser {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .wl-card {
        padding: 1.5rem 1.25rem 1.25rem;
        margin: 0 0.5rem;
    }
}