/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    --font-headers: 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Theme Palette */
    --bg-dark: #050811;
    --bg-card: rgba(13, 20, 38, 0.45);
    --bg-card-hover: rgba(20, 31, 58, 0.65);
    --border-card: rgba(255, 255, 255, 0.06);
    --border-card-hover: rgba(6, 182, 212, 0.4);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Category Neon Colors */
    --color-exchange: #f97316;
    /* Orange */
    --color-hack: #f43f5e;
    /* Crimson */
    --color-ponzi: #a855f7;
    /* Purple */
    --color-rugpull: #eab308;
    /* Gold */
    --color-algorithmic: #3b82f6;
    /* Blue */
    --color-corporate: #14b8a6;
    /* Teal */

    /* System Accents */
    --color-cyan: #06b6d4;
    --color-indigo: #6366f1;
    --color-emerald: #10b981;
    --color-red: #ef4444;

    /* Layout Dimensions */
    --max-width: 1400px;
    --drawer-width: 500px;
}

/* ==========================================================================
   BASE STYLES & RESET
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* ==========================================================================
   AMBIENT GLOWS & GRIDS (Aesthetics)
   ========================================================================== */
.bg-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    pointer-events: none;
    z-index: -2;
}

.bg-glow-1 {
    top: -10vw;
    left: -10vw;
    background: radial-gradient(circle, var(--color-indigo) 0%, transparent 80%);
}

