﻿@import url('./hype_animation.css');

:root {
    --bg-main: #ffffff;
    --bg-surface: #f8f8f8;

    --primary-brown: #321004;
    --secondary-gold: #C5A065;

    --text-main: #321004;
    --text-muted: #666666;
    --text-on-primary: #ffffff;

    --border-color: #e5e5e5;

    --font-display: 'Fahkwang', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius: 2px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: auto;
    /* Fix infinite resize loop in iframes */
    overflow-x: hidden;
    /* Prevent horizontal scrollbar in embeds */
}

/* Header */
/* Header */
header {
    background-color: var(--bg-main);
    padding: 1.5rem 0;
    /* Vertical padding only */
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    /* Match main content side padding */
}

.logo-area h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-brown);
    letter-spacing: 0.5px;
}

.event-details {
    color: var(--secondary-gold);
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 0.2rem;
}

.event-date {
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-top: 0.1rem;
    font-weight: 400;
}

/* Old subtitle class removal if unused, or keep for safety */
.subtitle {
    display: none;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.primary {
    background-color: var(--primary-brown);
    color: var(--text-on-primary);
}

.btn.primary:hover {
    background-color: #4a1a08;
    /* Slightly lighter brown */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(50, 16, 4, 0.15);
}

.btn.secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn.secondary:hover {
    border-color: var(--primary-brown);
    color: var(--primary-brown);
    background-color: var(--bg-surface);
}

.full-width {
    width: 100%;
    margin-top: 1rem;
}

/* Inline Editing */
.clickable-cell {
    cursor: pointer;
    transition: background-color 0.2s;
}

.clickable-cell:hover {
    background-color: rgba(197, 160, 101, 0.1);
    /* Light gold hover */
    position: relative;
}

/* Header Sort Icon (Always Visible) */
th.clickable-cell {
    position: relative;
    padding-right: 1.5rem !important;
    /* Make room */
}

th.clickable-cell::after {
    content: "\21F5";
    /* Sort arrow ⇅ */
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

th.clickable-cell:hover::after {
    opacity: 1;
}

/* Data Cell Edit Icon Removed */

.inline-edit {
    width: 100%;
    padding: 4px;
    border: 2px solid var(--secondary-gold);
    border-radius: 4px;
    font-family: inherit;
    font-size: inherit;
    text-align: center;
    background: var(--bg-surface);
    color: var(--text-main);
}

.empty-cell {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.seed-time {
    color: #999;
    font-style: italic;
    font-family: var(--font-number);
    opacity: 0.7;
}

/* Print Styles */
/* Print Styles */
@media print {
    @page {
        margin: 0.5cm;
        size: auto;
    }

    body {
        background-color: white;
        color: black;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Hide Navigation and Actions */
    header button,
    #grandma-view,
    #tracker-actions,
    .tab-btn,
    .filter-controls,
    .gap-controls,
    #gap-viz-container select,
    .dashboard-controls,
    #dashboard-container,
    .results-legend,
    .btn,
    .no-print {
        display: none !important;
    }

    /* Clean up Header */
    header {
        border-bottom: 2px solid var(--primary-brown);
        padding: 1rem 0;
        /* justify-content: center; <-- No longer relevant on header itself */
    }

    .header-content {
        display: block;
        text-align: center;
        width: 100%;
        margin: 0 auto;
    }

    .logo-area {
        text-align: center;
        width: 100%;
    }

    main {
        padding: 0;
        margin: 0;
        max-width: 100%;
        box-shadow: none;
    }

    /* Print Branding Footer */
    body::after {
        content: "Service provided by SaltyGoldSupply.com";
        display: block;
        text-align: center;
        font-family: var(--font-display);
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-top: 2rem;
        padding-top: 1rem;
        border-top: 1px solid #ccc;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    /* Table Improvements */
    .standings-container {
        border: none;
        box-shadow: none;
        width: 100%;
        overflow: visible;
    }

    table {
        font-size: 10pt;
        /* Smaller font for print */
        width: 100%;
    }

    th {
        color: black;
        border-bottom: 2px solid #000;
        padding: 4px 8px !important;
        /* Compact padding */
        font-size: 9pt;
    }

    td {
        border-bottom: 1px solid #ccc;
        padding: 4px 8px !important;
        /* Compact padding */
    }

    /* Column Widths to balance table */
    th:nth-child(1) {
        width: 4%;
        text-align: center;
    }

    /* Rank */
    th:nth-child(2) {
        width: 22%;
    }

    /* Name - limit wide gap */
    th:nth-child(3),
    th:nth-child(4),
    th:nth-child(5),
    th:nth-child(6) {
        width: 13%;
    }

    /* Distances */
    th:nth-child(7) {
        width: 10%;
    }

    /* Pts */
    th:nth-child(8) {
        width: 12%;
    }

    /* Gap */

    /* Adjust specific columns if needed */
    .rank-col {
        /* Width handled by nth-child */
    }

    /* Visualizer Print Tweaks */
    #gap-viz-container {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 2rem;
        background: white !important;
        /* Force white background */
    }

    canvas {
        max-width: 100% !important;
        height: auto !important;
        /* Invert visualizer colors for print if it was dark mode */
        /* filter: invert(1) hue-rotate(180deg);  <-- Careful with this, might look weird */
    }

    /* Empty State Print Optimization */
    .empty-message-cell {
        padding: 2rem 1rem !important;
        /* Reduce whitespace */
        color: black !important;
        /* Ensure visibility */
        border: 1px solid #ddd;
    }

    /* Force Table to fit */
    table {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* Hide Scrollbars */
    .standings-container {
        overflow: visible !important;
        box-shadow: none !important;
        border: none !important;
    }
}

/* Main Content */
main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1.1rem;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-brown);
    border-bottom-color: var(--secondary-gold);
    font-weight: 600;
}

.tab-btn:hover:not(.active) {
    color: var(--secondary-gold);
}

/* Standings Table - Clean Layout (No Card Hover) */
.standings-container {
    width: 100%;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.95rem;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Row Hover Effect (Professional Lift) */
tbody tr {
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.1s;
    border-left: 4px solid transparent;
    /* Accent bar placeholder */
}

tbody tr:hover {
    transform: translateY(-2px) scale(1.002);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
    border-left-color: var(--secondary-gold);
    background-color: #ffffff;
    /* Fallback */
}

/* Ensure Medal Rows keep their bg on hover, maybe darken? */
tbody tr td {
    vertical-align: middle;
    /* Fix vertical alignment */
}

tbody tr:nth-child(1):hover {
    background-color: rgba(197, 160, 101, 0.25);
}

tbody tr:nth-child(2):hover {
    background-color: rgba(200, 205, 210, 0.3);
}

tbody tr:nth-child(3):hover {
    background-color: rgba(205, 127, 50, 0.2);
}

/* Specific Cutoff/Target rules might need checking */
.rank-col {
    color: var(--secondary-gold);
    font-weight: 700;
    font-family: var(--font-display);
    width: 60px;
    text-align: center;
}

th:first-child {
    text-align: center;
}

/* Interactive Rank */
.rank-col.clickable-cell {
    cursor: pointer;
}

.rank-col.clickable-cell:hover {
    color: #d12e2e;
    text-decoration: underline;
}

/* Top 5 Highlight */
tbody tr:nth-child(-n+5) {
    background-color: rgba(197, 160, 101, 0.08);
    /* Light Gold */
}

/* Cutoff Line */
tr.cutoff-line td {
    border-bottom: 3px solid var(--secondary-gold) !important;
}

/* Target Row Styling (Subtle) */
tr.target-row .rank-col {
    color: #d12e2e;
    font-weight: 800;
}

tr.target-row {
    /* No border, just text cues */
    background-color: rgba(209, 46, 46, 0.03);
}

/* Ensure Sticky Headers are Solid */
thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: #f8f8f8;
    /* Force solid background matches bg-surface */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    /* Subtle shadow line */
    clip-path: inset(0 0 -10px 0);
    /* Allows shadow to show outside */
}



th:last-child {
    text-align: right;
}

.points-col {
    font-weight: 700;
    color: var(--primary-brown);
    text-align: right;
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.gap-col {
    font-family: var(--font-number);
    font-weight: 600;
    color: #d12e2e;
    /* Red for danger */
    text-align: right;
    font-size: 0.9rem;
    cursor: help;
    /* Show ? cursor for tooltip */
}

.time-cell {
    font-family: var(--font-body);
    font-weight: 500;
}

.points-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.badge-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 1.1em;
    cursor: help;
    transition: transform 0.2s;
}

.badge-icon:hover {
    transform: scale(1.2);
}

/* Modal */
/* Badge Legend */
.badge-legend-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s, background 0.2s;
}

.badge-legend-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary-gold);
}

