/* ============================================================
   Gallery of Babel: Styles
   Built from static/css_parts, edit parts then run python apps/gallery_of_babel/build_css.py
   ============================================================ */

:root {
    --bg-deep: #0a0a0c;
    --bg-surface: #12121a;
    --bg-elevated: #1a1a24;
    --bg-card: #1e1e28;
    
    --text-primary: #e8e6e3;
    --text-secondary: #8a8a9a;
    --text-muted: #5a5a6a;
    
    --accent-warm: #e07850;
    --accent-warm-dim: #c06040;
    --accent-cool: #6088d0;
    --accent-success: #50c878;
    --accent-gold: #d4a850;
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-dim: rgba(255, 255, 255, 0.1);
    
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(224, 120, 80, 0.15);
    
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --transition-fast: 150ms ease;
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
}

body {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-deep);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Part 01: Animated background pattern and navigation (source in css_parts, build to app.css) */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(96, 136, 208, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 90% 80%, rgba(224, 120, 80, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-deep) 0%, #0d0d12 100%);
}

/* Navigation */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 700px) {
    .top-nav {
        padding: 10px 14px;
    }

    .nav-back {
        font-size: 12px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 12px;
    }
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.nav-back:hover {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-link-accent {
    background: var(--accent-warm);
    color: #fff;
}

.nav-link-accent:hover {
    background: var(--accent-warm-dim);
    color: #fff;
}

.nav-link-x {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
}

.nav-link-x svg {
    flex-shrink: 0;
}

.nav-link-x-text {
    white-space: nowrap;
}

.nav-link-x:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

/* Hide non-essential links on very small screens, but keep Membership and X link */
@media (max-width: 420px) {
    .nav-link:not(.nav-link-accent):not(.nav-link-x):not(:nth-child(3)) {
        display: none;
    }
    
    .nav-link-accent {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .nav-link-x {
        padding: 6px 10px;
        gap: 4px;
    }
    
    .nav-link-x-text {
        display: none;
    }
    
    .nav-link-x svg {
        width: 16px;
        height: 16px;
    }
}

/* Part 02: Main content, header, controls, how-it-works (source in css_parts, build to app.css) */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 32px 48px;
}

@media (max-width: 700px) {
    .main-content {
        padding: 16px 14px 20px;
    }
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 32px;
}

.app-title {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-shadow: 0 0 60px rgba(224, 120, 80, 0.2);
}

.app-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

@media (max-width: 700px) {
    .app-title {
        font-size: 36px;
        margin-bottom: 8px;
    }

    .app-subtitle {
        font-size: 12px;
        line-height: 1.55;
        max-width: 520px;
    }
}

/* Controls section */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

@media (min-width: 901px) {
    .controls-section {
        display: grid;
        grid-template-columns: 1fr auto 1fr; /* Symmetric layout: Buttons | Counter | Stats */
        align-items: center;
        gap: 32px;
        justify-content: initial;
    }

    .controls {
        grid-column: 1;
        justify-self: start;
    }

    .global-counter {
        grid-column: 2;
        justify-self: center;
        margin: 0 auto;
    }

    .stats {
        grid-column: 3;
        justify-self: end;
        display: flex;
        flex-wrap: nowrap;
        min-width: 0;
    }
}

@media (max-width: 700px) {
    .controls-section {
        gap: 12px;
        margin-bottom: 16px;
        padding: 12px 14px;
    }

    .controls {
        gap: 10px;
        flex-wrap: wrap;
    }

    .btn {
        padding: 10px 16px;
    }
}

/* How it Works page */
.how-works-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 32px 64px;
}

.how-header {
    text-align: center;
    margin-bottom: 64px;
}

.how-title {
    font-family: var(--font-serif);
    font-size: 56px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-shadow: 0 0 60px rgba(224, 120, 80, 0.2);
}

.how-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.how-sections {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.how-section {
    position: relative;
    padding-left: 80px;
}

@media (max-width: 700px) {
    .how-section {
        padding-left: 60px;
    }
}

.section-number {
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-warm);
    opacity: 0.6;
    letter-spacing: 0.1em;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.3;
}

.section-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.section-content p {
    margin-bottom: 16px;
}

.section-content p:last-child {
    margin-bottom: 0;
}

.section-content strong {
    color: var(--text-primary);
    font-weight: 500;
}

.subsection-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
}

