/* Pentagon Pizza Tracker - Classified Dossier Theme */
/* A unique retro intelligence aesthetic with pizza warmth */

@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Courier+Prime:wght@400;700&family=Bebas+Neue&display=swap');

:root {
    /* Paper & Document Colors */
    --paper-cream: #f5f0e1;
    --paper-aged: #e8e0c8;
    --paper-dark: #d4c9a8;
    --ink-black: #1a1a1a;
    --ink-faded: #3d3d3d;

    /* Classified Stamp Colors */
    --stamp-red: #c41e3a;
    --stamp-red-light: rgba(196, 30, 58, 0.15);
    --stamp-blue: #1e3a5f;

    /* Pizza Warmth */
    --pizza-orange: #e85d04;
    --pizza-gold: #f9a825;
    --pizza-red: #bf360c;
    --cheese-yellow: #ffc107;

    /* Status Colors */
    --status-normal: #2e7d32;
    --status-elevated: #f9a825;
    --status-high: #c41e3a;

    /* Functional */
    --shadow-soft: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --border-dark: #8b7355;
}

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

body {
    font-family: 'Courier Prime', 'Courier New', monospace;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 24px,
            rgba(139, 115, 85, 0.03) 24px,
            rgba(139, 115, 85, 0.03) 25px
        ),
        linear-gradient(135deg, #d4c9a8 0%, #e8e0c8 50%, #f5f0e1 100%);
    background-attachment: fixed;
    color: var(--ink-black);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ==================== HEADER ==================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--paper-cream);
    border: 3px double var(--border-dark);
    margin-bottom: 2rem;
    position: relative;
    box-shadow:
        4px 4px 0 var(--shadow-soft),
        inset 0 0 100px rgba(139, 115, 85, 0.05);
}

.header::before {
    content: 'CLASSIFIED';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--stamp-red);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    padding: 0.2rem 1.5rem;
    letter-spacing: 0.3em;
    border: 2px solid var(--stamp-red);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 3rem;
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.2));
    animation: pizza-wobble 3s ease-in-out infinite;
}

@keyframes pizza-wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.logo-text h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.15em;
    color: var(--stamp-red);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.logo-text .subtitle {
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    color: var(--ink-faded);
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notify-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--paper-aged);
    border: 2px solid var(--border-dark);
    color: var(--ink-black);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 var(--shadow-soft);
}

.notify-btn:hover {
    background: var(--cheese-yellow);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--shadow-medium);
}

.notify-btn.active {
    background: var(--pizza-orange);
    color: white;
    border-color: var(--pizza-red);
}

.notify-icon {
    font-size: 1.1rem;
}

.last-updated {
    text-align: right;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px dashed var(--border-dark);
}

.last-updated .label {
    display: block;
    font-size: 0.6rem;
    color: var(--ink-faded);
    letter-spacing: 0.15em;
    font-family: 'Special Elite', cursive;
}

.last-updated .value {
    font-size: 1rem;
    color: var(--status-normal);
    font-weight: 700;
    font-family: 'Courier Prime', monospace;
}

/* ==================== ALERT BANNER ==================== */
.alert-banner {
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border: 3px solid;
    position: relative;
    background: var(--paper-cream);
    box-shadow: 4px 4px 0 var(--shadow-soft);
}

.alert-banner::before {
    content: '▶ INTEL BRIEFING';
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--paper-cream);
    padding: 0 0.5rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--ink-faded);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-icon {
    font-size: 1.5rem;
    animation: blink-alert 1s infinite;
}

