/* ================================================
   insider.trading - cypherpunk minimal
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --bg: #000;
    --bg-card: #0a0a0a;
    --border: #1a1a1a;
    --border-focus: #00ff00;
    --text: #fff;
    --text-dim: #666;
    --accent: #00ff00;
    --accent-dim: #003300;
    --error: #ff3333;
    --warning: #ffaa00;
    --font: 'JetBrains Mono', monospace;
    --header-h: 56px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; border: none; outline: none; background: none; }

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ================================================
   Header
   ================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-dim);
    transition: color 0.15s;
}

.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.network-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 12px;
    transition: border-color 0.15s;
}

.network-btn:hover { border-color: var(--text-dim); }

.network-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.chevron {
    width: 12px;
    height: 12px;
}

.connect-wallet-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--bg);
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.15s;
}

.connect-wallet-btn:hover { opacity: 0.8; }

.wallet-icon {
    width: 16px;
    height: 16px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 18px;
    height: 2px;
    background: var(--text);
}

/* ================================================
   Main
   ================================================ */
.main {
    padding-top: var(--header-h);
    min-height: 100vh;
}

/* ================================================
   Swap Section
   ================================================ */
.swap-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px;
    min-height: calc(100vh - var(--header-h));
}

.swap-container {
    width: 100%;
    max-width: 420px;
}

.swap-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
}

.swap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.swap-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-btn {
    padding: 6px;
    color: var(--text-dim);
    transition: color 0.15s;
}

.settings-btn:hover { color: var(--text); }
.settings-btn svg { width: 18px; height: 18px; }

/* Settings Panel */
.settings-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.settings-panel.active { display: flex; }

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-label {
    font-size: 12px;
    color: var(--text-dim);
}

.slippage-options {
    display: flex;
    gap: 4px;
}

.slippage-btn {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: all 0.15s;
}

.slippage-btn:hover { border-color: var(--text-dim); }
.slippage-btn.active {
    border-color: var(--accent);
    color: var(--accent);
}

.slippage-input {
    width: 60px;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border);
    color: var(--text);
    text-align: right;
}

.slippage-input:focus { border-color: var(--accent); }

.deadline-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

.deadline-input {
    width: 50px;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border);
    color: var(--text);
    text-align: center;
}

.deadline-input:focus { border-color: var(--accent); }

/* Token Input */
.token-input-container {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 4px;
}

.token-input-container:focus-within {
    border-color: var(--accent);
}

.token-input-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.token-input-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-balance {
    font-size: 11px;
    color: var(--text-dim);
}

.token-input-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.token-amount-input {
    flex: 1;
    font-size: 24px;
    font-weight: 500;
    color: var(--text);
    min-width: 0;
}

.token-amount-input::placeholder { color: var(--text-dim); }

.token-amount-input::-webkit-outer-spin-button,
.token-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.token-select-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}

.token-select-btn:hover { background: #222; }

.token-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.token-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.token-usd-value {
    font-size: 12px;
    color: var(--text-dim);
}

.quick-amount-btns {
    display: flex;
    gap: 4px;
}

.quick-btn {
    padding: 2px 6px;
    font-size: 10px;
    color: var(--text-dim);
    border: 1px solid transparent;
    transition: all 0.15s;
}

.quick-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Swap Direction */
.swap-direction-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    margin: -12px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    transition: all 0.15s;
}

.swap-direction-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.swap-direction-btn svg {
    width: 16px;
    height: 16px;
}

/* Swap Details */
.swap-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.swap-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
}

.detail-label { color: var(--text-dim); }
.detail-value { color: var(--text); }
.detail-value.positive { color: var(--accent); }
.detail-value.negative { color: var(--error); }

/* Swap Button */
.swap-btn {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    background: var(--accent);
    color: var(--bg);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.15s;
}

.swap-btn:hover { opacity: 0.8; }

.swap-btn:disabled {
    background: var(--border);
    color: var(--text-dim);
    cursor: not-allowed;
    opacity: 1;
}

/* Route Card */
.route-card {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.route-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.route-title svg {
    width: 14px;
    height: 14px;
}

.route-path {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.route-token {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.route-token img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.route-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-dim);
}

.route-pool {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg);
    font-size: 11px;
}

.pool-name { color: var(--text); }
.pool-fee { color: var(--accent); }