.subsection-title:first-child {
    margin-top: 0;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.feature-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-warm);
    font-weight: 500;
}

.note-box {
    margin-top: 24px;
    padding: 16px 20px;
    background: rgba(224, 120, 80, 0.08);
    border-left: 3px solid var(--accent-warm);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.highlight-section {
    padding: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-left: -32px;
    margin-right: -32px;
}

@media (max-width: 700px) {
    .highlight-section {
        margin-left: -16px;
        margin-right: -16px;
        padding: 24px;
    }
}

.cta-section {
    margin-top: 80px;
    padding: 48px 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-align: center;
}

.cta-title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cta-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent-warm);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 16px rgba(224, 120, 80, 0.3);
}

.cta-button:hover {
    background: var(--accent-warm-dim);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 120, 80, 0.4);
}

.controls {
    display: flex;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-start {
    background: var(--accent-warm);
    color: #fff;
    box-shadow: 0 4px 16px rgba(224, 120, 80, 0.3);
}

.btn-start:hover:not(:disabled) {
    background: var(--accent-warm-dim);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(224, 120, 80, 0.4);
}

.btn-stop {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-dim);
}

.btn-stop:hover:not(:disabled) {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Part 03: Global generation counter (source in css_parts, build to app.css) */
.global-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: linear-gradient(135deg, rgba(126, 184, 201, 0.1), rgba(224, 120, 80, 0.1));
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    min-width: 280px; /* Locked width to handle 11+ billion digits without resizing */
}

.global-counter-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.global-counter-value {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 500;
    color: var(--accent-cool);
    letter-spacing: 0.02em;
    transition: transform 0.1s ease, color 0.2s ease;
    text-shadow: 0 0 20px rgba(96, 136, 208, 0.3);
}

.global-counter-value.tick {
    transform: translateY(-2px);
    color: var(--accent-warm);
}

/* Global IPS Styles */
.global-ips {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--accent-cool);
    opacity: 0;
    margin-top: 4px;
    height: 1.2em;
    transition: opacity 0.5s ease;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-ips.calculating {
    animation: ips-pulse 2s infinite ease-in-out;
    color: var(--text-muted);
}

@keyframes ips-pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

.global-ips .ips-value {
    color: var(--accent-gold);
    font-weight: 500;
}

@media (max-width: 768px) {
    .global-counter {
        min-width: 180px;
        padding: 10px 20px;
    }
    
    .global-counter-value {
        font-size: 24px; /* Reduced to fit 11+ billion digits */
    }
}

@media (max-width: 700px) {
    .stats {
        gap: 16px;
    }

    .stat-value {
        font-size: 16px;
    }
}

.stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

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

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.stat-value {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

.stat-highlight .stat-value {
    color: var(--accent-gold);
}

.status-running {
    color: var(--accent-success) !important;
}

.status-paused {
    color: var(--text-secondary) !important;
}
/* Part 04: Grids and grid cells (source in css_parts, build to app.css) */
.grids-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 1100px) {
    .grids-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .grids-container {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 18px;
    }

    .grid-panel {
        padding: 14px;
    }

    .panel-header {
        margin-bottom: 12px;
    }

    .panel-title {
        font-size: 16px;
    }

    .panel-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

@media (max-width: 360px) {
    .grids-container {
        grid-template-columns: 1fr;
    }
}

/* Grid panel */
.grid-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
}

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

.panel-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
}

.panel-badge {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 100px;
}

.panel-badge.local {
    background: rgba(96, 136, 208, 0.15);
    color: var(--accent-cool);
}

.panel-badge.global {
    background: rgba(224, 120, 80, 0.15);
    color: var(--accent-warm);
}

/* Image grid (5x2) */
.image-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

@media (max-width: 700px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

@media (max-width: 420px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Grid cell */
.grid-cell {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-deep);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-smooth);
}

.grid-cell.empty {
    opacity: 0.5;
}

.grid-cell.has-image {
    opacity: 1;
}