.badge-legend-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.badge-legend-title {
    font-weight: 700;
    color: var(--secondary-gold);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.badge-legend-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Modal Wrapper */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass to overlay if outside content */
}

/* Modal Variable Overrides */
.modal-content {
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary-brown: #fbbf24;
    /* Make headings Gold in dark mode */
    --secondary-gold: #fbbf24;
    --border-color: rgba(255, 255, 255, 0.1);

    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    /* Premium Gradient */
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 480px;
    color: var(--text-main);
    max-height: 90vh;
    overflow-y: auto;
    pointer-events: auto;
    position: relative;
    font-family: var(--font-body);
}

/* Modal Headers force color */
.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content h4,
.modal-content h5 {
    color: #f1f5f9 !important;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

/* Ensure paragraph text is readable */
.modal-content p,
.modal-content li {
    color: #cbd5e1 !important;
    line-height: 1.6;
}

.modal-content strong {
    color: #fff !important;
}

.modal-content.huge {
    max-width: 800px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal h2 {
    color: var(--primary-brown);
    font-family: var(--font-display);
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.modal-tabs {
    background-color: var(--bg-surface);
    padding: 0.25rem;
    border-radius: var(--radius);
    display: flex;
    gap: 0;
}

.modal-tab-btn {
    flex: 1;
    padding: 0.6rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-tab-btn.active {
    background-color: #fff;
    color: var(--primary-brown);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.form-group label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.1);
}

.description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Rules & Info Typography */
.rules-body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.7;
    /* Increased line height */
    font-size: 1rem;
}

.rules-body h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--primary-brown);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--secondary-gold);
    /* Thicker accent */
    padding-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.rules-body h3:first-child {
    margin-top: 0;
}