/* ================================================
   Footer
   ================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 12px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    font-size: 12px;
    color: var(--text-dim);
    transition: color 0.15s;
}

.footer-link:hover { color: var(--text); }

.copyright {
    font-size: 11px;
    color: var(--text-dim);
}

/* ================================================
   Modals
   ================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-sm { max-width: 360px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-close {
    padding: 4px;
    color: var(--text-dim);
    transition: color 0.15s;
}

.modal-close:hover { color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }

.modal-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-dim);
}

.modal-search-input {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.modal-search-input::placeholder { color: var(--text-dim); }

.common-tokens {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.common-tokens-label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.common-tokens-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.common-token-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text);
    transition: border-color 0.15s;
}

.common-token-btn:hover { border-color: var(--accent); }
.common-token-btn img { width: 16px; height: 16px; border-radius: 50%; }

.token-list {
    flex: 1;
    overflow-y: auto;
}

.token-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.token-list-item:hover { background: var(--bg); }

.token-list-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.token-list-info {
    flex: 1;
}

.token-list-symbol {
    font-size: 14px;
    font-weight: 600;
}

.token-list-name {
    font-size: 12px;
    color: var(--text-dim);
}

.token-list-balance {
    text-align: right;
}

.token-list-amount {
    font-size: 14px;
}

.token-list-usd {
    font-size: 12px;
    color: var(--text-dim);
}

/* Network Modal */
.network-list {
    padding: 8px;
}

.network-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.network-item:hover { background: var(--bg); }
.network-item.active { background: var(--accent-dim); }

.network-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.network-item-name {
    flex: 1;
    font-size: 14px;
}

.network-item-check {
    width: 16px;
    height: 16px;
    color: var(--accent);
    opacity: 0;
}

.network-item.active .network-item-check { opacity: 1; }

/* Wallet Modal */
.wallet-list {
    padding: 8px;
}

.wallet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.wallet-item:hover { background: var(--bg); }

.wallet-item img {
    width: 32px;
    height: 32px;
}

.wallet-item-name {
    flex: 1;
    font-size: 14px;
}

.wallet-disclaimer {
    padding: 12px 16px;
    font-size: 11px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* ================================================
   Auth Modal Styles
   ================================================ */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    width: 90%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.auth-modal-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-modal-close {
    padding: 4px;
    color: var(--text-dim);
}

.auth-modal-close:hover { color: var(--text); }
.auth-modal-close svg { width: 18px; height: 18px; }

.auth-modal-body { padding: 20px 16px; }

.auth-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
}

.auth-option:hover {
    border-color: var(--accent);
}

.auth-option-icon {
    width: 32px;
    height: 32px;
}

.auth-option-text {
    flex: 1;
}

.auth-option-title {
    font-size: 14px;
    font-weight: 600;
    display: block;
}

.auth-option-desc {
    font-size: 11px;
    color: var(--text-dim);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-email-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-input {
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--text-dim); }

.auth-submit-btn {
    padding: 14px;
    background: var(--accent);
    color: var(--bg);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-submit-btn:hover { opacity: 0.8; }

.auth-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
}

/* ================================================
   Mobile Menu
   ================================================ */
.mobile-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 999;
    padding: 20px;
    display: none;
    flex-direction: column;
}

.mobile-menu.active { display: flex; }

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-link {
    padding: 12px;
    font-size: 16px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}

.mobile-nav-link.active { color: var(--accent); }

.mobile-wallet-btn {
    margin-top: auto;
}

/* ================================================
   Terminal Effect Text
   ================================================ */
.terminal-cursor::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 768px) {
    .nav { display: none; }
    .network-btn { display: none; }
    .mobile-menu-btn { display: flex; }

    .swap-section {
        padding: 40px 16px;
    }

    .swap-card {
        padding: 16px;
    }

    .token-amount-input {
        font-size: 20px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ================================================
   Scrollbar
   ================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* ================================================
   Gradient Text (minimal usage)
   ================================================ */
.gradient-text {
    color: var(--accent);
}

/* Legacy support classes */
.hero, .hero-bg, .hero-glow, .hero-glow-1, .hero-glow-2, .hero-content,
.hero-title, .hero-subtitle, .hero-stats, .pools-section, .tokens-section,
.stats-section, .cta-section, .footer-top, .footer-desc, .social-links,
.social-link, .footer-links-column, .footer-links-title, .footer-bottom,
.footer-bottom-links, .footer-bottom-link, .section-container, .section-header,
.section-title, .section-subtitle, .primary-btn, .pools-table-container,
.pools-table, .tokens-grid, .stats-grid, .stat-card, .stat-card-icon,
.stat-card-value, .stat-card-label, .stat-card-change, .cta-container,
.cta-content, .cta-title, .cta-text, .cta-btn, .search-container, .search-input,
.stat, .stat-value, .stat-label {
    display: none !important;
}