@keyframes blink-alert {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

.alert-level {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 700;
    letter-spacing: 0.15em;
    font-size: 1.2rem;
    padding: 0.2rem 0.8rem;
    border: 2px solid currentColor;
}

.alert-message {
    font-family: 'Special Elite', cursive;
    color: var(--ink-faded);
    font-size: 0.95rem;
}

.alert-normal {
    border-color: var(--status-normal);
}
.alert-normal .alert-icon,
.alert-normal .alert-level {
    color: var(--status-normal);
}

.alert-elevated {
    border-color: var(--status-elevated);
    background: linear-gradient(90deg, rgba(249, 168, 37, 0.1), var(--paper-cream));
}
.alert-elevated .alert-icon,
.alert-elevated .alert-level {
    color: var(--status-elevated);
}

.alert-high {
    border-color: var(--status-high);
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(196, 30, 58, 0.03) 10px,
            rgba(196, 30, 58, 0.03) 20px
        ),
        var(--paper-cream);
    animation: alert-pulse 0.5s ease-in-out infinite alternate;
}
.alert-high .alert-icon,
.alert-high .alert-level {
    color: var(--status-high);
}

@keyframes alert-pulse {
    from { box-shadow: 4px 4px 0 var(--shadow-soft); }
    to { box-shadow: 4px 4px 20px rgba(196, 30, 58, 0.3); }
}

/* ==================== STATS SECTION ==================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--paper-cream);
    border: 2px solid var(--border-dark);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    box-shadow: 3px 3px 0 var(--shadow-soft);
    transition: all 0.2s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-dark);
}

.stat-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--shadow-medium);
}

.stat-card.primary {
    border-color: var(--pizza-orange);
    background:
        radial-gradient(circle at top right, rgba(232, 93, 4, 0.1), transparent 70%),
        var(--paper-cream);
}

.stat-card.primary::before {
    background: linear-gradient(90deg, var(--pizza-orange), var(--pizza-gold));
}

.stat-card.primary::after {
    content: '★ PRIMARY METRIC ★';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pizza-orange);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.6rem;
    padding: 0.1rem 0.6rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.stat-label {
    font-family: 'Special Elite', cursive;
    font-size: 0.7rem;
    color: var(--ink-faded);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    color: var(--ink-black);
    line-height: 1;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.05);
}

.stat-card.primary .stat-value {
    color: var(--pizza-orange);
    text-shadow: 2px 2px 0 rgba(232, 93, 4, 0.2);
}

.stat-sublabel {
    font-size: 0.7rem;
    color: var(--ink-faded);
    margin-top: 0.5rem;
    font-style: italic;
}

/* ==================== CHART SECTION ==================== */
.chart-section {
    background: var(--paper-cream);
    border: 2px solid var(--border-dark);
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 4px 4px 0 var(--shadow-soft);
}

.chart-section::before {
    content: 'ACTIVITY ANALYSIS';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--stamp-blue);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    padding: 0.2rem 1rem;
    letter-spacing: 0.2em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-dark);
}

.section-header h2 {
    font-family: 'Special Elite', cursive;
    font-size: 1.1rem;
    color: var(--ink-black);
    letter-spacing: 0.05em;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--ink-faded);
    font-family: 'Special Elite', cursive;
}

.legend-item .dot {
    width: 12px;
    height: 12px;
    border: 2px solid;
}

.legend-item .dot.current {
    background: var(--pizza-orange);
    border-color: var(--pizza-red);
}

.legend-item .dot.usual {
    background: #8b7355;
    border-color: #6b5a45;
}

.chart-container {
    height: 280px;
    position: relative;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 39px,
            rgba(139, 115, 85, 0.1) 39px,
            rgba(139, 115, 85, 0.1) 40px
        );
    border: 1px solid var(--border-dark);
    padding: 0.5rem;
}

/* ==================== TWO COLUMN LAYOUT ==================== */
.two-column {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* ==================== LOCATION CARDS ==================== */
.locations-section {
    background: var(--paper-cream);
    border: 2px solid var(--border-dark);
    padding: 1.5rem;
    box-shadow: 4px 4px 0 var(--shadow-soft);
    position: relative;
}

.locations-section::before {
    content: 'SURVEILLANCE TARGETS';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--stamp-red);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    padding: 0.2rem 1rem;
    letter-spacing: 0.2em;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    color: var(--status-high);
    letter-spacing: 0.15em;
    background: var(--stamp-red-light);
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--status-high);
}