.grid-cell.has-image:hover {
    transform: scale(1.02);
    border-color: var(--border-dim);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.grid-cell.updated {
    animation: cell-highlight 0.5s ease-out;
}

@keyframes cell-highlight {
    0% {
        box-shadow: 0 0 0 2px var(--accent-warm), var(--shadow-glow);
    }
    100% {
        box-shadow: none;
    }
}

.cell-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
}

.cell-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    font-size: 10px;
}

@media (max-width: 700px) {
    .cell-info {
        padding: 3px 5px;
        font-size: 9px;
    }
}

.cell-rank {
    color: var(--text-muted);
    font-weight: 500;
}

.cell-score {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Part 05: Footer and notifications (source in css_parts, build to app.css) */
.app-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.app-footer p {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Notification toast */
.notification {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transition: all var(--transition-smooth);
    z-index: 1000;
}

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

.notification.success {
    border-color: var(--accent-success);
    box-shadow: 0 0 20px rgba(80, 200, 120, 0.2);
}

.notification.global {
    border-color: var(--accent-warm);
    box-shadow: 0 0 20px rgba(224, 120, 80, 0.3);
}

/* Part 06: Image modal and profile base styles (source in css_parts, build to app.css) */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.image-modal.show {
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    z-index: 1;
    width: min(980px, 92vw);
    max-height: 92vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform var(--transition-smooth);
}

.image-modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-dim);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-image-container {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    min-height: 300px;
}

.modal-canvas {
    /* Canvas is 128x128, CSS scales it up for display */
    width: min(512px, 80vw);
    height: min(512px, 80vw);
    image-rendering: pixelated;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: var(--bg-deep);
}

.modal-info {
    padding: 24px 32px;
    border-top: 1px solid var(--border-subtle);
}

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

.modal-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
}

.modal-badge {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 100px;
}

.modal-badge.local {
    background: rgba(96, 136, 208, 0.15);
    color: var(--accent-cool);
}

.modal-badge.global {
    background: rgba(224, 120, 80, 0.15);
    color: var(--accent-warm);
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .modal-details {
        grid-template-columns: 1fr;
    }
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-card);
}

/* Selection */
::selection {
    background: rgba(224, 120, 80, 0.3);
    color: var(--text-primary);
}

/* User Profile Bar */
.user-profile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-gold));
    border-radius: 50%;
    color: #fff;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.user-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-x-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.user-x-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(29, 161, 242, 0.15);
    border-radius: 4px;
    color: #1da1f2;
    font-size: 11px;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.user-x-badge:hover {
    background: rgba(29, 161, 242, 0.25);
    color: #1da1f2;
}

.user-x-hint {
    font-size: 9px;
    color: var(--text-muted);
    font-style: italic;
    white-space: nowrap;
}

/* Part 07: X link button and X profile modal (source in css_parts, build to app.css) */
.link-x-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #1a1a24, #0d0d14);
    border: 1px solid rgba(29, 161, 242, 0.4);
    border-radius: 6px;
    color: #1da1f2;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.link-x-btn:hover {
    background: linear-gradient(135deg, #1da1f2, #0d8ecf);
    border-color: #1da1f2;
    color: #fff;
    box-shadow: 0 0 12px rgba(29, 161, 242, 0.4);
}

.link-x-btn svg {
    flex-shrink: 0;
}

#link-x-btn-text {
    white-space: nowrap;
}

@media (max-width: 400px) {
    #link-x-btn-text {
        display: none;
    }
    
    .link-x-btn {
        padding: 5px 7px;
    }
}

/* X Profile Modal */
.x-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.x-profile-modal.show {
    opacity: 1;
    pointer-events: all;
}

.x-profile-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.x-profile-modal-content {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 380px;
    background: linear-gradient(180deg, #1a1a24 0%, #12121a 100%);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(29, 161, 242, 0.1),
        0 0 40px rgba(29, 161, 242, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-smooth);
    overflow: hidden;
}

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

.x-profile-modal .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    z-index: 10;
}

.x-profile-modal .modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.x-profile-header {
    text-align: center;
    padding: 28px 24px 20px;
    background: linear-gradient(180deg, rgba(29, 161, 242, 0.08) 0%, transparent 100%);
}