.rules-body h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--primary-brown);
    /* Match primary */
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.rules-body h4::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 1.2rem;
    background-color: var(--secondary-gold);
    margin-right: 0.8rem;
    border-radius: 2px;
}

.rules-body h5 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #555;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.2rem;
    display: inline-block;
}

.rules-body p {
    margin-bottom: 1.2rem;
    color: #333;
}

.rules-body ul {
    margin-bottom: 2rem;
    padding-left: 1rem;
    list-style-type: none;
}

.rules-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.rules-body ul li::before {
    content: "\27A4";
    /* Arrow bullet  */
    /* Arrow bullet */
    color: var(--secondary-gold);
    font-size: 0.8rem;
    position: absolute;
    left: 0;
    top: 0.2rem;
}

/* Tables in Rules */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.rules-table th {
    background-color: var(--primary-brown);
    color: white;
    padding: 1rem 1.2rem;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.rules-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    color: #444;
}

.rules-table tr:nth-child(even) {
    background-color: #fafafa;
    /* Striped rows */
}

.rules-table tr:last-child td {
    border-bottom: none;
}

/* Close Btn */
.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--primary-brown);
}

/* Utilities */
.hidden {
    display: none !important;
}

#overlay {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1500;
}

/* Modal Styles (Global) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* Darker for better focus */
    backdrop-filter: blur(8px);
    z-index: 2200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    cursor: pointer;
    /* Indication that you can click to close */
}

.modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: transparent;
    /* Changed from white to transparent to let card shine */
    padding: 0;
    /* Remove padding */
    border-radius: 0;
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: visible;
    /* Allow glow to spill */
    animation: modalPop 0.3s ease-out;
    cursor: default;
    /* Don't show pointer on the card itself */
}