.pulse {
    width: 10px;
    height: 10px;
    background: var(--status-high);
    border-radius: 50%;
    animation: pulse-animation 1s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(196, 30, 58, 0); }
    100% { box-shadow: 0 0 0 0 rgba(196, 30, 58, 0); }
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.location-card {
    background: #1a1d29;
    border: 2px solid #2d3348;
    border-radius: 12px;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: #3d4460;
}

.location-card.status-high {
    border-color: var(--status-high);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.2), inset 0 0 30px rgba(196, 30, 58, 0.05);
}

.location-card.status-elevated {
    border-color: var(--status-elevated);
    box-shadow: 0 4px 20px rgba(249, 168, 37, 0.15), inset 0 0 30px rgba(249, 168, 37, 0.03);
}

.location-card.status-normal {
    border-color: #2d3348;
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.location-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pizza-icon {
    font-size: 1.4rem;
}

.location-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: #ffffff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.location-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.distance-badge {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

/* Spike Indicator */
.spike-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.spike-indicator.high {
    background: rgba(196, 30, 58, 0.2);
    border: 1px solid var(--status-high);
    color: var(--status-high);
}

.spike-indicator.elevated {
    background: rgba(249, 168, 37, 0.15);
    border: 1px solid var(--status-elevated);
    color: var(--status-elevated);
}

.spike-icon {
    font-size: 1rem;
}

.spike-text {
    font-weight: 400;
}

/* Popular Times Section */
.popular-times {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.popular-times-header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    color: #9ca3af;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.live-status-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.live-status-bar.high {
    background: rgba(196, 30, 58, 0.15);
}

.live-status-bar.elevated {
    background: rgba(249, 168, 37, 0.1);
}

.live-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.1em;
}

.live-badge.live {
    background: var(--status-high);
    color: white;
}

.live-badge.estimated {
    background: var(--status-elevated);
    color: #1a1d29;
}

.live-badge.cached {
    background: #6b7280;
    color: white;
}

.busy-description {
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    color: #e5e7eb;
}

/* Hourly Chart */
.hourly-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100px;
    gap: 2px;
    padding-top: 0.5rem;
}

.hour-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
}

.hour-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    transition: height 0.3s ease;
    margin-top: auto;
    min-height: 4px;
}

.hour-bar.usual {
    background: var(--border-dark);
}

.hour-bar.spike-high {
    background: linear-gradient(180deg, var(--status-high) 0%, #8b1a30 100%);
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.5);
}

.hour-bar.spike-elevated {
    background: linear-gradient(180deg, var(--status-elevated) 0%, #c77800 100%);
    box-shadow: 0 0 10px rgba(249, 168, 37, 0.4);
}

.hour-bar.spike-normal {
    background: linear-gradient(180deg, var(--pizza-orange) 0%, var(--pizza-red) 100%);
    box-shadow: 0 0 8px rgba(232, 93, 4, 0.4);
}

.hour-bar.closed {
    background: #3d4460;
    height: 8px !important;
    border-radius: 4px;
    opacity: 0.4;
}

.hour-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.6rem;
    color: #6b7280;
    margin-top: 0.4rem;
    text-transform: uppercase;
    min-height: 14px;
}

/* Legacy styles kept for compatibility */
.location-status {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    letter-spacing: 0.1em;
    border: 2px solid currentColor;
}

.location-status.high {
    background: var(--stamp-red-light);
    color: var(--status-high);
}

.location-status.elevated {
    background: rgba(249, 168, 37, 0.15);
    color: var(--status-elevated);
}

.location-status.normal {
    background: rgba(46, 125, 50, 0.1);
    color: var(--status-normal);
}

/* ==================== TWITTER SECTION ==================== */
.twitter-section {
    background: var(--paper-cream);
    border: 2px solid var(--border-dark);
    padding: 1.5rem;
    height: fit-content;
    max-height: 600px;
    overflow-y: auto;
    box-shadow: 4px 4px 0 var(--shadow-soft);
    position: relative;
}