.x-profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1da1f2, #0d8ecf);
    border-radius: 50%;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(29, 161, 242, 0.3);
}

.x-profile-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.x-profile-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.x-profile-body {
    padding: 20px 24px 24px;
}

.x-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-deep);
    border: 2px solid var(--border-dim);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.x-input-wrapper:focus-within {
    border-color: #1da1f2;
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.15);
}

.x-input-prefix {
    padding: 12px 0 12px 14px;
    color: #1da1f2;
    font-size: 15px;
    font-weight: 500;
    user-select: none;
}

.x-profile-input {
    flex: 1;
    padding: 12px 14px 12px 4px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 15px;
    outline: none;
}

.x-profile-input::placeholder {
    color: var(--text-muted);
}

.x-profile-hint {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.x-profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-x-cancel,
.btn-x-save {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-x-cancel:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.btn-x-save {
    background: linear-gradient(135deg, #1da1f2, #0d8ecf);
    border: none;
    color: #fff;
}

.btn-x-save:hover {
    background: linear-gradient(135deg, #3ab4f7, #1da1f2);
    box-shadow: 0 4px 16px rgba(29, 161, 242, 0.3);
}

/* Part 08: Speed indicator and inline live preview (source in css_parts, build to app.css) */
.stat-with-speed {
    display: flex;
    align-items: center;
    gap: 12px;
}

.speed-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.speed-indicator.active {
    opacity: 1;
}

.speed-bar {
    width: 60px;
    height: 6px;
    background: var(--bg-deep);
    border-radius: 3px;
    overflow: hidden;
}

.speed-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cool), var(--accent-warm));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.speed-text {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    min-width: 45px;
}

/* Inline Live Preview (next to status) */
.stat-with-preview {
    flex: 1.5;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-preview-inline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    opacity: 0.4;
    transition: opacity var(--transition-smooth);
}

.live-preview-inline.active {
    opacity: 1;
}

.live-item-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.live-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    image-rendering: pixelated;
    transition: all var(--transition-fast);
}

.live-item-inline:first-child .live-thumb {
    width: 40px;
    height: 40px;
    border-color: var(--border-dim);
}

.live-preview-inline.active .live-item-inline:first-child .live-thumb {
    border-color: var(--accent-warm);
    box-shadow: 0 0 8px rgba(224, 120, 80, 0.3);
}

.live-score-inline {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    line-height: 1;
}

.live-item-inline:first-child .live-score-inline {
    font-size: 10px;
    color: var(--text-secondary);
}

.live-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    margin-left: 4px;
    transition: background var(--transition-fast);
}

.live-preview-inline.active .live-pulse {
    background: var(--accent-success);
    animation: pulse 1s ease-in-out infinite;
}

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

@media (max-width: 600px) {
    .status-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .live-thumb {
        width: 28px;
        height: 28px;
    }
    
    .live-item-inline:first-child .live-thumb {
        width: 34px;
        height: 34px;
    }
    
    .live-score-inline {
        font-size: 8px;
    }
    
    .live-item-inline:first-child .live-score-inline {
        font-size: 9px;
    }
}

@media (max-width: 700px) {
    /* Saves vertical space on mobile, status stays readable */
    .live-preview-inline {
        display: none;
    }
}

/* Part 09: Leaderboard and panels (source in css_parts, build to app.css) */
.grid-cell.own-discovery {
    border: 2px solid #00ff88;
    box-shadow: 
        0 0 0 2px rgba(0, 255, 136, 0.3),
        0 0 20px rgba(0, 255, 136, 0.4),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
}

.grid-cell.own-discovery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 22px;
    background: linear-gradient(to bottom, rgba(0, 255, 136, 0.25), transparent);
    z-index: 2;
    pointer-events: none;
}

.grid-cell.own-discovery::after {
    content: 'YOURS';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #00ff88;
    text-align: center;
    padding: 3px 0;
    background: rgba(0, 0, 0, 0.7);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
    z-index: 3;
}

.grid-cell.own-discovery:hover {
    box-shadow: 
        0 0 0 2px rgba(0, 255, 136, 0.5),
        0 0 30px rgba(0, 255, 136, 0.6),
        inset 0 0 25px rgba(0, 255, 136, 0.15);
}