@keyframes modalPop {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-x {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin: 0;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    font-weight: 300;
}

.close-x:hover {
    opacity: 1;
    transform: scale(1.1);
    color: var(--secondary-gold);
}

/* Hype Card Styling - Structurally Minimal Base */
.hype-card {
    /* Default variables */
    --hype-accent: #ffd700;
    --hype-bg-color: #1a1a1a;

    background: var(--hype-bg-color);
    /* Fallback */
    border: 1px solid var(--hype-accent);
    border-radius: 20px;
    padding: 1rem;
    color: white;

    /* Layout */
    position: relative;
    overflow: hidden;
    font-family: var(--font-display);
    text-align: center;

    /* Dimensions - Instagram Story (9:16) */
    aspect-ratio: 9/16;
    width: 100%;
    max-width: 450px;
    /* Cap width */
    max-height: 80vh;
    /* Ensure fits on screen */

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* STANDARD THEME (Rockstar Gold) */
.hype-card[data-theme="standard"] {
    background: linear-gradient(135deg, var(--hype-bg-color) 0%, #000 100%);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.9),
        inset 0 0 100px rgba(197, 160, 101, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Texture Overlay - Only for Standard */
.hype-card[data-theme="standard"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 215, 0, 0.15) 0%, transparent 70%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.3) 10px, rgba(0, 0, 0, 0.3) 20px);
    pointer-events: none;
    z-index: 1;
}



.hype-header {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--hype-accent);
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--hype-accent);
    position: relative;
    z-index: 2;
}

.hype-event {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.9;
}

.hype-year {
    font-weight: 900;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 0 12px rgba(197, 160, 101, 0.8);
}

.hype-main {
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Glowing Rank Badge */
.hype-rank-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
    background: linear-gradient(135deg, var(--hype-accent), #B8860B);
    color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px var(--hype-accent);
    /* Intense Glow */
    border: 5px solid white;
    transform: scale(1.1);
    text-align: center;
}

#hype-rank-num {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 0.9;
    margin: 0;
    padding: 0;
    margin-top: 4px;
    /* Slight visual optical adjustment */
    text-align: center;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
    display: block;
}

#hype-rank-label {
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer to prevent cutoff */
.hype-footer {
    margin-top: auto;
    padding: 0.5rem 0 0.5rem 0;
    /* Add bottom padding */
    text-align: center;
    width: 100%;
}

.hype-brand {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--hype-accent);
    opacity: 0.8;
    margin-bottom: 2px;
}

.hype-site {
    font-size: 0.55rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Rockstar Name with Shimmer */
/* Rockstar Name - Simplified for Safety */
#hype-name {
    font-size: 2.5rem;
    margin: 0;
    line-height: 0.9;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--hype-accent);
    /* Solid Gold */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 2px 2px 0px rgba(0, 0, 0, 0.5);
    letter-spacing: -2px;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

#hype-country {
    color: #ddd;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 6px;
    margin-top: 1rem;
    opacity: 0.9;
    font-family: var(--font-body);
}

/* Stats Logic */
.hype-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* Theme Switcher */
.hype-theme-switcher {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.6;
    padding: 5px;
    border-radius: 50%;
}

.theme-btn:hover {
    transform: scale(1.2);
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.theme-btn.active {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--hype-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
    font-weight: 700;
}

.stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-number);
    color: #fff;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* --- Theme Specific Styles --- */



/* =========================================
   THEME: PHILOSOPHER (The Roman Coliseum)
   ========================================= */

/* =========================================
   THEME: PHILOSOPHER (The Roman Coliseum)
   ========================================= */