.twitter-section::before {
    content: 'SIGINT FEED';
    position: absolute;
    top: -12px;
    left: 20px;
    background: #1da1f2;
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    padding: 0.2rem 1rem;
    letter-spacing: 0.2em;
}

.twitter-link {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    background: #1da1f2;
    color: white;
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.twitter-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.twitter-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.tweet-placeholder {
    font-family: 'Special Elite', cursive;
    color: var(--ink-faded);
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
    border: 1px dashed var(--border-dark);
}

.tweet-card {
    background: var(--paper-aged);
    padding: 1rem;
    border: 1px solid var(--border-dark);
    border-left: 4px solid #1da1f2;
    position: relative;
}

.tweet-card::before {
    content: '📡';
    position: absolute;
    top: -8px;
    right: 10px;
    font-size: 1rem;
}

.tweet-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: var(--ink-black);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
}

.tweet-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--ink-faded);
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-dark);
}

.tweet-date {
    font-family: 'Special Elite', cursive;
}

.tweet-metrics {
    display: flex;
    gap: 1rem;
}

.tweet-metric {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==================== EVENTS SECTION ==================== */
.events-section {
    background: var(--paper-cream);
    border: 2px solid var(--border-dark);
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 4px 4px 0 var(--shadow-soft);
}

.events-section::before {
    content: 'HISTORICAL INTEL';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--ink-black);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    padding: 0.2rem 1rem;
    letter-spacing: 0.2em;
}

.events-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.event-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--paper-aged);
    border: 1px solid var(--border-dark);
    border-left: 4px solid var(--ink-faded);
    align-items: center;
    position: relative;
}

.event-item::before {
    content: '◆';
    position: absolute;
    left: -8px;
    color: var(--border-dark);
    background: var(--paper-cream);
    font-size: 0.8rem;
}

.event-date {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    color: var(--ink-faded);
    min-width: 100px;
    letter-spacing: 0.05em;
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.event-index {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    letter-spacing: 0.05em;
    border: 2px solid currentColor;
}

.event-index.high {
    background: var(--stamp-red-light);
    color: var(--status-high);
}

.event-index.normal {
    background: rgba(46, 125, 50, 0.1);
    color: var(--status-normal);
}

.event-description {
    font-family: 'Special Elite', cursive;
    font-size: 0.9rem;
    color: var(--ink-faded);
}

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    padding: 2rem;
    border: 2px dashed var(--border-dark);
    margin-top: 2rem;
    background: var(--paper-aged);
    position: relative;
}

.footer::before {
    content: '— END OF BRIEFING —';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--paper-aged);
    padding: 0 1rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    color: var(--ink-faded);
    letter-spacing: 0.2em;
}

.disclaimer {
    font-family: 'Special Elite', cursive;
    font-size: 0.8rem;
    color: var(--ink-faded);
    max-width: 600px;
    margin: 0 auto 1rem;
    line-height: 1.7;
    padding: 1rem;
    border: 1px solid var(--border-dark);
    background: var(--paper-cream);
}

.credits {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: var(--ink-faded);
}

.credits a {
    color: var(--pizza-orange);
    text-decoration: none;
    font-weight: 700;
}

.credits a:hover {
    text-decoration: underline;
}

/* Data Source Badge */
.source-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
    margin-left: 0.5rem;
    letter-spacing: 0.1em;
    border: 1px solid currentColor;
}

.source-badge.live {
    background: rgba(46, 125, 50, 0.1);
    color: var(--status-normal);
}

.source-badge.estimated {
    background: rgba(249, 168, 37, 0.15);
    color: var(--status-elevated);
}

.source-badge.cached {
    background: rgba(30, 58, 95, 0.1);
    color: var(--stamp-blue);
}

/* API Status */
#api-status {
    font-family: 'Courier Prime', monospace;
    color: var(--ink-faded);
}

#api-status.connected {
    color: var(--status-normal);
}

#api-status.disconnected {
    color: var(--status-elevated);
}

