        :root {
            --bg: #0f172a;
            --card-bg: #020617;
            --card-bg-alt: #02081a;
            --text-main: #e5e7eb;
            --text-muted: #9ca3af;
            --accent: #38bdf8;
            --safe: #22c55e;
            --danger: #ef4444;
            --warn: #eab308;
            --border: #1e293b;
            --badge-bg: #111827;
            --safe-bg: rgba(34, 197, 94, 0.12);
            --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.9);
            --radius-lg: 18px;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            padding: 1.5rem;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background: radial-gradient(circle at top left, #1d283a 0, #020617 45%, #000 100%);
            color: var(--text-main);
            min-height: 100vh;
        }

        .page {
            max-width: 960px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        header.page-header {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }

        .title-row {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        h1 {
            margin: 0;
            font-size: 1.6rem;
            letter-spacing: 0.03em;
        }

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

        .pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.15rem 0.7rem;
            border-radius: 999px;
            background: rgba(15, 23, 42, 0.8);
            font-size: 0.75rem;
            color: var(--accent);
            border: 1px solid rgba(56, 189, 248, 0.35);
        }

        .pill-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: #22c55e;
            box-shadow: 0 0 8px rgba(34, 197, 94, 0.9);
        }

        .page-description {
            font-size: 0.9rem;
            color: var(--text-muted);
            max-width: 580px;
        }

        /* Stats panel */
        .stats-panel {
            margin-top: 0.5rem;
            padding: 1rem 1.2rem;
            border-radius: 16px;
            border: 1px solid rgba(148, 163, 184, 0.4);
            background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.09), rgba(15, 23, 42, 0.95));
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
        }

        .stats-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .stats-title {
            font-size: 1rem;
            font-weight: 600;
        }

        .stats-row {
            display: flex;
            flex-wrap: wrap;
            gap: 0.9rem;
        }

        .stat-pill {
            min-width: 140px;
            padding: 0.5rem 0.7rem;
            border-radius: 14px;
            background: rgba(15, 23, 42, 0.9);
            border: 1px solid rgba(148, 163, 184, 0.45);
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
        }

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

        .stat-value {
            font-size: 0.95rem;
            font-weight: 600;
        }

        .stat-value.safe {
            color: var(--safe);
        }

        .stat-value.danger {
            color: var(--danger);
        }

        .sport-stats {
            margin-top: 0.4rem;
            display: flex;
            flex-wrap: wrap;
            gap: 0.6rem;
            font-size: 0.8rem;
        }

        .sport-stat-item {
            padding: 0.35rem 0.6rem;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: rgba(15, 23, 42, 0.9);
            display: inline-flex;
            gap: 0.35rem;
            align-items: baseline;
        }

        .sport-name {
            font-weight: 500;
        }

        .sport-accuracy {
            color: var(--safe);
        }

        .sport-detail {
            color: var(--text-muted);
        }

        .stats-error {
            margin-top: 0.5rem;
            font-size: 0.85rem;
            color: #fecaca;
        }

        .games-container {
            display: flex;
            flex-direction: column; /* 1 card per row */
            gap: 1.25rem;
        }

        .game-card {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            background: linear-gradient(135deg, var(--card-bg), var(--card-bg-alt));
            padding: 1.1rem 1.25rem;
            border-radius: var(--radius-lg);
            border: 1px solid var(--border);
            box-shadow: var(--shadow-soft);
        }

        .game-card.safe {
            border-color: rgba(34, 197, 94, 0.7);
            box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3), var(--shadow-soft);
            background-image: linear-gradient(
                135deg,
                var(--card-bg),
                rgba(22, 163, 74, 0.14),
                var(--card-bg-alt)
            );
        }

        .game-header {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
        }

        .event-title {
            font-size: 1.1rem;
            font-weight: 600;
        }

        .event-subtitle {
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .badge-row {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-wrap: wrap;
        }

        .badge {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.15rem 0.6rem;
            border-radius: 999px;
            font-size: 0.75rem;
            background: var(--badge-bg);
            color: var(--text-muted);
            border: 1px solid rgba(148, 163, 184, 0.35);
        }

        .badge.safe {
            background: var(--safe-bg);
            color: var(--safe);
            border-color: rgba(34, 197, 94, 0.7);
        }

        .badge.status-poor {
            color: var(--danger);
            border-color: red;
        }

        .badge.status-underdog {
            color: var(--danger); /* red like Poor odds */
            border-color: red;
        }

        .badge.status-early,
        .badge.status-history {
            color: var(--warn);
            border-color: red;
        }

        .badge.status-closed {
            color: var(--danger);
            border-color: red;
        }

        .badge-label {
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .badge.status-underdog span.badge-dot,
        .badge.status-early span.badge-dot,
        .badge.status-history span.badge-dot,
        .badge.status-poor span.badge-dot,
        .badge.status-closed span.badge-dot {
            background: red;
        }

        .badge-dot {
            width: 7px;
            height: 7px;
            border-radius: 999px;
            background: currentColor;
        }

        .game-body {
            display: flex;
            flex-wrap: wrap;
            gap: 1.2rem;
            justify-content: space-between;
        }

        .field-group {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
            min-width: 130px;
        }

        .field-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
        }

        .field-value {
            font-size: 0.95rem;
        }

        .odds-value {
            font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        }

        .game-footer {
            margin-top: 0.4rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .time-info {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .link-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.3rem 0.9rem;
            border-radius: 999px;
            border: 1px solid rgba(56, 189, 248, 0.6);
            background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.95));
            color: var(--accent);
            font-size: 0.8rem;
            text-decoration: none;
            cursor: pointer;
            transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, border-color 0.08s ease-out;
        }

        .link-btn span.icon {
            font-size: 0.9rem;
        }

        .link-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.9);
            border-color: rgba(56, 189, 248, 0.9);
        }

        .empty-state {
            margin-top: 2rem;
            padding: 1.2rem 1.4rem;
            border-radius: 16px;
            border: 1px dashed rgba(148, 163, 184, 0.5);
            background: rgba(15, 23, 42, 0.7);
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .error {
            margin-top: 2rem;
            padding: 1rem 1.2rem;
            border-radius: 14px;
            border: 1px solid rgba(239, 68, 68, 0.7);
            background: rgba(127, 29, 29, 0.2);
            color: #fecaca;
            font-size: 0.9rem;
        }

        @media (max-width: 640px) {
            body {
                padding: 1rem;
            }

            .game-card {
                padding: 1rem;
            }
        }