.hype-card[data-theme="philosopher"] {
    --hype-accent: #d4af37 !important;
    /* Metallic Gold */
    --hype-bg-color: #f2f2f2 !important;
    /* Marble White */

    font-family: 'Times New Roman', serif !important;
    text-transform: uppercase;
    color: #1a1a1a !important;

    /* Marble Background with texture */
    background:
        linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)),
        url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.05' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='%23f0f0f0'/%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E") !important;

    /* Roman Pillar Border Effect */
    border-radius: 4px !important;
    border: none !important;
    box-shadow:
        inset 15px 0 0 0 #d4af37,
        /* Left Pillar Gold */
        inset -15px 0 0 0 #d4af37,
        /* Right Pillar Gold */
        inset 20px 0 5px 0 rgba(0, 0, 0, 0.1),
        /* Left Shadow */
        inset -20px 0 5px 0 rgba(0, 0, 0, 0.1),
        /* Right Shadow */
        0 10px 30px rgba(0, 0, 0, 0.5) !important;

    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* FIX: Dark Header Text for Philosopher */
.hype-card[data-theme="philosopher"] .hype-event,
.hype-card[data-theme="philosopher"] .hype-year {
    color: #3e2b14 !important;
    /* Dark Bronze - High Contrast */
    text-shadow: none !important;
}

.hype-card[data-theme="philosopher"] .hype-header {
    border-bottom: 2px solid #d4af37 !important;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.hype-card[data-theme="philosopher"] .hype-rank-badge {
    background: linear-gradient(135deg, #d4af37, #aa8822) !important;
    color: white !important;
    border: 3px double white !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    border-radius: 50% !important;
}

/* FIX: High Contrast Name */
.hype-card[data-theme="philosopher"] #hype-name {
    font-family: 'Times New Roman', serif !important;
    letter-spacing: 1px;
    color: #3e2b14 !important;
    /* Dark Bronze/Brown */
    background: none !important;
    -webkit-text-fill-color: #3e2b14 !important;
    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.8), 0 0 0 rgba(0, 0, 0, 0.1);
    font-weight: 900;
}

/* FIX: Dark text stats */
.hype-card[data-theme="philosopher"] .stat-val {
    color: #2c241b !important;
    font-family: 'Times New Roman', serif !important;
    font-weight: 800;
    text-shadow: none !important;
}

.hype-card[data-theme="philosopher"] .stat-label {
    color: #665544 !important;
    font-weight: bold;
    letter-spacing: 1px;
}

/* FIX: Unified Stats Background */
.hype-card[data-theme="philosopher"] .hype-stats {
    background: rgba(62, 43, 20, 0.05) !important;
    border: 1px solid rgba(62, 43, 20, 0.1) !important;
    box-shadow: none !important;
}

/* =========================================
   THEME: MOVIE (The Blockbuster Poster)
   ========================================= */
.hype-card[data-theme="movie"] {
    --hype-accent: #d32f2f !important;
    /* Action Red */
    --hype-bg-color: #121212 !important;

    font-family: 'Oswald', 'Impact', sans-serif !important;
    color: #e0e0e0 !important;
    text-transform: uppercase;

    /* Poster Background */
    background:
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%),
        radial-gradient(circle at center top, #2c3e50, #000) !important;

    border-radius: 2px !important;
    border: 8px solid #fff !important;
    /* Poster Frame */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;

    padding: 1.5rem !important;
    position: relative;
    overflow: hidden !important;
}

