/* ========================================
   EVENT TRADER - Prediction Market UI
   ======================================== */

:root {
    /* Color System - Dark Blue/Cyan Theme (Event Map Style) */
    --bg-primary: #0a0e17;
    --bg-secondary: #0d1520;
    --bg-tertiary: #111a28;
    --bg-panel: rgba(12, 18, 30, 0.85);
    --accent-cyan: #00d4ff;
    --accent-glow: #00a8cc;
    --accent-lime: #00ff88;
    --accent-pink: #ff4466;
    --accent-blue: #00d4ff;
    --accent-gold: #ffd700;
    --accent-purple: #aa55ff;
    --accent-orange: #ff8844;
    --text-primary: #e0e6ed;
    --text-secondary: #6b7a8f;
    --text-dim: #3d4a5c;
    --border-color: rgba(0, 212, 255, 0.15);
    --border-glow: rgba(0, 212, 255, 0.3);

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-display: 'Archivo Black', sans-serif;
    --font-body: 'Inter', 'Outfit', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Effects */
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.5);
    --glow-lime: 0 0 20px rgba(0, 255, 136, 0.5);
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.5);
    --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* ========================================
   RESET & BASE
   ======================================== */

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

/* Global mobile overflow fix - prevents horizontal scroll on all pages */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-mono);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    max-width: 100vw;
}

/* Scanline Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

/* ========================================
   HEADER
   ======================================== */

.terminal-header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent-cyan);
    padding: var(--spacing-md) var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-lg);
    max-width: 1600px;
    margin: 0 auto;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.terminal-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.glitch {
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
        opacity: 1;
    }
    91% {
        transform: translate(-2px, 2px);
        opacity: 0.8;
    }
    93% {
        transform: translate(2px, -2px);
        opacity: 0.9;
    }
    95% {
        transform: translate(-1px, 1px);
        opacity: 0.85;
    }
}

.futures {
    color: var(--accent-lime);
    font-size: 0.9em;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan);
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.status-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.2em;
}

.header-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    justify-items: end;
}

.stat-block {
    text-align: right;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-lime);
    text-shadow: var(--glow-lime);
    font-family: var(--font-mono);
}

/* Wallet Section */
.wallet-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(0, 100, 200, 0.25));
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 8px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 157, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.wallet-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.4), rgba(0, 100, 200, 0.4));
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.wallet-icon {
    font-size: 1.2rem;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    box-shadow: var(--glow-cyan);
}

.wallet-address {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    letter-spacing: 0.05em;
}

.wallet-disconnect {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.wallet-disconnect:hover {
    color: var(--accent-pink);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.terminal-main {
    max-width: 1400px;
    margin: var(--spacing-xl) auto;
    padding: 0 var(--spacing-lg);
}

/* ========================================
   NAVIGATION
   ======================================== */

.terminal-nav {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    position: relative;
    border-bottom: 1px solid var(--bg-tertiary);
}

.nav-tab {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tab:hover {
    color: var(--accent-cyan);
}

.nav-tab.active {
    color: var(--accent-cyan);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* ========================================
   SECTIONS
   ======================================== */

.view-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.bracket {
    color: var(--accent-cyan);
    font-weight: normal;
}

.filter-controls {
    display: flex;
    gap: var(--spacing-sm);
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--text-dim);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.filter-btn.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: var(--bg-primary);
}

/* ========================================
   MARKETS GRID
   ======================================== */

.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--spacing-lg);
}

.market-card {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.market-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-cyan);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.market-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.market-card:hover::before {
    transform: scaleY(1);
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-sm);
}

.market-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.market-status {
    font-size: 0.65rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    letter-spacing: 0.15em;
    font-weight: 700;
}

.market-status.pending {
    background: rgba(255, 165, 0, 0.1);
    border-color: orange;
    color: orange;
}

.market-status.completed {
    background: rgba(128, 128, 128, 0.1);
    border-color: gray;
    color: gray;
}

.market-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.market-assets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}

.asset-tag {
    padding: 0.35rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--text-dim);
    color: var(--accent-lime);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.market-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--bg-tertiary);
}

.stat-item {
    text-align: center;
}

.stat-item-label {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.stat-item-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-lime);
}

/* Market Expiration Display */
.market-expiration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin: 0.75rem 0;
    background: rgba(0, 212, 255, 0.05);
    border-left: 2px solid var(--accent-blue);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.expiration-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.expiration-text {
    flex: 1;
}