/* Clickable Panel Header */
.panel-header-clickable {
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    margin: -4px -8px 12px -8px;
}

.panel-header-clickable:hover {
    background: var(--bg-elevated);
}

.panel-header-clickable .panel-badge {
    transition: all var(--transition-fast);
}

.panel-header-clickable:hover .panel-badge {
    background: var(--accent-warm);
    color: #fff;
}

/* Leaderboard Modal */
.leaderboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.leaderboard-modal.show {
    opacity: 1;
    pointer-events: all;
}

.leaderboard-content {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 700px;
    max-height: 85vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform var(--transition-smooth);
}

.leaderboard-modal.show .leaderboard-content {
    transform: scale(1);
}

.leaderboard-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.leaderboard-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.leaderboard-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.leaderboard-table-header {
    display: grid;
    grid-template-columns: 48px 60px 80px 1fr 130px;
    gap: 12px;
    padding: 12px 24px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.lb-col-image {
    /* Empty header for image column */
}

@media (max-width: 600px) {
    .leaderboard-table-header {
        grid-template-columns: 36px 45px 55px 1fr;
        gap: 8px;
        padding: 10px 12px;
    }
    .lb-col-seed {
        display: none;
    }
}

.leaderboard-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.leaderboard-loading {
    padding: 20px 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 48px 60px 80px 1fr 130px;
    gap: 12px;
    padding: 10px 24px;
    align-items: center;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 600px) {
    .leaderboard-row {
        grid-template-columns: 36px 45px 55px 1fr;
        gap: 8px;
        padding: 8px 12px;
    }
    .lb-seed {
        display: none;
    }
    .lb-rank {
        font-size: 8px;
    }
    .lb-score {
        font-size: 8px;
    }
    .lb-discoverer {
        font-size: 11px;
        display: flex;
        align-items: center;
        min-width: 0;
    }
    .lb-x-link {
        flex-shrink: 0;
        margin-left: 4px;
    }
    .lb-x-link svg {
        width: 12px;
        height: 12px;
    }
    .leaderboard-row.own-discovery {
        padding-left: 9px;
    }
}

.leaderboard-row:hover {
    background: var(--bg-elevated);
}

.leaderboard-row.own-discovery {
    background: rgba(0, 255, 136, 0.08);
    border-left: 3px solid #00ff88;
    padding-left: 21px;
}

.leaderboard-row.own-discovery:hover {
    background: rgba(0, 255, 136, 0.12);
}

.lb-rank {
    font-weight: 500;
    color: var(--text-secondary);
}

.leaderboard-row:nth-child(-n+3) .lb-rank {
    color: var(--accent-gold);
}

.lb-score {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.lb-discoverer {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    min-width: 0;
}

.lb-discoverer > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.leaderboard-row.own-discovery .lb-discoverer {
    color: #00ff88;
    font-weight: 500;
}

.lb-x-link {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 4px;
    border-radius: 3px;
    color: #1da1f2;
    text-decoration: none;
    transition: all var(--transition-fast);
    vertical-align: middle;
}

.lb-x-link:hover {
    background: rgba(29, 161, 242, 0.2);
    transform: scale(1.1);
}

.lb-seed {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

/* Leaderboard thumbnail */
.lb-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    image-rendering: pixelated;
}

@media (max-width: 600px) {
    .lb-thumbnail {
        width: 32px;
        height: 32px;
    }
    .leaderboard-header {
        padding: 16px 16px 12px;
    }
    .leaderboard-title {
        font-size: 24px;
    }
    .leaderboard-subtitle {
        font-size: 12px;
    }
}

/* ============================================================
   Part 10: Sponsors, flanking layout (Desktop)
   ============================================================ */

.app-header-with-sponsors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 32px 20px 24px;
    margin-bottom: 16px;
}

.app-header-center {
    text-align: center;
    flex: 0 1 auto;
    max-width: 600px;
}

.sponsors-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 210px;
    flex-shrink: 0;
}

.sponsors-left {
    align-items: flex-end;
}

.sponsors-right {
    align-items: flex-start;
}