/* Texture Overlay */
.hype-card[data-theme="movie"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Header: "COMING SOON" Vibe */
.hype-card[data-theme="movie"] .hype-header {
    border-bottom: none !important;
    text-align: center;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
}

.hype-card[data-theme="movie"] .hype-event {
    font-size: 0.8rem !important;
    letter-spacing: 0.5rem !important;
    color: #aaa !important;
    margin-bottom: 0.2rem;
}

.hype-card[data-theme="movie"] .hype-year {
    font-size: 0.8rem !important;
    letter-spacing: 0.2rem !important;
    color: #d32f2f !important;
}

/* Rank Badge: "Review Score" Seal */
.hype-card[data-theme="movie"] .hype-rank-badge {
    background: #d32f2f !important;
    color: white !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    transform: rotate(15deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
    top: 20px !important;
    right: 20px !important;
}

/* Name: The Movie Title */
.hype-card[data-theme="movie"] #hype-name {
    font-family: 'Impact', sans-serif !important;
    font-size: 3.5rem !important;
    line-height: 0.9;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #fff 0%, #ccc 50%, #999 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    margin: 1rem 0 2rem 0 !important;
    transform: scaleY(1.3);
    /* Stretch it tall */
    position: relative;
    z-index: 1;
}

/* Stats: Billing Block Style */
.hype-card[data-theme="movie"] .hype-stats {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.hype-card[data-theme="movie"] .stat-item {
    display: flex !important;
    flex-direction: column-reverse;
    /* Label below value */
    align-items: center;
    margin: 0 0.5rem;
}

.hype-card[data-theme="movie"] .stat-val {
    font-family: 'Oswald', sans-serif !important;
    /* Condensed */
    color: #fff !important;
    font-size: 1.6rem !important;
    text-shadow: none !important;
    font-weight: 300 !important;
}

.hype-card[data-theme="movie"] .stat-label {
    font-family: sans-serif !important;
    font-size: 0.6rem !important;
    letter-spacing: 1px;
    color: #888 !important;
    text-transform: uppercase;
}

/* Hype Check / Quote */
.hype-card[data-theme="movie"] .hype-check {
    font-family: 'Courier New', monospace !important;
    font-style: italic;
    color: #d32f2f !important;
    margin-top: 2rem !important;
    border-top: 1px solid #333;
    padding-top: 1rem;
    font-size: 0.9rem !important;
}

/* Footer: "IN THEATERS" */
.hype-card[data-theme="movie"] .hype-footer {
    justify-content: center !important;
    letter-spacing: 0.3rem !important;
    color: #555 !important;
    font-size: 0.7rem !important;
    margin-top: auto;
    border-top: none !important;
}

/* =========================================
   THEME: COMEDIAN (Comedy Club)
   ========================================= */
.hype-card[data-theme="comedian"] {
    --hype-accent: #ff00ff !important;
    /* Neon Pink */
    --hype-bg-color: #220022 !important;

    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif !important;
    color: #fff !important;

    /* Brick Wall Background */
    background:
        linear-gradient(rgba(30, 0, 30, 0.85), rgba(0, 0, 0, 0.95)),
        repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.4) 10px,
            rgba(0, 0, 0, 0.4) 20px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Cpath fill='%23600' fill-opacity='0.4' d='M0 0h20v10H0zm20 10h20v10H20zM0 10h10v10H0zM30 0h10v10H30z'/%3E%3C/svg%3E") !important;
    background-color: #311 !important;

    border-radius: 20px !important;
    border: 4px solid #ff00ff !important;
    box-shadow:
        0 0 20px #ff00ff,
        inset 0 0 50px #000 !important;

    padding: 1rem !important;
    position: relative;
    overflow: hidden;
}

/* Spotlight Effect */
.hype-card[data-theme="comedian"]::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 20%;
    right: 20%;
    height: 300px;
    background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: rotate(-10deg);
}

.hype-card[data-theme="comedian"] .hype-header {
    border-bottom: 2px dashed #ff00ff !important;
}

.hype-card[data-theme="comedian"] .hype-rank-badge {
    background: #ffcc00 !important;
    color: #000 !important;
    border: 3px solid #fff !important;
    transform: rotate(10deg);
    box-shadow: 2px 2px 0px #000 !important;
    font-family: 'Arial Black', sans-serif !important;
}

.hype-card[data-theme="comedian"] #hype-name {
    font-family: 'Comic Sans MS', sans-serif !important;
    color: #ffcc00 !important;
    text-shadow: 3px 3px 0px #ff00ff;
    transform: rotate(-2deg);
}

.hype-card[data-theme="comedian"] .hype-stats {
    background: rgba(255, 255, 255, 0.1) !important;
    /* Glassy */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(5px);
    border-radius: 10px;
}

.hype-card[data-theme="comedian"] .stat-val {
    color: #fff !important;
    text-shadow: 0 0 5px #ff00ff;
}

.hype-card[data-theme="comedian"] .hype-check {
    font-family: 'Courier New', monospace !important;
    color: #ff00ff !important;
    background: #000;
    padding: 10px;
    border: 1px solid #ff00ff;
    border-radius: 5px;
    box-shadow: 0 0 10px #ff00ff;
    margin-top: 20px !important;
    font-style: italic;
    position: relative;
    z-index: 2;
}