/* ==================== SCROLLBAR ==================== */
.twitter-section::-webkit-scrollbar {
    width: 8px;
}

.twitter-section::-webkit-scrollbar-track {
    background: var(--paper-aged);
    border: 1px solid var(--border-dark);
}

.twitter-section::-webkit-scrollbar-thumb {
    background: var(--border-dark);
}

.twitter-section::-webkit-scrollbar-thumb:hover {
    background: var(--ink-faded);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 1rem;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .twitter-section {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
    }

    .header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 1rem 1.5rem;
    }

    .header::before {
        font-size: 0.75rem;
        padding: 0.15rem 1rem;
    }

    .header-controls {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .notify-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo-icon {
        font-size: 2.5rem;
    }

    .logo-text h1 {
        font-size: 2.5rem;
    }

    .alert-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-value {
        font-size: 2.5rem;
    }

    .section-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .chart-container {
        height: 220px;
    }

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

    .location-card {
        padding: 1rem;
    }

    .location-name {
        font-size: 1.1rem;
    }

    .hourly-chart {
        height: 80px;
    }

    .hour-label {
        font-size: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .stats-section {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .logo-text h1 {
        font-size: 2rem;
    }

    .logo-text .subtitle {
        font-size: 0.7rem;
    }

    .chart-container {
        height: 180px;
    }

    .section-header h2 {
        font-size: 0.95rem;
    }

    .tweet-card {
        padding: 0.75rem;
    }

    .tweet-text {
        font-size: 0.8rem;
    }

    .tweet-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

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

    .location-card {
        padding: 0.85rem;
    }

    .location-name {
        font-size: 1rem;
    }

    .spike-indicator {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .popular-times {
        padding: 0.75rem;
    }

    .hourly-chart {
        height: 70px;
        gap: 1px;
    }

    .hour-label {
        font-size: 0.45rem;
    }

    .live-status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .busy-description {
        font-size: 0.8rem;
    }

    .event-date {
        font-size: 0.8rem;
    }

    .event-description {
        font-size: 0.8rem;
    }

    .popularity-value {
        font-size: 2rem;
    }

    .credits {
        font-size: 0.65rem;
    }

    .disclaimer {
        font-size: 0.7rem;
        padding: 0.75rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .notify-btn {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
    }

    .twitter-link {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        padding: 0.5rem 1.25rem;
    }

    .tweet-card {
        padding: 1rem;
    }

    .location-card {
        padding: 1.25rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 0.75rem 1rem;
    }

    .header::before {
        top: -10px;
        font-size: 0.65rem;
    }

    .alert-banner {
        margin-bottom: 1rem;
        padding: 0.75rem 1rem;
    }

    .chart-container {
        height: 150px;
    }

    .stats-section {
        grid-template-columns: repeat(4, 1fr);
        margin-bottom: 1rem;
        gap: 0.75rem;
    }

    .stat-value {
        font-size: 2rem;
    }
}

/* ==================== TOOLTIPS ==================== */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 0.4rem;
    background: var(--paper-aged);
    border: 1px solid var(--border-dark);
    border-radius: 50%;
    font-size: 0.65rem;
    color: var(--ink-faded);
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    transition: all 0.2s ease;
}

.tooltip-icon:hover {
    background: var(--pizza-orange);
    color: white;
    border-color: var(--pizza-red);
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 100;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: 1rem;
    background: var(--paper-cream);
    border: 2px solid var(--border-dark);
    box-shadow: 4px 4px 0 var(--shadow-medium);
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--ink-black);
    text-align: left;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tooltip-text::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--border-dark);
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--paper-cream);
    margin-top: -2px;
}

.tooltip-wrapper:hover .tooltip-text,
.tooltip-icon:hover + .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text .tooltip-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    color: var(--pizza-orange);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-dark);
}

.tooltip-text .tooltip-detail {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-dark);
    font-size: 0.7rem;
    color: var(--ink-faded);
    font-style: italic;
}