/* Color variations for sponsors */
.sponsor-slot {
    --sponsor-color: 212, 168, 80;  /* Default gold */
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(var(--sponsor-color), 0.04);
    border: 1px solid rgba(var(--sponsor-color), 0.15);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-smooth);
    min-width: 160px;
    max-width: 200px;
}

/* Color variants */
.sponsor-slot[data-color="gold"] { --sponsor-color: 212, 168, 80; }
.sponsor-slot[data-color="coral"] { --sponsor-color: 224, 120, 100; }
.sponsor-slot[data-color="teal"] { --sponsor-color: 80, 180, 170; }
.sponsor-slot[data-color="violet"] { --sponsor-color: 160, 120, 200; }
.sponsor-slot[data-color="sky"] { --sponsor-color: 100, 160, 220; }
.sponsor-slot[data-color="mint"] { --sponsor-color: 100, 200, 150; }

.sponsor-slot:hover {
    background: rgba(var(--sponsor-color), 0.12);
    border-color: rgba(var(--sponsor-color), 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--sponsor-color), 0.15);
}

/* Circular logo */
.sponsor-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--sponsor-color), 0.15);
    border: 1px solid rgba(var(--sponsor-color), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: rgb(var(--sponsor-color));
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-top: 2px;
}

.sponsor-slot:hover .sponsor-logo {
    background: rgba(var(--sponsor-color), 0.25);
    border-color: rgba(var(--sponsor-color), 0.5);
}

/* Sponsor info text */
.sponsor-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.sponsor-slot-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.sponsor-slot-tagline {
    font-size: 9px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.sponsor-slot:hover .sponsor-slot-name {
    color: rgb(var(--sponsor-color));
}

.sponsor-slot:hover .sponsor-slot-tagline {
    color: var(--text-secondary);
}

/* Fade animation for sponsor rotation */
.sponsor-slot.fade-out {
    opacity: 0;
    transform: translateY(-4px);
}

.sponsor-slot.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Empty/placeholder slots when sponsors exist */
.sponsor-slot.slot-empty {
    opacity: 0.3;
    cursor: pointer;
}

.sponsor-slot.slot-empty .sponsor-logo {
    background: rgba(var(--sponsor-color), 0.08);
    border-color: rgba(var(--sponsor-color), 0.15);
    border-style: dashed;
}

.sponsor-slot.slot-empty .sponsor-slot-name {
    color: var(--text-muted);
}

/* Light up empty slots on hover */
.sponsor-slot.slot-empty:hover {
    opacity: 1;
    background: rgba(var(--sponsor-color), 0.1);
    border-color: rgba(var(--sponsor-color), 0.4);
    border-style: dashed;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(var(--sponsor-color), 0.2);
}

.sponsor-slot.slot-empty:hover .sponsor-logo {
    background: rgba(var(--sponsor-color), 0.2);
    border-color: rgba(var(--sponsor-color), 0.5);
    border-style: dashed;
}

.sponsor-slot.slot-empty:hover .sponsor-slot-name {
    color: rgb(var(--sponsor-color));
}

/* Logo image inside sponsor slot */
.sponsor-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sponsor-logo-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Mobile empty slots */
.sponsor-slot-mobile.slot-empty {
    opacity: 0.3;
    cursor: pointer;
}

.sponsor-slot-mobile.slot-empty .sponsor-logo-mobile {
    border-style: dashed;
}

.sponsor-slot-mobile.slot-empty:hover {
    opacity: 1;
    background: rgba(var(--sponsor-color), 0.12);
    border-color: rgba(var(--sponsor-color), 0.4);
}

.sponsor-slot-mobile.slot-empty:hover .sponsor-logo-mobile {
    background: rgba(var(--sponsor-color), 0.2);
    border-color: rgba(var(--sponsor-color), 0.5);
}

.sponsor-slot-mobile.slot-empty:hover span {
    color: rgb(var(--sponsor-color));
}

/* ============================================================
   Part 11: Sponsors, mobile layout
   ============================================================ */

.sponsors-mobile {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: rgba(212, 168, 80, 0.03);
    border-top: 1px solid rgba(212, 168, 80, 0.1);
    border-bottom: 1px solid rgba(212, 168, 80, 0.1);
}

.sponsors-mobile-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    opacity: 0.7;
}