/* Time urgency states */
.market-expiration.time-safe {
    background: rgba(0, 255, 157, 0.05);
    border-left-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.market-expiration.time-warning {
    background: rgba(255, 193, 7, 0.05);
    border-left-color: #ffc107;
    color: #ffc107;
}

.market-expiration.time-critical {
    background: rgba(255, 0, 106, 0.1);
    border-left-color: var(--accent-pink);
    color: var(--accent-pink);
    animation: pulse-glow 2s ease-in-out infinite;
}

.market-expiration.expired {
    background: rgba(74, 85, 104, 0.1);
    border-left-color: var(--text-dim);
    color: var(--text-dim);
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px rgba(255, 0, 106, 0.3);
    }
    50% {
        opacity: 0.85;
        box-shadow: 0 0 10px rgba(255, 0, 106, 0.5);
    }
}

@keyframes price-up {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(0, 255, 157, 0.2);
        transform: scale(1.05);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes price-down {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(255, 0, 106, 0.2);
        transform: scale(1.05);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* ========================================
   FORMS
   ======================================== */

.terminal-form {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    padding: var(--spacing-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.span-2 {
    grid-column: span 2;
}

.form-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.terminal-input,
.terminal-select {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.terminal-input:focus,
.terminal-select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

textarea.terminal-input {
    resize: vertical;
    min-height: 80px;
}

/* ========================================
   BUTTONS
   ======================================== */

.terminal-btn {
    position: relative;
    padding: 1rem 2rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.terminal-btn.primary {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.terminal-btn:hover {
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* ========================================
   PRICES GRID
   ======================================== */

.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.price-card {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
}

.price-card:hover {
    border-color: var(--accent-cyan);
}

.price-asset {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-lime);
    text-shadow: var(--glow-lime);
}

.price-change {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.price-change.up {
    color: var(--accent-lime);
}

.price-change.down {
    color: var(--accent-pink);
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-cyan);
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-deep), var(--glow-cyan);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-cyan);
}

/* ========================================
   LOADING
   ======================================== */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--accent-cyan);
    padding: var(--spacing-md);
    min-width: 300px;
    box-shadow: var(--shadow-deep), var(--glow-cyan);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-color: var(--accent-lime);
}

.toast.error {
    border-color: var(--accent-pink);
}

/* ========================================
   QUICK BET BUTTONS
   ======================================== */

.quick-trade-btn {
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--text-dim);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-trade-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 255, 157, 0.1);
}

.quick-trade-btn.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: var(--bg-primary);
    box-shadow: var(--glow-cyan);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .header-grid {
        grid-template-columns: 1fr;
    }

    .header-stats {
        justify-items: start;
    }

    /* Fix mobile horizontal scroll - wrap nav buttons */
    .wallet-section {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .wallet-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-height: 44px;  /* iOS touch target minimum */
    }

    .wallet-btn .wallet-text {
        display: none;  /* Hide text on small screens, show only icon */
    }

    .wallet-btn .wallet-icon {
        margin: 0;
    }

    .markets-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.span-2 {
        grid-column: span 1;
    }

    /* Ensure body doesn't overflow */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Fix terminal header on mobile */
    .terminal-header {
        padding: 0.5rem;
    }

    .terminal-header .header-grid {
        gap: 0.5rem;
    }
}

/* Even smaller screens - show 2 columns of buttons */
@media (max-width: 480px) {
    .wallet-section {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        width: 100%;
    }

    .wallet-btn {
        justify-content: center;
        padding: 0.5rem;
        min-width: 44px;
        min-height: 44px;
    }

    #authSection {
        grid-column: span 4;
        justify-content: center;
    }
}

/* ========================================
   GLOBAL MOBILE OVERFLOW FIX
   Prevents horizontal scroll on ALL pages
   ======================================== */