/* Tooltip positioning variants */
.tooltip-text.tooltip-left {
    left: 0;
    transform: translateX(0);
}

.tooltip-text.tooltip-left::before,
.tooltip-text.tooltip-left::after {
    left: 20px;
}

.tooltip-text.tooltip-right {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.tooltip-text.tooltip-right::before,
.tooltip-text.tooltip-right::after {
    left: auto;
    right: 20px;
}

/* Stat card tooltip adjustments */
.stat-card .tooltip-wrapper {
    justify-content: center;
}

.stat-card .stat-label {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== FAQ SECTION ==================== */
.faq-section {
    background: var(--paper-cream);
    border: 2px solid var(--border-dark);
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 4px 4px 0 var(--shadow-soft);
}

.faq-section::before {
    content: 'FREQUENTLY ASKED QUESTIONS';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--stamp-blue);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    padding: 0.2rem 1rem;
    letter-spacing: 0.2em;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.faq-accordion::-webkit-scrollbar {
    width: 8px;
}

.faq-accordion::-webkit-scrollbar-track {
    background: var(--paper-aged);
    border: 1px solid var(--border-dark);
}

.faq-accordion::-webkit-scrollbar-thumb {
    background: var(--border-dark);
}

.faq-accordion::-webkit-scrollbar-thumb:hover {
    background: var(--ink-faded);
}

.faq-item {
    background: var(--paper-aged);
    border: 1px solid var(--border-dark);
    transition: all 0.2s ease;
}

.faq-item:hover {
    box-shadow: 2px 2px 0 var(--shadow-soft);
}

.faq-item[open] {
    border-color: var(--pizza-orange);
    box-shadow: 3px 3px 0 var(--shadow-soft);
}

.faq-question {
    font-family: 'Special Elite', cursive;
    font-size: 0.95rem;
    color: var(--ink-black);
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    user-select: none;
    transition: background 0.2s ease;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::before {
    content: '+';
    font-family: 'Bebas Neue', sans-serif;
    color: var(--pizza-orange);
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::before {
    content: '-';
}

.faq-question:hover {
    background: rgba(232, 93, 4, 0.05);
}

.faq-answer {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    color: var(--ink-faded);
    line-height: 1.7;
    padding: 0 1.25rem 1.25rem 3rem;
    border-top: 1px dashed var(--border-dark);
    margin-top: -0.25rem;
    padding-top: 1rem;
}

.faq-answer strong {
    color: var(--ink-black);
}

.faq-answer .highlight {
    background: var(--cheese-yellow);
    padding: 0.1rem 0.3rem;
    color: var(--ink-black);
}

/* Quick reference box in stat section */
.quick-ref {
    grid-column: 1 / -1;
    background: var(--paper-aged);
    border: 2px dashed var(--border-dark);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.quick-ref-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: var(--ink-faded);
}

.quick-ref-item .ref-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border: 2px solid currentColor;
    letter-spacing: 0.05em;
}

.quick-ref-item .ref-badge.normal {
    color: var(--status-normal);
    background: rgba(46, 125, 50, 0.1);
}

.quick-ref-item .ref-badge.elevated {
    color: var(--status-elevated);
    background: rgba(249, 168, 37, 0.15);
}

.quick-ref-item .ref-badge.high {
    color: var(--status-high);
    background: var(--stamp-red-light);
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-accordion {
        max-height: 350px;
    }

    .quick-ref {
        flex-direction: column;
        gap: 1rem;
    }

    .tooltip-text {
        width: 220px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .faq-accordion {
        max-height: 300px;
    }

    .faq-question {
        font-size: 0.85rem;
        padding: 0.85rem 1rem;
    }

    .faq-answer {
        font-size: 0.75rem;
        padding: 0 1rem 1rem 2.5rem;
    }
}

/* Print styles for the dossier effect */
@media print {
    body {
        background: white;
    }

    .header::before,
    .chart-section::before,
    .locations-section::before,
    .twitter-section::before,
    .events-section::before {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .tooltip-text {
        display: none;
    }
}