.sponsors-mobile-scroll {
    display: flex;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: hidden;
    max-width: 100%;
    width: 100%;
    padding: 4px 0;
    scrollbar-width: none;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: auto;
}

.sponsors-mobile-scroll::-webkit-scrollbar {
    display: none;
}

/* Allow manual scroll when touched/hovered */
.sponsors-mobile-scroll:hover,
.sponsors-mobile-scroll:active {
    overflow-x: auto;
}

.sponsor-slot-mobile {
    --sponsor-color: 212, 168, 80;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(var(--sponsor-color), 0.05);
    border: 1px solid rgba(var(--sponsor-color), 0.18);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
}

/* Color variants for mobile */
.sponsor-slot-mobile[data-color="gold"] { --sponsor-color: 212, 168, 80; }
.sponsor-slot-mobile[data-color="coral"] { --sponsor-color: 224, 120, 100; }
.sponsor-slot-mobile[data-color="teal"] { --sponsor-color: 80, 180, 170; }
.sponsor-slot-mobile[data-color="violet"] { --sponsor-color: 160, 120, 200; }
.sponsor-slot-mobile[data-color="sky"] { --sponsor-color: 100, 160, 220; }
.sponsor-slot-mobile[data-color="mint"] { --sponsor-color: 100, 200, 150; }

.sponsor-slot-mobile:hover {
    background: rgba(var(--sponsor-color), 0.12);
    border-color: rgba(var(--sponsor-color), 0.35);
}

.sponsor-logo-mobile {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(var(--sponsor-color), 0.15);
    border: 1px solid rgba(var(--sponsor-color), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 600;
    color: rgb(var(--sponsor-color));
    flex-shrink: 0;
    text-transform: uppercase;
}

.sponsor-slot-mobile span {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sponsor-slot-mobile:hover span {
    color: rgb(var(--sponsor-color));
}

/* ============================================================
   Part 12: Sponsors, responsive
   ============================================================ */

@media (max-width: 1100px) {
    .app-header-with-sponsors {
        gap: 20px;
    }
    
    .sponsors-column {
        width: 160px;
    }
    
    .sponsor-slot {
        padding: 6px 10px;
        min-width: 120px;
        max-width: 160px;
    }
    
    .sponsor-logo {
        width: 24px;
        height: 24px;
        font-size: 9px;
    }
    
    .sponsor-slot-name {
        font-size: 10px;
    }
    
    .sponsor-slot-tagline {
        font-size: 8px;
    }
}

@media (max-width: 900px) {
    /* Hide desktop sponsors, show mobile */
    .sponsors-column {
        display: none;
    }
    
    .sponsors-mobile {
        display: flex;
    }
    
    .app-header-with-sponsors {
        padding: 16px 14px 10px;
    }
    
    .become-sponsor-cta {
        display: none;
    }
}

/* ============================================================
   Part 13: Become a Sponsor CTA
   ============================================================ */

.become-sponsor-cta {
    text-align: center;
    margin-bottom: 16px;
}

.become-sponsor-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(212, 168, 80, 0.08);
    border: 1px dashed rgba(212, 168, 80, 0.3);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all var(--transition-smooth);
}

.become-sponsor-link:hover {
    background: rgba(212, 168, 80, 0.15);
    border-color: rgba(212, 168, 80, 0.5);
    color: var(--accent-gold);
    transform: translateY(-1px);
}

.become-sponsor-link svg {
    color: var(--accent-gold);
    opacity: 0.7;
}

.become-sponsor-link:hover svg {
    opacity: 1;
}

.sponsor-slots-badge {
    padding: 2px 8px;
    background: rgba(80, 200, 120, 0.15);
    border-radius: 10px;
    font-size: 10px;
    color: var(--accent-success);
    font-weight: 500;
}

.sponsor-slots-badge:empty {
    display: none;
}

/* Mobile sponsor header */
.sponsors-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 4px;
}

.become-sponsor-link-mobile {
    font-size: 10px;
    color: var(--accent-gold);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.become-sponsor-link-mobile:hover {
    opacity: 1;
}