/* =========================================
   THEME: ANALYST (Engineering Blueprint)
   ========================================= */
.hype-card[data-theme="analyst"] {
    --hype-accent: #ffffff !important;
    --hype-bg-color: #003366 !important;
    /* Blueprint Blue */

    font-family: 'Consolas', 'Monaco', monospace !important;
    color: #fff !important;

    /* Blueprint Grid */
    background:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) !important;
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px !important;
    background-color: #003366 !important;

    border-radius: 4px !important;
    border: 4px solid #fff !important;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.5),
        5px 5px 0px rgba(0, 0, 0, 0.2) !important;

    padding: 1.5rem !important;
}

.hype-card[data-theme="analyst"] .hype-header {
    border-bottom: 2px solid #fff !important;
}

.hype-card[data-theme="analyst"] .hype-rank-badge {
    background: transparent !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    border-radius: 0 !important;
    /* Square for technical look */
    box-shadow: none !important;
}

.hype-card[data-theme="analyst"] #hype-name {
    font-family: 'Consolas', monospace !important;
    letter-spacing: -1px;
    text-transform: uppercase;
    text-shadow: none !important;
}

/* Calculator Container - Compacted for Tactician */
.hype-card[data-theme="analyst"] .analyst-ui {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px;
    /* Reduced from 15px */
    margin-top: 5px;
    /* Reduced from 10px */
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* Reduced from 10px */
}

.hype-card[data-theme="analyst"] .analyst-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    /* Smaller text */
}

.hype-card[data-theme="analyst"] input[type="range"] {
    width: 60%;
    accent-color: #fff;
    height: 4px;
    /* Thinner slider */
}

.hype-card[data-theme="analyst"] .analyst-result {
    margin-top: 5px;
    /* Reduced from 15px */
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    padding-top: 5px;
    /* Reduced from 10px */
    text-align: center;
    font-size: 0.9rem;
}

.hype-card[data-theme="analyst"] .analyst-highlight {
    color: #00ff00;
    font-weight: bold;
    font-size: 1.1rem;
    /* Slightly smaller */
}

/* Force Stats Grid to be compact in Tactician */
.hype-card[data-theme="analyst"] .hype-stats {
    padding: 0.5rem !important;
    gap: 5px !important;
}

.hype-card[data-theme="analyst"] .stat-val {
    font-size: 1.2rem !important;
}

.hype-card[data-theme="analyst"] .stat-label {
    font-size: 0.6rem !important;
}

/* Info Guide / Rules Modal Styles */
.modal-content.huge {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-brown);
    font-family: var(--font-display);
    text-transform: uppercase;
}

.rules-body h3,
.rules-body h4,
.rules-body h5 {
    color: var(--primary-brown) !important;
    font-family: var(--font-display) !important;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.rules-body p,
.rules-body ul {
    color: var(--text-main) !important;
    line-height: 1.6;
}

.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
    background-color: var(--bg-main);
}

.rules-table th {
    background-color: var(--primary-brown);
    color: var(--secondary-gold);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-family: var(--font-display);
    border-bottom: 2px solid var(--secondary-gold);
}

.rules-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.rules-table tr:last-child td {
    border-bottom: none;
}

.rules-table tr:nth-child(even) {
    background-color: var(--bg-surface);
}


/* FORCE OVERRIDES FOR INFO GUIDE */
#rules-modal .modal-content {
    background-color: #ffffff !important;
    color: #321004 !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

#rules-modal .modal-header h2 {
    color: #321004 !important;
}

#rules-modal .rules-body h3,
#rules-modal .rules-body h4,
#rules-modal .rules-body h5 {
    color: #321004 !important;
}

#rules-modal .rules-body p,
#rules-modal .rules-body ul,
#rules-modal .rules-body li {
    color: #321004 !important;
}

#rules-modal .rules-table {
    background-color: #ffffff !important;
    border: 1px solid #e5e5e5;
}

#rules-modal .rules-table th {
    background-color: #321004 !important;
    color: #C5A065 !important;
    border-bottom: 2px solid #C5A065 !important;
}

