:root {
    --color-bg: #09090b;
    --color-surface: rgba(24, 24, 27, 0.6);
    --color-surface-hover: rgba(39, 39, 42, 0.8);
    --color-text: #fafafa;
    --color-text-muted: #a1a1aa;
    --color-primary: #8b5cf6;
    --color-primary-glow: rgba(139, 92, 246, 0.5);
    --color-secondary: #06b6d4;
    --color-secondary-glow: rgba(6, 182, 212, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(20, 20, 25, 1) 0%, var(--color-bg) 100%);
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.glow-1 { top: -100px; left: -100px; background: var(--color-primary-glow); }
.glow-2 { bottom: -100px; right: -100px; background: var(--color-secondary-glow); animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 50px) scale(1.1); }
    100% { transform: translate(-50px, 100px) scale(0.9); }
}

/* Glassmorphism Utilities */
.glass {
    background: var(--color-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    transition: transform 0.2s ease;
}

.app-header__logo:hover {
    transform: scale(1.05);
}

.app-header__logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--color-primary);
}

.app-header__nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.app-header__nav-link {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-header__nav-link:hover, .app-header__nav-link.active {
    color: var(--color-text);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.app-header__nav-link.external {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-header__nav-link.external:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: var(--font-sans);
    transition: background 0.2s;
}

.lang-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* Layout */
.page-app__content {
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-app__container {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Typography */
.mono { font-family: var(--font-mono); }

/* Card */
.card {
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 40px -10px rgba(0,0,0,0.5);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 20px 40px -10px rgba(139, 92, 246, 0.2);
}

/* Swap Section */
.token-swapper__head {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.token-swapper__eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    font-weight: 700;
}

.token-swapper__title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.token-swapper__lede {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

.token-swapper__meta {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.token-swapper__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.token-swapper__meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.token-swapper__meta-row dt { color: var(--color-text-muted); font-size: 0.95rem; }
.token-swapper__meta-row dd { font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 8px; }

.network-badge {
    background: rgba(6, 182, 212, 0.15);
    color: var(--color-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.token-swapper__address {
    cursor: pointer;
    transition: color 0.2s;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    word-break: break-all;
    text-align: right;
}

.token-swapper__address:hover {
    color: var(--color-primary);
    background: rgba(139, 92, 246, 0.1);
}

/* Button & Glowing */
.btn {
    appearance: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.glowing-btn {
    position: relative;
    z-index: 1;
}

.glowing-btn::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #ff00cc, #3333ff, #ff00cc, #3333ff);
    background-size: 400%;
    z-index: -1;
    border-radius: calc(var(--radius-md) + 2px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.glowing-btn:hover::before {
    opacity: 1;
    animation: glowing 20s linear infinite;
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.glowing-btn:hover {
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
}

/* Swap Buttons Group */
.swap-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
}

.swap-buttons a {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* OKX Button Theme - Neon Glow */
.btn--okx {
    background: #050505;
    border: 1px solid #10b981;
    position: relative;
    overflow: hidden;
    animation: neonPulse 1.5s infinite alternate;
}

@keyframes neonPulse {
    from {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.2), inset 0 0 5px rgba(16, 185, 129, 0.1);
        border-color: rgba(16, 185, 129, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.7), inset 0 0 15px rgba(16, 185, 129, 0.4);
        border-color: rgba(16, 185, 129, 1);
    }
}

.btn--okx::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn--okx:hover::before {
    transform: translateX(100%);
}

.btn--okx:hover {
    transform: translateY(-3px);
}

.btn--okx .btn-title {
    background: linear-gradient(to right, #10b981, #6ee7b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 900;
}

.btn--okx .btn-subtitle {
    color: #6ee7b7;
    opacity: 0.8;
}

.btn--okx .btn-icon {
    color: #10b981;
    font-weight: bold;
}

/* Uniswap Button Theme */
.btn--uniswap {
    background: rgba(255, 0, 122, 0.08);
    border: 1px solid rgba(255, 0, 122, 0.2);
}

.btn--uniswap:hover {
    background: rgba(255, 0, 122, 0.15);
    border-color: rgba(255, 0, 122, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 0, 122, 0.15);
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.btn-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.btn-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    font-family: var(--font-mono);
}

.btn--uniswap .btn-title {
    color: #ff007a;
}

.btn-icon {
    font-size: 1.5rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.swap-buttons a:hover .btn-icon {
    transform: translateX(5px);
    opacity: 1;
}

.btn--primary:active { transform: translateY(0); }
.btn--lg { padding: 1.25rem 2rem; font-size: 1.1rem; }
.btn--full { width: 100%; }

/* Stats Section */
.stats-container {
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
}

.stat-card {
    flex: 1;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--color-primary);
}

/* Hook Transparency */
.hook-flags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.hook-feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hook-feature-card:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-3px);
}

.hook-feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hook-feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.hook-feature-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.hook-feature-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* NFTs Section */
.nft-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nft-gallery__head { text-align: center; }
.nft-gallery__head h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.nft-gallery__head p { color: var(--color-text-muted); }

.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.nft-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.nft-card:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.5);
    z-index: 10;
}

.nft-card img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: var(--radius-sm);
    background: #111;
    pointer-events: none;
    object-fit: cover;
} /* so click hits the card */

.nft-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    position: relative;
    padding: 2rem;
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none; color: white;
    font-size: 1.5rem; cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.modal-image-container canvas {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-rarity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.modal-rarity.epic { background: rgba(236, 72, 153, 0.2); color: #f472b6; border-color: rgba(236, 72, 153, 0.4); }
.modal-rarity.legendary { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); }

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-success, #22c55e);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.4);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
}

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

/* Responsive */
@media (max-width: 768px) {
    html {
        font-size: 12px; /* Decreases scale to 0.75 */
    }

    .app-header__container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .app-header__nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .app-header__nav-link {
        font-size: 0.85rem;
    }

    .card {
        padding: 2rem 1.5rem;
    }

    .token-swapper__title {
        font-size: 2.2rem;
    }

    .token-swapper__meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .token-swapper__address {
        max-width: 100%;
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .hook-feature-card {
        padding: 1.25rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a; 
}
::-webkit-scrollbar-thumb {
    background: #3b82f6; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #10b981; 
}