@media (max-width: 768px) {
    /* Global overflow prevention */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }

    /* Ensure all main containers respect viewport */
    main,
    .container,
    .terminal-main,
    .content,
    .page-content,
    .wrapper,
    section,
    article {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Fix any elements with fixed widths */
    img, video, iframe, embed, object {
        max-width: 100%;
        height: auto;
    }

    /* Fix pre/code blocks that may overflow */
    pre, code {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    /* Fix tables */
    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    /* Fix long text/links */
    a, p, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Fix grid containers that may overflow */
    .markets-grid,
    .prices-grid,
    .form-grid {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix any absolute positioned elements */
    .toast-container {
        right: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }

    /* Ensure modal doesn't overflow */
    .modal-content {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
    }

    /* Fix header on small screens */
    .terminal-header {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Ensure touch targets meet iOS minimum (44x44px) */
    button,
    a.btn,
    .wallet-btn,
    .terminal-btn,
    .nav-tab,
    .filter-btn,
    [role="button"],
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ========================================
   ORDER BOOK STYLES
   ======================================== */

.order-book {
    font-family: var(--font-mono);
    margin: 1rem 0;
}

.order-book-side {
    background: var(--bg-tertiary);
    border: 1px solid var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
}

.order-book-table {
    margin-top: 0.5rem;
}

.order-book-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--bg-secondary);
    margin-bottom: 0.25rem;
}

.order-book-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.85rem;
    transition: background 0.2s ease;
    border-radius: 4px;
}

.order-book-row:hover {
    background: rgba(0, 255, 157, 0.05);
}

.bid-row {
    border-left: 2px solid var(--accent-lime);
}

.ask-row {
    border-left: 2px solid var(--accent-pink);
}

.order-price {
    font-weight: 700;
    color: var(--text-primary);
}

.bid-price {
    color: var(--accent-lime);
}

.ask-price {
    color: var(--accent-pink);
}

.order-size {
    text-align: right;
    color: var(--text-secondary);
}

.order-count {
    text-align: right;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ==========================================================================
   Corporate Footer Styles
   ========================================================================== */

.site-footer {
    background: linear-gradient(to bottom, #111722, #0a0e14);
    border-top: 1px solid rgba(0, 255, 157, 0.3);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.6;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Footer Brand Section */
.footer-brand {
    padding-right: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.footer-logo .logo-event {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.5rem;
    color: var(--accent-cyan);
    letter-spacing: 2px;
}

.footer-logo .logo-trader {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.footer-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-lime);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.footer-description {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 300px;
}

/* Footer Links Section */
.footer-links {
    padding-left: 1rem;
}

.footer-heading {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
    position: relative;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-cyan);
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.75rem;
}

.footer-link {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

/* Footer Social Section */
.footer-social {
    padding-left: 1rem;
}

.footer-social-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 160px;
}

.social-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 35, 50, 0.6);
    border: 1px solid rgba(0, 255, 157, 0.15);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon svg {
    transition: transform 0.3s ease;
}

.social-icon:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 255, 157, 0.05);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
    transform: translateY(-3px);
}

.social-icon:hover svg {
    transform: scale(1.1);
}

/* Footer Bottom */
.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-copyright {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* Footer Responsive Styles */
@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 2;
        padding-right: 0;
        text-align: center;
    }

    .footer-description {
        max-width: none;
        margin: 0 auto;
    }

    .footer-links,
    .footer-social {
        padding-left: 0;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 600px) {
    .site-footer {
        padding: 2.5rem 1.5rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-nav li {
        margin-bottom: 0.5rem;
    }

    .footer-social-icons {
        margin: 0 auto;
    }
}

/* ===== MARKET REACTIONS (Like/Dislike) ===== */
.market-reactions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-tertiary);
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--bg-tertiary);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.05);
}

.reaction-btn .reaction-icon {
    width: 16px;
    height: 16px;
    transition: all 0.2s ease;
}

/* Like button active state */
.reaction-btn.like-btn.active {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
    background: rgba(255, 0, 128, 0.1);
}

.reaction-btn.like-btn.active .reaction-icon {
    fill: var(--accent-pink);
    stroke: var(--accent-pink);
}

.reaction-btn.like-btn:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

/* Dislike button active state */
.reaction-btn.dislike-btn.active {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
    background: rgba(255, 208, 0, 0.1);
}

.reaction-btn.dislike-btn.active .reaction-icon {
    fill: var(--accent-yellow);
    stroke: var(--accent-yellow);
}

.reaction-btn.dislike-btn:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

/* Share button */
.reaction-btn.share-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Feedback button */
.reaction-btn.feedback-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

.reaction-count {
    font-weight: 600;
    min-width: 1ch;
}

/* Animation for like/dislike */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.reaction-btn.active .reaction-icon {
    animation: heartBeat 0.4s ease;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .market-reactions {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .reaction-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }

    .reaction-btn .reaction-icon {
        width: 14px;
        height: 14px;
    }

    .reaction-btn.share-btn span:last-child {
        display: none;
    }
}

/* ========================================
   MOBILE HAMBURGER MENU
   ======================================== */

/* Hamburger button - hidden by default, shown on mobile */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.mobile-menu-toggle:focus {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Hamburger icon lines */
.hamburger-icon {
    width: 20px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* Mobile menu panel */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    padding-top: 70px;
}

.mobile-menu.active {
    right: 0;
}

/* Mobile menu items */
.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-nav a,
.mobile-menu-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav button:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.mobile-menu-nav .menu-icon {
    font-size: 18px;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 0;
}

.mobile-menu-section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 0;
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-overlay,
    .mobile-menu {
        display: block;
    }

    /* Adjust header for mobile menu */
    .terminal-header .header-grid {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Hide wallet section on mobile (it goes in hamburger menu) */
    .terminal-header .wallet-section {
        display: none !important;
    }

    /* Hide header stats on very small screens */
    .terminal-header .header-stats {
        display: none;
    }

    /* Keep logo visible */
    .terminal-header .logo-section {
        flex-shrink: 0;
    }
}

/* Smaller mobile - even more compact */
@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        right: -100%;
    }

    .mobile-menu.active {
        right: 0;
    }
}