#rules-modal .rules-table td {
    color: #321004 !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

#rules-modal .rules-table tr:nth-child(even) {
    background-color: #f8f8f8 !important;
}


/* FIX LAYOUT & SCROLLING */
#rules-modal.modal,
#grandma-modal.modal {
    display: flex;
    /* Ensure flex centering works */
    align-items: center;
    /* Vertical center */
    justify-content: center;
    /* Horizontal center */
    padding: 20px;
    /* Prevent edge touching */
    overflow: hidden;
    /* Prevent body scroll interaction */
}

#rules-modal .modal-content,
#grandma-modal .modal-content {
    max-height: 90vh;
    /* restrict height to view */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* container doesn't scroll, body does */
    position: relative;
    border-radius: 8px;
    /* Clean corners */
    margin: 0 auto;
    /* Center horizontal */
}

#rules-modal .rules-body,
#grandma-modal .rules-body {
    overflow-y: auto;
    /* ENABLE SCROLLING */
    padding: 20px;
    flex: 1;
    /* Take remaining space */
}

#rules-modal .modal-header,
#grandma-modal .modal-header {
    flex-shrink: 0;
    /* Header stays fixed */
    padding: 15px 20px;
    background-color: var(--bg-main);
    z-index: 10;
    position: relative;
}


/* Fix Invisible Strong Tags */
#rules-modal .rules-body strong {
    color: #321004 !important;
    font-weight: 700;
}


/* DISABLE SCROLLING & HOVER FOR INFO TABLE */
#rules-modal .table-wrapper {
    overflow-x: hidden !important;
    /* Hide horizontal scroll */
    box-shadow: none !important;
    /* Flatten */
    margin: 1rem 0 !important;
}

#rules-modal .rules-table tr:hover {
    background-color: transparent !important;
    /* Disable hover highlight */
    cursor: default !important;
    /* Remove pointer */
}

#rules-modal .rules-table td:hover {
    background-color: transparent !important;
}


/* PRINT STYLING - Hide UI elements */
@media print {

    /* Hide Action Buttons & Icons */
    .grandma-btn,
    .hype-card-btn,
    .gap-btn,
    .btn-mini {
        display: none !important;
    }

    /* Hide Legend and Navigation */
    .results-legend,
    .site-header,
    nav,
    .nav-buttons,
    #about-btn,
    #show-tracker-btn,
    .controls-row,
    /* Contains gap select */

    /* Hide Visualizer Canvas */
    #gap-canvas,
    .visualizer-container,

    /* Hide Sort Arrows (span inside th) */
    th.clickable-cell span {
        display: none !important;
    }

    /* Reset Layout for Paper */
    body,
    .app-container {
        background-color: white !important;
        color: black !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* Table Improvements */
    table {
        width: 100% !important;
        border: 1px solid #ddd !important;
    }

    th {
        background-color: #f0f0f0 !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }

    td {
        border-bottom: 1px solid #ddd !important;
        color: black !important;
    }

    /* Hide "Select" circle in name column */
    .clickable-cell div span[style*="border-radius:50%"] {
        display: none !important;
    }

    /* Fix alignment after hiding circle */
    .clickable-cell div {
        padding-left: 0 !important;
    }
}

/* --- Gamification Badges --- */
.hype-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0.5rem 0 1rem 0;
    min-height: 30px;
    /* Prevent layout shift */
}

.badge {
    font-size: 1.5rem;
    position: relative;
    cursor: help;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.badge:hover {
    transform: scale(1.4);
    z-index: 10;
}

/* Tooltip Badge Logic */
.badge::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-family: var(--font-display);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    margin-bottom: 8px;
    border: 1px solid var(--hype-accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }

    .header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .logo-area {
        text-align: center;
    }

    .actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Scrollable Table for Mobile */
    .standings-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 2rem;
        padding-bottom: 0.5rem;
        /* Space for scrollbar */
    }

    table {
        min-width: 900px;
        /* Force table to retain shape */
    }

    /* Adjust font sizes for mobile */
    th,
    td {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}

/* --- OVERLAY BACKDROP --- */
/* Overlay Removed for Revert */