.bg-glow-2 {
    bottom: -10vw;
    right: -10vw;
    background: radial-gradient(circle, var(--color-cyan) 0%, transparent 80%);
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.site-header {
    padding: 60px 20px 40px 20px;
    text-align: center;
    position: relative;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-accent {
    font-size: 2.5rem;
    animation: flash 3s infinite;
}

.logo-image {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border-radius: 50%;
    /* Rounded for the circular coin */
    border: 1.5px solid rgba(234, 179, 8, 0.35);
    filter: drop-shadow(0 0 15px rgba(234, 179, 8, 0.5));
    transition: all 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05) rotate(5deg);
    filter: drop-shadow(0 0 25px rgba(234, 179, 8, 0.8));
    border-color: rgba(234, 179, 8, 0.6);
}

.logo-text {
    font-family: var(--font-headers);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #ffffff 40%, rgba(234, 179, 8, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-dot {
    color: rgba(234, 179, 8, 1);
    -webkit-text-fill-color: rgba(234, 179, 8, 1);
    text-shadow: 0 0 15px rgba(234, 179, 8, 0.8);
}

.site-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   DASHBOARD / STATS
   ========================================================================== */
.stats-dashboard {
    max-width: var(--max-width);
    margin: 0 auto 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
}

.stat-icon {
    font-size: 2.25rem;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-value {
    font-family: var(--font-headers);
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Text Colors helper */
.text-red {
    color: var(--color-hack);
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.text-orange {
    color: var(--color-exchange);
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}

.text-green {
    color: var(--color-emerald);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.text-cyan {
    color: var(--color-cyan);
    text-shadow: 0 0 10px rgba(6, 180, 212, 0.2);
}

.text-purple {
    color: var(--color-ponzi);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

/* ==========================================================================
   SEARCH & FILTERS
   ========================================================================== */
.controls-section {
    max-width: var(--max-width);
    margin: 0 auto 10px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-bar-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

#search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 18px 20px 18px 55px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#search-input:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    background: rgba(20, 31, 58, 0.5);
}

.filter-sort-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 20px;
}

.filter-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 auto;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 30px;
    font-family: var(--font-headers);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Category colors for active state */
.filter-btn.active {
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.filter-btn.active[data-category="all"] {
    background: var(--text-muted);
    border-color: var(--text-muted);
}

.filter-btn.active[data-category="exchange"] {
    background: var(--color-exchange);
    border-color: var(--color-exchange);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}

.filter-btn.active[data-category="hack"] {
    background: var(--color-hack);
    border-color: var(--color-hack);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

.filter-btn.active[data-category="ponzi"] {
    background: var(--color-ponzi);
    border-color: var(--color-ponzi);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.filter-btn.active[data-category="rugpull"] {
    background: var(--color-rugpull);
    border-color: var(--color-rugpull);
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
}

.filter-btn.active[data-category="algorithmic"] {
    background: var(--color-algorithmic);
    border-color: var(--color-algorithmic);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.filter-btn.active[data-category="corporate"] {
    background: var(--color-corporate);
    border-color: var(--color-corporate);
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.3);
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sort-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sort-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 8px;
    font-family: var(--font-headers);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.sort-dropdown:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* ==========================================================================
   TIMELINE CANVAS
   ========================================================================== */
.timeline-section {
    padding: 20px 0 160px 0;
    /* Add bottom padding to recover from negative margins */
    position: relative;
}

.timeline-container {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom,
            var(--color-cyan) 0%,
            var(--color-indigo) 40%,
            var(--color-hack) 80%,
            rgba(244, 63, 94, 0) 100%);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
    pointer-events: none;
}

.timeline-items {
    position: relative;
    z-index: 2;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 80px 20px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Timeline Item Block */
.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: -110px;
    /* Pull the next item up to interlock columns */
    display: flex;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Alternating Branch Layout */
.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
}

/* Timeline Pulse Node */
.timeline-node {
    position: absolute;
    left: 50%;
    top: 38px;
    width: 18px;
    height: 18px;
    background: var(--bg-dark);
    border: 3.5px solid var(--color-cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    transition: all 0.3s ease;
}

.timeline-card:hover+.timeline-node,
.timeline-node:hover {
    width: 22px;
    height: 22px;
    box-shadow: 0 0 15px var(--color-cyan);
    background: var(--color-cyan);
}

/* Pulse ring */
.timeline-item.active-node .timeline-node {
    animation: pulse 2s infinite;
}

/* Timeline Card */
.timeline-card {
    width: 45%;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.7);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Scroll animation initial state */
    opacity: 0;
    transform: translateY(30px);
}

/* Scroll animation target state */
.timeline-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-card-hover);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15), 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}

/* Horizontal connectors */
.timeline-item:nth-child(odd) .timeline-card::after {
    content: '';
    position: absolute;
    left: 100%;
    right: auto;
    top: 36px;
    /* Moved 1px higher for perfect vertical alignment */
    width: calc(11.11% + 2px);
    /* Spans exactly 5% of container width to reach center line */
    height: 2px;
    background: rgba(255, 255, 255, 0.22);
    /* Increased base visibility */
    pointer-events: none;
    transition: background 0.3s ease;
}

.timeline-item:nth-child(even) .timeline-card::after {
    content: '';
    position: absolute;
    right: 100%;
    left: auto;
    top: 36px;
    /* Moved 1px higher for perfect vertical alignment */
    width: calc(11.11% + 2px);
    /* Spans exactly 5% of container width to reach center line */
    height: 2px;
    background: rgba(255, 255, 255, 0.22);
    /* Increased base visibility */
    pointer-events: none;
    transition: background 0.3s ease;
}

.timeline-card:hover::after {
    background: var(--color-cyan);
    box-shadow: 0 0 8px var(--color-cyan);
}


/* Card Content styling */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.category-badge {
    font-family: var(--font-headers);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 4px;
    color: #ffffff;
}

.badge-exchange {
    background: rgba(249, 115, 22, 0.15);
    color: var(--color-exchange);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-hack {
    background: rgba(244, 63, 94, 0.15);
    color: var(--color-hack);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-ponzi {
    background: rgba(168, 85, 247, 0.15);
    color: var(--color-ponzi);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-rugpull {
    background: rgba(234, 179, 8, 0.15);
    color: var(--color-rugpull);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-algorithmic {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-algorithmic);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-corporate {
    background: rgba(20, 184, 166, 0.15);
    color: var(--color-corporate);
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.card-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-title {
    font-family: var(--font-headers);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 15px;
}

.card-loss-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.card-loss-col {
    display: flex;
    flex-direction: column;
}

.card-loss-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-family: var(--font-headers);
    letter-spacing: 0.03em;
}

.card-loss-value {
    font-family: var(--font-headers);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-hack);
    margin-top: 2px;
}

.card-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
    pointer-events: none;
    /* Pass mouse events to the parent card to maintain cursor and hover states */
}

.card-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 0;
    /* Enable text wrapping in flexbox container */
    transition: color 0.3s ease;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    /* Don't shrink the dot */
}

.status-dot.prison {
    background: var(--color-exchange);
}

.status-dot.large {
    background: var(--color-rugpull);
}

.status-dot.bankrupt {
    background: var(--color-algorithmic);
}

.status-dot.recovered {
    background: var(--color-emerald);
}

.timeline-card:hover .card-status-indicator {
    color: var(--text-primary);
}

/* ==========================================================================
   SLIDE-OVER AUTOPSY DRAWER
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.autopsy-drawer {
    position: fixed;
    top: 0;
    right: calc(-1 * var(--drawer-width));
    width: var(--drawer-width);
    height: 100%;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-card);
    z-index: 101;
    padding: 40px;
    overflow-y: auto;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.autopsy-drawer.open {
    right: 0;
}

.close-drawer-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-drawer-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.drawer-header {
    margin-bottom: 30px;
}

.drawer-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 15px;
}

.drawer-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.drawer-title {
    font-family: var(--font-headers);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 8px;
}

.drawer-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.drawer-body {
    flex-grow: 1;
}

/* Impact Statistics */
.drawer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 35px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

.drawer-stat-item {
    display: flex;
    flex-direction: column;
}

.drawer-stat-lbl {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.drawer-stat-val {
    font-family: var(--font-headers);
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Autopsy Content */
.autopsy-section {
    margin-bottom: 35px;
}

.section-heading {
    font-family: var(--font-headers);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    color: var(--color-cyan);
}

.autopsy-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.65;
}

.autopsy-text p:last-child {
    margin-bottom: 0;
}

/* Founder / Legal Status Box */
.status-box {
    background: rgba(249, 115, 22, 0.04);
    border: 1px solid rgba(249, 115, 22, 0.15);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 35px;
}

.status-heading {
    font-family: var(--font-headers);
    font-size: 0.95rem;
    color: var(--color-exchange);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.status-box p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Reference links */
.links-section {
    margin-bottom: 20px;
}

.links-heading {
    font-family: var(--font-headers);
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.references-list {
    list-style: none;
}

.references-list li {
    margin-bottom: 8px;
}

.references-list a {
    color: var(--color-cyan);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.references-list a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.references-list a::after {
    content: '↗';
    font-size: 0.8rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    padding: 50px 20px 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    z-index: 2;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-credits {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-credits a {
    color: var(--text-secondary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer-credits a:hover {
    color: #ffffff;
}

/* ==========================================================================
   ANIMATIONS & MEDIA QUERIES
   ========================================================================== */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(6, 182, 212, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

@keyframes flash {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.3;
    }
}

@media (max-width: 1200px) {
    .stats-dashboard {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .stat-card:nth-child(1),
    .stat-card:nth-child(2),
    .stat-card:nth-child(3) {
        grid-column: span 2;
    }

    .stat-card:nth-child(4),
    .stat-card:nth-child(5) {
        grid-column: span 3;
    }
}

/* Tablet view styling */
@media (max-width: 1024px) {
    .timeline-card {
        width: 44%;
    }

    .timeline-item:nth-child(odd) .timeline-card::after {
        width: calc(13.64% + 2px);
        /* Spans exactly 6% of container width to reach center line */
    }

    .timeline-item:nth-child(even) .timeline-card::after {
        width: calc(13.64% + 2px);
        /* Spans exactly 6% of container width to reach center line */
    }
}

/* Mobile responsive layout */
@media (max-width: 768px) {
    :root {
        --drawer-width: 100%;
    }

    .site-header {
        padding: 40px 20px 25px 20px;
    }

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

    .site-tagline {
        font-size: 1rem;
    }

    .stats-dashboard {
        margin-bottom: 30px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .stat-card {
        padding: 12px 15px;
        gap: 10px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.75rem;
    }

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

    .stat-label {
        font-size: 0.72rem;
    }

    .stat-card:nth-child(1),
    .stat-card:nth-child(2),
    .stat-card:nth-child(3),
    .stat-card:nth-child(4) {
        grid-column: span 1;
    }

    .stat-card:nth-child(5) {
        grid-column: span 2;
    }

    .filter-sort-row {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 15px;
    }

    .sort-container {
        align-self: flex-end;
    }



    .timeline-line {
        left: 40px;
    }

    .timeline-node {
        left: 20px;
    }

    .timeline-section {
        padding-bottom: 40px !important;
    }

    .timeline-item {
        justify-content: flex-start !important;
        padding-left: 40px;
        margin-bottom: 30px !important;
    }

    .timeline-card {
        width: 100%;
    }

    .timeline-item:nth-child(even) .timeline-card::after,
    .timeline-item:nth-child(odd) .timeline-card::after {
        left: -22px;
        right: auto;
        width: 22px;
    }

    .autopsy-drawer {
        padding: 30px 20px;
    }

    .drawer-title {
        font-size: 1.8rem;
    }

    .drawer-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ==========================================================================
   FOUNDERS CONTAINER STYLES (NEW)
   ========================================================================== */
.drawer-founders-container {
    margin-bottom: 35px;
    padding: 15px 20px;
    background: rgba(6, 182, 212, 0.03);
    border: 1px solid rgba(6, 182, 212, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.drawer-founders-lbl {
    font-size: 0.75rem;
    color: var(--color-cyan);
    text-transform: uppercase;
    font-family: var(--font-headers);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.drawer-founders-val {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ==========================================================================
   SUGGESTIONS FORM SECTION (NEW)
   ========================================================================== */
.suggestion-section {
    padding: 80px 20px;
    background: rgba(13, 20, 38, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 2;
}

.suggestion-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 15px 35px -15px rgba(0, 0, 0, 0.5);
}

.suggestion-title {
    font-family: var(--font-headers);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 40%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.suggestion-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}

.suggestion-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.form-row input {
    flex: 1;
    background: rgba(5, 8, 17, 0.5);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 14px 18px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-row input:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.submit-btn {
    background: linear-gradient(135deg, var(--color-indigo), var(--color-cyan));
    border: none;
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: var(--font-headers);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
    filter: brightness(1.1);
}

.submit-btn:active {
    transform: translateY(0);
}

.suggestion-message {
    margin-top: 15px;
    font-size: 0.9rem;
    border-radius: 6px;
    padding: 10px;
    display: none;
}

.suggestion-message.info {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

.suggestion-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.suggestion-message.error {
    display: block;
    background: rgba(244, 63, 94, 0.1);
    color: var(--color-hack);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

@media (max-width: 500px) {
    .suggestion-container {
        padding: 25px 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .stats-dashboard {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat-card:nth-child(1),
    .stat-card:nth-child(2),
    .stat-card:nth-child(3),
    .stat-card:nth-child(4),
    .stat-card:nth-child(5) {
        grid-column: span 1;
    }
}