/* ============================================================================
   PLAYPICKERS.COM - PROFESSIONAL DARK THEME
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Graduate&family=Space+Grotesk:wght@400;500;600;700&display=swap');

@font-face {
    font-family: "Jersey M54";
    src: url("/static/fonts/jersey-m54/Jersey%20M54.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Typography */
    --font-body: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
    --font-display: "Jersey M54", "Space Grotesk", "Trebuchet MS", sans-serif;
    --font-label: "Barlow Condensed", "Space Grotesk", sans-serif;
    --font-window-title: "Graduate", "Space Grotesk", "Trebuchet MS", sans-serif;

    /* Dark Theme Colors */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #0b0b0b;
    --card-bg: rgba(0, 0, 0, 0.78);
    --card-hover: rgba(10, 10, 10, 0.88);
    --surface: rgba(0, 0, 0, 0.74);
    --surface-elevated: rgba(10, 10, 10, 0.9);
    --surface-contrast: #f0f0f0;

    /* CFP Accent Colors */
    --gold: #d4a929;
    --gold-dark: #a17d1a;
    --gold-light: #e8c45f;
    --gold-glow: rgba(212, 169, 41, 0.4);
    --action: #2e8223;
    --action-dark: #206018;
    --action-light: #3ca32f;
    --action-glow: rgba(46, 130, 35, 0.4);
    --primary-color: #2e8223;
    --primary-hover: #3ca32f;
    --primary-dark: #206018;
    --accent: #d4a929;
    --accent-color: #d4a929;
    --accent-secondary: #e8c45f;
    --secondary-color: #44536b;
    --success-color: #2e8223;
    --success-bright: #3ca32f;
    --warning-color: #f6b84a;
    --danger-color: #ef4444;

    /* Text Colors */
    --text-primary: #f5f7fb;
    --text-secondary: #c2cedf;
    --text-tertiary: #9aa9c2;
    --text-muted: #7c8ba4;

    /* Borders & Shadows */
    --border-color: #2a3a52;
    --border-hover: #3a4c6a;
    --border-strong: #3a4d6a;
    --border: var(--border-color);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 22px rgba(212, 169, 41, 0.18);
    --glow: 0 0 14px rgba(212, 169, 41, 0.24);
    --gradient-primary: linear-gradient(135deg, #2e8223 0%, #206018 100%);
    --gradient-accent: linear-gradient(135deg, #d4a929 0%, #e8c45f 100%);

    /* Spacing system */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;
}

html[data-theme="light"] {
    --bg-primary: #f4f7fb;
    --bg-secondary: #e7edf5;
    --bg-tertiary: #dae4ef;
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-hover: rgba(245, 248, 252, 0.98);
    --surface: rgba(255, 255, 255, 0.88);
    --surface-elevated: rgba(255, 255, 255, 0.98);
    --surface-contrast: #0e1522;
    --text-primary: #0f1726;
    --text-secondary: #3a4a62;
    --text-tertiary: #5a6a84;
    --text-muted: #6d7c96;
    --border-color: #d4dde8;
    --border-hover: #c2cedb;
    --border-strong: #b9c6d6;
    --shadow: 0 8px 20px rgba(15, 23, 38, 0.08);
    --shadow-lg: 0 16px 34px rgba(15, 23, 38, 0.12);
    --shadow-glow: 0 0 18px rgba(47, 139, 85, 0.16);
    --glow: 0 0 12px rgba(47, 139, 85, 0.2);
}

/* CFP Championship Atmosphere Background */
html {
    background:
        /* Scratches and wear texture */
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20,10 L25,15 M40,30 L50,35 M70,20 L72,25 M15,60 L18,68 M55,70 L58,75 M80,50 L85,58' stroke='rgba(255,255,255,0.02)' stroke-width='0.5' /%3E%3C/svg%3E"),
        /* Subtle noise texture for depth */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E"),
        /* Stadium spotlights from above - more prominent gold glow */
        radial-gradient(ellipse 1400px 1000px at 50% 0%, rgba(212, 169, 41, 0.14) 0%, rgba(212, 169, 41, 0.06) 30%, transparent 60%),
        radial-gradient(ellipse 1000px 700px at 30% 5%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 1000px 700px at 70% 5%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
        /* Gold accent glow */
        radial-gradient(circle at 50% 50%, rgba(212, 169, 41, 0.08) 0%, transparent 60%),
        /* Subtle diagonal lines - field inspired */
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 100px,
            rgba(212, 169, 41, 0.01) 100px,
            rgba(212, 169, 41, 0.01) 101px
        ),
        /* Deep gradient base */
        linear-gradient(180deg,
            #000000 0%,
            #050505 20%,
            #0a0a0a 50%,
            #050505 80%,
            #000000 100%
        );
    background-size: 100px 100px, 400px 400px, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    min-height: 100vh;
}

/* Light mode - Championship day atmosphere */
html[data-theme="light"] {
    background:
        /* Scratches and wear texture */
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20,10 L25,15 M40,30 L50,35 M70,20 L72,25 M15,60 L18,68 M55,70 L58,75 M80,50 L85,58' stroke='rgba(0,0,0,0.05)' stroke-width='0.8' /%3E%3C/svg%3E"),
        /* Dark noise texture visible on light background */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='black' filter='url(%23noise)'/%3E%3C/svg%3E"),
        /* Stadium spotlights from above - white light */
        radial-gradient(ellipse 1400px 1000px at 50% 0%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 30%, transparent 60%),
        radial-gradient(ellipse 1000px 700px at 30% 5%, rgba(255, 255, 255, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse 1000px 700px at 70% 5%, rgba(255, 255, 255, 0.4) 0%, transparent 60%),
        /* Diagonal texture */
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 100px,
            rgba(212, 169, 41, 0.015) 100px,
            rgba(212, 169, 41, 0.015) 101px
        ),
        /* Clean gradient */
        linear-gradient(180deg,
            #fafafa 0%,
            #f5f5f5 30%,
            #ffffff 50%,
            #f5f5f5 70%,
            #fafafa 100%
        );
    background-size: 100px 100px, 400px 400px, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

body {
    font-family: var(--font-body);
    background: transparent;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[data-theme="light"] body {
    background: transparent;
    color: var(--text-primary);
}

body > * {
    position: relative;
    z-index: 1;
}

.nav {
    z-index: 1000 !important;
}

main.main-content {
    margin-top: 80px; /* Height of fixed nav */
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    main.main-content {
        margin-top: 84px; /* Height of fixed nav on larger screens */
    }
}

.container {
    position: relative;
    z-index: 1;
    padding: 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 32px;
    }
}

h1,
h2,
h3,
h4,
.display {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 120px; /* Space for sticky CTA */
}

@media (min-width: 1200px) {
    .container {
        max-width: 1280px;
    }
}

/* ============================================================================
   NAVIGATION - SCOREBOARD STYLE
   ============================================================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(212, 169, 41, 0.3);
    transition: all 0.3s ease;
}

html[data-theme="light"] .nav {
    background: rgba(240, 240, 240, 0.96);
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(212, 169, 41, 0.3);
}

html[data-theme="light"] .nav-links a {
    color: rgba(0, 0, 0, 0.75);
}

html[data-theme="light"] .nav-links a:hover {
    color: rgba(0, 0, 0, 0.95);
}

html[data-theme="light"] .status-text {
    color: rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] .nav-status {
    background: rgba(212, 169, 41, 0.15);
    border: 1px solid rgba(212, 169, 41, 0.4);
}

html[data-theme="light"] .status-badge {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: #000000;
}

html[data-theme="light"] .status-badge-active {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
    color: #ffffff;
}

.nav.scrolled {
    padding: 12px 5%;
    background: rgba(0, 0, 0, 0.94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .nav.scrolled {
    background: rgba(240, 240, 240, 0.98);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

.logo img {
    height: 32px;
    width: auto;
    transition: all 0.3s ease;
}

.logo .logo-dark {
    display: none;
}

.logo .logo-light {
    display: block;
}

html[data-theme="light"] .logo .logo-dark {
    display: block;
}

html[data-theme="light"] .logo .logo-light {
    display: none;
}

.nav.scrolled .logo img {
    height: 28px;
}

/* Nav Status (Active Game Display) */
.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(212, 169, 41, 0.12);
    border: 1px solid rgba(212, 169, 41, 0.3);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.nav-status-link {
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-status-link:hover {
    transform: translateY(-1px);
    border-color: var(--gold);
    background: rgba(212, 169, 41, 0.18);
}

.status-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--gold-dark);
    background: var(--gradient-accent);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-family: var(--font-label);
}

.status-badge-active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: #000000;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(245, 240, 232, 0.75);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-family: var(--font-label);
    transition: all 0.2s ease;
    position: relative;
}

.nav-links a svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.nav-links a:hover {
    color: var(--cream);
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Responsive Nav Styles */
@media (max-width: 768px) {
    .nav {
        padding: 12px 20px;
        gap: 12px;
    }

    main.main-content {
        margin-top: 64px; /* Smaller nav height on mobile */
    }

    .logo img {
        height: 28px;
    }

    .nav-status {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    .status-badge {
        font-size: 0.6rem;
        padding: 3px 6px;
    }

    .status-text {
        display: none;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 0;
        padding: 8px;
    }

    .nav-links a svg {
        width: 18px;
        height: 18px;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-actions {
        gap: 12px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }
}

.app-brand-text {
    display: flex;
    flex-direction: column;
}

.app-brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    color: var(--text-primary);
}

.app-brand-name span {
    color: var(--primary-color);
}

.app-brand-tag {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-tertiary);
}

.app-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: rgba(47, 139, 85, 0.08);
    border: 1px solid rgba(47, 139, 85, 0.25);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.app-status-link {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.app-status-link:hover {
    transform: translateY(-1px);
    border-color: rgba(47, 139, 85, 0.5);
    box-shadow: var(--shadow);
}

.app-status-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.status-pill {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--surface-contrast);
    background: var(--gradient-accent);
    padding: 4px 8px;
    border-radius: var(--radius-pill);
    font-weight: 700;
}

.status-pill-active {
    color: #0f172a;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.app-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.feedback-open {
    overflow: hidden;
}

.feedback-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feedback-button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.feedback-button:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 12, 22, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.feedback-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.feedback-card {
    width: min(520px, 92vw);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

.feedback-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feedback-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.feedback-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
}

.feedback-field label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-tertiary);
}

.feedback-textarea {
    width: 100%;
    min-height: 140px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    resize: vertical;
}

.feedback-textarea:focus {
    outline: 2px solid rgba(47, 139, 85, 0.3);
    outline-offset: 2px;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.feedback-cancel,
.feedback-submit {
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.feedback-cancel {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.feedback-submit {
    background: var(--gradient-primary);
    color: #f8fafc;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.feedback-status {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.feedback-status.is-error {
    color: var(--danger-color);
}

.feedback-status.is-success {
    color: var(--success-color);
}

html[data-theme="light"] .feedback-modal {
    background: rgba(15, 23, 42, 0.35);
}

@media (max-width: 640px) {
    .feedback-button {
        right: 16px;
        bottom: 16px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid var(--gold);
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        inset 0 1px 3px rgba(212, 169, 41, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.4);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow:
        inset 0 1px 3px rgba(212, 169, 41, 0.3),
        0 4px 12px rgba(212, 169, 41, 0.3);
    background: linear-gradient(180deg, #222 0%, #111 100%);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.theme-toggle .icon-sun {
    display: none;
}

html[data-theme="light"] .theme-toggle {
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
    color: #000000;
    border-color: var(--gold);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .theme-toggle:hover {
    background: linear-gradient(180deg, #fafafa 0%, #e8e8e8 100%);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(212, 169, 41, 0.2);
}

html[data-theme="light"] .theme-toggle .icon-sun {
    display: inline-flex;
}

html[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.nav-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(47, 139, 85, 0.12);
    border-color: rgba(47, 139, 85, 0.25);
}

.nav-link.active {
    color: var(--surface-contrast);
    background: var(--gradient-primary);
    border-color: transparent;
}

body.no-nav .app-header {
    display: none;
}

body.no-nav .container {
    padding-top: 24px;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.icon-fill {
    fill: currentColor;
    stroke: none;
}

@media (max-width: 900px) {
    .app-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-status {
        width: 100%;
        justify-content: space-between;
    }

    .app-nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .app-nav .nav-link {
        flex: 1 1 auto;
        justify-content: center;
    }

    .app-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .theme-toggle {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .app-header-inner {
        padding: 10px 12px;
        gap: 8px;
        align-items: center;
        flex-direction: row;
    }

    .app-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .app-logo {
        height: 32px;
    }

    .app-status {
        font-size: 0.7rem;
        padding: 4px 8px;
        flex: 1;
        min-width: 0;
    }

    .app-status-link {
        flex: 0 0 auto;
        width: auto;
    }

    .app-status span:last-child {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .status-pill {
        font-size: 0.55rem;
        padding: 3px 6px;
    }

    .app-controls {
        width: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    .app-nav {
        gap: 8px;
        flex-wrap: nowrap;
        overflow: visible;
        padding-bottom: 0;
    }

    .app-nav .nav-link {
        flex: 0 0 auto;
        width: 32px;
        height: 32px;
        padding: 0;
        font-size: 0;
        gap: 0;
        justify-content: center;
    }

    .app-nav .nav-link svg {
        width: 18px;
        height: 18px;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
        padding: 4px;
    }

    .app-status span:last-child {
        max-width: 120px;
    }

    .status-opponent {
        display: none;
    }
}

/* ============================================================================
   HOMEPAGE - HERO LAYOUT
   ============================================================================ */

.home-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.brand-accent {
    color: var(--primary-color);
}

.brand-tagline {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

.hero-defense {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 229, 255, 0.1);
    border-radius: var(--radius-sm);
}

/* Main CTA Button */
.home-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--action) 0%, var(--action-dark) 100%);
    border: 2px solid var(--gold);
    border-radius: 12px;
    text-decoration: none;
    margin-bottom: var(--space-md);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 0 rgba(212, 169, 41, 0.5),
        0 6px 16px rgba(46, 130, 35, 0.4);
}

.home-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    pointer-events: none;
}

.home-cta:hover {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 rgba(212, 169, 41, 0.5),
        0 4px 12px rgba(46, 130, 35, 0.5);
}

.home-cta:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 rgba(212, 169, 41, 0.5),
        0 2px 8px rgba(46, 130, 35, 0.3);
}

.cta-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cta-icon {
    font-size: 2rem;
}

.cta-text {
    display: flex;
    flex-direction: column;
}

.cta-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-family: var(--font-label);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.cta-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    font-family: var(--font-body);
}

.cta-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

html[data-theme="light"] .stats-bar {
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-item.opponent {
    flex-direction: column;
}

.stat-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-opponent {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
}

.stat-num.success {
    color: var(--success-color);
}

.stat-num.warning {
    color: var(--warning-color);
}

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

/* Empty State Guidance */
.empty-state {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-md);
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.empty-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.empty-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    text-align: left;
}

.step-num {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.empty-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Threats Section - What to Watch For */
.threats-section {
    margin-bottom: var(--space-md);
}

.threat-chips {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.threat-chip {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.threat-chip.primary {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger-color);
}

.threat-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.threat-chip.primary .threat-name {
    color: var(--danger-color);
}

.threat-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.threat-chip.primary .threat-pct {
    color: var(--danger-color);
}

/* Best Defenses Section */
.best-defenses-section {
    margin-bottom: var(--space-md);
}

.best-defense-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.best-defense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.defense-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.defense-success {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Help Button */
.help-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
    margin-right: auto;
}

.help-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.help-icon {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
}

.help-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Help Modal */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-md);
}

.help-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.help-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.help-close {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.help-close:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.help-body {
    padding: var(--space-lg);
}

.help-section {
    margin-bottom: var(--space-lg);
}

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

.help-section h4 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: var(--space-sm);
}

.help-section ol,
.help-section ul {
    margin: 0;
    padding-left: var(--space-lg);
}

.help-section li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    line-height: 1.5;
}

.help-section strong {
    color: var(--text-primary);
}

/* Recent Section */
.recent-section {
    margin-bottom: var(--space-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-hint {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.recent-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.recent-chip {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.recent-chip:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.chip-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chip-count {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 2px 6px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

/* Home Actions */
.home-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--card-hover);
    border-color: var(--border-hover);
}

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

.action-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

.header-small {
    display: flex;
    align-items: center;
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.back-btn:hover {
    color: var(--primary-color);
    background: rgba(0, 229, 255, 0.1);
}

/* Legacy support */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: min(240px, 70vw);
    height: auto;
    background: transparent;
    border-radius: 0;
    display: block;
    box-shadow: none;
    position: relative;
}

.logo-icon img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

.logo-icon::before {
    content: '';
}

.logo-title .highlight {
    color: var(--primary-color);
}

.defense-name {
    font-size: 0.85rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================================================
   CARDS & SECTIONS
   ============================================================================ */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.card:hover {
    border-color: var(--border-hover);
}

.card h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.card h3 {
    font-size: 0.85rem;
    margin: 0.75rem 0 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: 2px solid var(--gold);
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-label);
}

@media (min-width: 768px) {
    .btn {
        padding: 0.625rem 1rem;
        border-radius: 12px;
        font-size: 0.85rem;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--action) 0%, var(--action-dark) 100%);
    color: white;
    border: 2px solid var(--gold);
    box-shadow:
        0 4px 0 rgba(212, 169, 41, 0.5),
        0 6px 16px rgba(46, 130, 35, 0.4);
}

.btn-primary:hover {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 rgba(212, 169, 41, 0.5),
        0 4px 12px rgba(46, 130, 35, 0.5);
}

.btn-primary:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 rgba(212, 169, 41, 0.5),
        0 2px 8px rgba(46, 130, 35, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover, .btn-secondary:active {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.btn-large {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .btn-large {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

.btn-start-play {
    font-size: 1rem;
    padding: 0.875rem;
}

@media (min-width: 768px) {
    .btn-start-play {
        font-size: 1.1rem;
        padding: 1rem;
    }
}

.btn-block {
    width: 100%;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
}

.btn-text:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ============================================================================
   LISTS & OPTIONS
   ============================================================================ */

.recent-formations {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.recent-formation {
    background: var(--bg-tertiary);
    padding: 0.625rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.recent-formation:hover, .recent-formation:active {
    background: var(--card-hover);
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.formation-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.formation-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.option-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.option-card {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.option-card:hover, .option-card:active {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.15);
}

.option-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    font-size: 0.85rem;
    line-height: 1.3;
}

.option-formation {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    line-height: 1.2;
}

.option-description {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.option-count {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ============================================================================
   STATS & DATA DISPLAYS
   ============================================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stat {
    text-align: center;
    padding: 0.625rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top-teams {
    padding-top: 0.625rem;
    border-top: 1px solid var(--border-color);
}

.team-prob {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.625rem;
    margin: 0.375rem 0;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.team-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.team-percent {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* ============================================================================
   PROGRESS BAR - Contextual Steps
   ============================================================================ */

.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

html[data-theme="light"] .progress-bar {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.progress-step-number {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

html[data-theme="light"] .progress-step-number {
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.progress-step-label {
    display: none;
}

@media (min-width: 400px) {
    .progress-step-label {
        display: block;
    }
}

.progress-step.active {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
}

html[data-theme="light"] .progress-step.active {
    background: rgba(47, 139, 85, 0.12);
}

.progress-step.active .progress-step-number {
    background: var(--primary-color);
    color: var(--bg-primary);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

html[data-theme="light"] .progress-step.active .progress-step-number {
    color: #fff;
    box-shadow: 0 0 10px rgba(47, 139, 85, 0.25);
}

.progress-step.completed {
    color: var(--success-color);
}

.progress-step.completed .progress-step-number {
    background: var(--success-color);
    color: var(--bg-primary);
}

.progress-step.completed .progress-step-number::after {
    content: '✓';
    font-size: 0.6rem;
}

.progress-divider {
    width: 20px;
    height: 2px;
    background: var(--border-color);
    border-radius: 1px;
}

.progress-divider.completed {
    background: var(--success-color);
}

/* ============================================================================
   STEP CARDS
   ============================================================================ */

.step-card {
    display: none;
}

.step-card.active {
    display: block;
}

.step-instruction {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.section {
    margin-bottom: 0.5rem;
}

/* Enhanced Step Headers - Clean minimal design */
.step-header-enhanced {
    margin-bottom: var(--space-md);
    padding: 0;
    background: transparent;
    border: none;
}

.step-badge {
    display: inline-block;
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.step-header-enhanced h2 {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

.step-help {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Section Labels */
.section-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.375rem;
    padding: 0.25rem 0.375rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    border-left: 2px solid var(--primary-color);
}

@media (min-width: 768px) {
    .section-label {
        gap: 0.375rem;
        margin-bottom: 0.5rem;
        padding: 0.375rem 0.5rem;
        border-radius: 4px;
        border-left: 3px solid var(--primary-color);
    }
}

.label-icon {
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .label-icon {
        font-size: 1rem;
    }
}

.label-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .label-text {
        font-size: 0.75rem;
    }
}

/* ============================================================================
   SEARCH
   ============================================================================ */

.search-section {
    position: sticky;
    top: -1px;
    background: var(--card-bg);
    z-index: 10;
    padding: 1.25rem;
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    border-bottom: 2px solid var(--border-color);
}

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

.search-header h3 {
    margin: 0;
    font-size: 0.95rem;
}

.search-box {
    position: relative;
    margin-bottom: 0.875rem;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 0.875rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(47, 139, 85, 0.1);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    color: var(--text-primary);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-clear:hover {
    background: var(--danger-color);
}

.search-hint, .no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 1.5rem 1rem;
    font-style: italic;
}

.hint-icon {
    font-size: 1.5rem;
}

.search-more {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

/* Professional Search Interface */
.search-section-primary {
    margin-bottom: var(--space-md);
}

.search-box-primary {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: var(--space-sm);
}

.search-box-primary:focus-within {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1), var(--shadow-glow);
}

.search-icon {
    font-size: 1.25rem;
    margin-right: var(--space-sm);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s;
}

.search-box-primary:focus-within .search-icon {
    color: var(--primary-color);
}

.search-box-primary input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0;
}

.search-box-primary input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-clear-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: var(--space-sm);
    flex-shrink: 0;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    background: var(--danger-color);
    color: white;
}

.search-hint-subtle {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: var(--space-sm);
}

/* Divider with Text */
.divider-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.75rem 0;
    position: relative;
}

@media (min-width: 768px) {
    .divider-with-text {
        margin: 1rem 0;
    }
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider-with-text span {
    padding: 0 0.75rem;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--bg-primary);
}

@media (min-width: 768px) {
    .divider-with-text span {
        font-size: 0.75rem;
        padding: 0 1rem;
    }
}

/* Browse Categories Button */
.btn-browse-categories {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .btn-browse-categories {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        border-radius: 8px;
        margin-top: 0.75rem;
    }
}

.btn-browse-categories:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 139, 85, 0.15);
}

html[data-theme="light"] .search-box-primary {
    background: var(--surface);
    border-color: var(--border-strong);
}

html[data-theme="light"] .search-box-primary:focus-within {
    background: var(--surface);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 139, 85, 0.12);
}

html[data-theme="light"] .search-box-primary input::placeholder {
    color: var(--text-tertiary);
}

html[data-theme="light"] .option-card {
    background: var(--surface);
    border-color: var(--border-color);
}

html[data-theme="light"] .option-card:hover,
html[data-theme="light"] .option-card:active {
    background: var(--card-hover);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(15, 23, 38, 0.08);
}

html[data-theme="light"] .btn-browse-categories {
    background: var(--surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="light"] .btn-browse-categories:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
}

html[data-theme="light"] .btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .btn-secondary:active {
    background: var(--card-hover);
    border-color: var(--border-hover);
}

html[data-theme="light"] .back-btn {
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-color);
}

html[data-theme="light"] .back-btn:hover {
    color: var(--primary-color);
    background: var(--card-hover);
    border-color: var(--border-hover);
}

.btn-browse-categories .btn-icon {
    font-size: 1rem;
}

@media (min-width: 768px) {
    .btn-browse-categories .btn-icon {
        font-size: 1.1rem;
    }
}

#search-results mark {
    background: var(--warning-color);
    color: var(--bg-primary);
    font-weight: 700;
    padding: 0 0.125rem;
    border-radius: 2px;
}

/* ============================================================================
   THREATS & RECOMMENDATIONS
   ============================================================================ */

#threats-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    #threats-list {
        gap: 0.5rem;
    }
}

.threat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

@media (min-width: 768px) {
    .threat-item {
        padding: 0.625rem 0.75rem;
        border-radius: 6px;
    }
}

.threat-item:hover {
    background: var(--card-hover);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(47, 139, 85, 0.15);
}

.threat-type {
    font-weight: 600;
    text-transform: capitalize;
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .threat-type {
        font-size: 0.8rem;
    }
}

.threat-percent {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .threat-percent {
        font-size: 0.85rem;
    }
}

/* ============================================================================
   STEP 2 - HERO RECOMMENDATION LAYOUT
   ============================================================================ */

/* Context Bar - Formation & Opponent */
.context-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.context-formation {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.context-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-tertiary);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.context-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.context-opponent {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    padding: var(--space-xs) var(--space-md);
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
}

/* Situation Chips - Scrollable */
.situation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: var(--space-sm) 0 var(--space-xs);
    gap: var(--space-sm);
}

.situation-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.situation-chips {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-sm);
    margin-bottom: var(--space-lg);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.situation-chips::-webkit-scrollbar {
    display: none;
}

.situation-chip {
    flex-shrink: 0;
    padding: calc(var(--space-xs) + 4px) calc(var(--space-md) + 2px);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.situation-chip::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.6);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.situation-chip[data-situation="NORMAL"]::before {
    background: rgba(47, 139, 85, 0.9);
}

.situation-chip[data-situation="RED_ZONE"]::before {
    background: rgba(239, 68, 68, 0.9);
}

.situation-chip[data-situation="BACKED_UP"]::before {
    background: rgba(96, 165, 250, 0.9);
}

.situation-chip[data-situation="THIRD_AND_SHORT"]::before {
    background: rgba(246, 184, 74, 0.95);
}

.situation-chip[data-situation="THIRD_AND_LONG"]::before {
    background: rgba(192, 132, 252, 0.95);
}

.situation-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 38, 0.2);
}

.situation-chip.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

@media (max-width: 768px) {
    .situation-title {
        font-size: 0.9rem;
    }

    .situation-chips {
        flex-wrap: wrap;
        justify-content: space-between;
        overflow-x: hidden;
        row-gap: 8px;
    }

    .situation-chip {
        padding: calc(var(--space-xs) + 2px) var(--space-sm);
        font-size: 0.8rem;
        flex: 0 1 calc(33.333% - 8px);
        justify-content: center;
    }
}

html[data-theme="light"] .situation-chip {
    box-shadow: none;
}

html[data-theme="light"] .situation-chip:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 38, 0.12);
}

/* HERO Recommendation - The Main Event */
.hero-recommendation {
    margin-bottom: var(--space-md);
}

.hero-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-tertiary);
    letter-spacing: 0.2em;
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
}

.hero-recommendation .hero-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.hero-recommendation .hero-card::before {
    display: none;
}

.hero-recommendation .hero-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-recommendation .hero-play-name {
    color: var(--text-primary);
    text-shadow: none;
    font-size: 1.5rem;
}

.hero-recommendation .hero-best-for,
.hero-recommendation .hero-meta {
    color: var(--text-secondary);
}

.hero-recommendation .hero-tap-hint {
    color: var(--text-tertiary);
    position: static;
    justify-content: flex-end;
    width: 100%;
    margin-top: var(--space-sm);
}

.hero-recommendation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
    align-items: start;
}

.hero-recommendation-layout.has-threats {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.hero-recommendation-side {
    display: flex;
    justify-content: flex-end;
}

.hero-recommendation-side .hero-threats {
    width: 100%;
}

.hero-threats {
    margin-top: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hero-threats-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-tertiary);
    font-weight: 700;
}

.hero-threats-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

.hero-threat-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.hero-threat-name {
    font-size: 0.72rem;
    color: var(--text-primary);
    font-weight: 600;
}

.hero-threat-pcts {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
}

.hero-threat-live {
    color: var(--danger-color);
    font-weight: 700;
}

.hero-threat-baseline {
    color: var(--text-tertiary);
}

.hero-threat-chip.is-primary {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
}

.hero-threat-chip.is-primary .hero-threat-name {
    color: rgba(255, 255, 255, 0.95);
}

.hero-threat-chip.is-primary .hero-threat-baseline {
    color: rgba(255, 255, 255, 0.65);
}

html[data-theme="light"] .hero-threat-chip.is-primary .hero-threat-name {
    color: var(--text-primary);
}

html[data-theme="light"] .hero-threat-chip.is-primary .hero-threat-baseline {
    color: var(--text-secondary);
}

.hero-threat-baseline::before {
    content: '•';
    margin-right: 0.35rem;
}

@media (max-width: 768px) {
    .hero-recommendation-layout.has-threats {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--space-sm);
    }
}

.hero-card {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3), 0 0 60px rgba(0, 229, 255, 0.15);
}

.hero-card:active {
    transform: translateY(-2px) scale(1.005);
}

.hero-play-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    line-height: 1.1;
}

.hero-formation-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    margin-bottom: var(--space-xs);
}

.hero-best-for {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--space-sm);
}

.hero-meta {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
}

.hero-tap-hint {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-md);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.hero-tap-hint::after {
    content: '→';
    font-weight: bold;
    font-size: 0.8rem;
}

/* Tendency Bar - Compact Horizontal */
.tendency-bar {
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.tendency-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.tendency-items {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-xs);
    -webkit-overflow-scrolling: touch;
}

.tendency-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
    padding: var(--space-xs) var(--space-sm);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.tendency-item:hover {
    background: var(--card-hover);
}

.tendency-item:first-child {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
}

.tendency-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tendency-pct {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--danger-color);
}

/* More Options - Collapsible */
.more-options {
    margin-bottom: var(--space-xl);
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.more-options-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.2s;
    list-style: none;
}

.more-options-title {
    cursor: default;
}

.more-options-title:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.more-options-title .toggle-icon {
    display: none;
}

.more-options-toggle::-webkit-details-marker {
    display: none;
}

.more-options-toggle:hover {
    background: transparent;
    color: var(--text-tertiary);
}

.more-options[open] .more-options-toggle {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.more-options[open] .toggle-icon {
    transform: rotate(180deg);
}

.toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.more-options-content {
    background: transparent;
    border-radius: 0;
    padding: var(--space-md) 0 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.section-mini-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

/* Alternative Recommendations */
.alt-recommendations .recommendation-item {
    padding: var(--space-sm);
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.alt-recommendations .recommendation-item:hover {
    background: var(--card-hover);
    transform: translateY(-1px);
}

.alt-recommendations-inline {
    margin-top: var(--space-md);
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
}

.recommendations-grid .recommendation-item {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 92px;
}

@media (max-width: 640px) {
    .recommendations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.more-options .option-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.more-options .option-card:hover {
    transform: translateY(-1px);
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0));
    background: linear-gradient(to top, var(--bg-primary) 60%, transparent);
    z-index: 100;
}

.btn-record-play {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.btn-record-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

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

.btn-record-icon {
    font-size: 1.25rem;
}

.btn-record-text {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .hero-card {
        padding: var(--space-xl);
        min-height: 140px;
    }

    .hero-play-name {
        font-size: 2rem;
    }

    .sticky-cta {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
    }
}

.no-recommendations {
    padding: 1rem;
    text-align: center;
    color: var(--text-tertiary);
    font-style: italic;
}

#recommendations-list {
    display: grid;
    gap: var(--space-sm);
}

.recommendation-item {
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

@media (min-width: 768px) {
    .recommendation-item {
        padding: 0.625rem;
        border-radius: 8px;
        border-left: 4px solid transparent;
    }
}

.recommendation-item:hover {
    background: var(--card-hover);
    transform: translateX(4px);
}

.recommendation-item.clickable {
    position: relative;
}

.recommendation-item.clickable::after {
    content: '→';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    color: var(--accent-color);
    font-weight: bold;
}

.recommendation-item.clickable:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

.recommendation-item.high-confidence {
    border-left-color: var(--success-color);
}

.recommendation-item.medium-confidence {
    border-left-color: var(--warning-color);
}

.recommendation-item.low-confidence {
    border-left-color: var(--danger-color);
}

.recommendation-play {
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1.2;
}

.recommendation-formation {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.125rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .recommendation-play {
        font-size: 0.85rem;
    }
    .recommendation-formation {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
}

.recommendation-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .recommendation-meta {
        font-size: 0.75rem;
    }
}

/* Best For Text */
.best-for-text {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-style: italic;
    margin: 0.25rem 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .best-for-text {
        font-size: 0.75rem;
        margin: 0.3rem 0;
    }
}

.confidence-badge {
    display: inline-block;
    padding: 0.1rem 0.375rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .confidence-badge {
        padding: 0.125rem 0.5rem;
        border-radius: 4px;
        font-size: 0.7rem;
        margin-left: 0.5rem;
    }
}

.confidence-badge.high {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.confidence-badge.medium {
    background: rgba(255, 149, 0, 0.2);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.confidence-badge.low {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* ============================================================================
   QUICK START GUIDE (Homepage)
   ============================================================================ */

.quick-guide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.guide-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: var(--glow);
}

.guide-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.guide-text strong {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.guide-text span {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* CTA Card */
.cta-card {
    text-align: center;
    background: linear-gradient(135deg, var(--card-bg), var(--bg-tertiary));
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(47, 139, 85, 0.2);
}

.cta-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============================================================================
   OUTCOME OPTIONS
   ============================================================================ */

.outcome-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

/* Outcome Guide */
.outcome-guide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.outcome-hint {
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid;
}

.success-hint {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.warning-hint {
    background: rgba(255, 149, 0, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.danger-hint {
    background: rgba(255, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Success outcome cards (Stop, TFL, INT) - Gradient style */
.outcome-card-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #00cc6a 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.outcome-card-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.outcome-card-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.outcome-card-success:active {
    transform: translateY(0);
}

.outcome-card-success .option-title {
    color: var(--bg-primary);
    font-weight: 800;
    font-size: 0.9rem;
}

.outcome-card-success .option-description {
    color: rgba(10, 14, 26, 0.8);
    font-size: 0.7rem;
}

/* Warning outcome card (Gain) */
.outcome-card-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e68600 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.outcome-card-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.outcome-card-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.outcome-card-warning:active {
    transform: translateY(0);
}

.outcome-card-warning .option-title {
    color: var(--bg-primary);
    font-weight: 800;
    font-size: 0.9rem;
}

.outcome-card-warning .option-description {
    color: rgba(10, 14, 26, 0.8);
    font-size: 0.7rem;
}

/* Danger outcome card (TD/Big Play) */
.outcome-card-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #cc3333 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.outcome-card-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.outcome-card-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
}

.outcome-card-danger:active {
    transform: translateY(0);
}

.outcome-card-danger .option-title {
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
}

.outcome-card-danger .option-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
}

/* Legacy hover effects for fallback */
.outcome-options .option-card:nth-child(1):hover,
.outcome-options .option-card:nth-child(2):hover,
.outcome-options .option-card:nth-child(3):hover {
    border-color: var(--success-color);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.3);
}

.outcome-options .option-card:nth-child(4):hover {
    border-color: var(--warning-color);
    box-shadow: 0 0 16px rgba(255, 149, 0, 0.3);
}

.outcome-options .option-card:nth-child(5):hover {
    border-color: var(--danger-color);
    box-shadow: 0 0 16px rgba(255, 68, 68, 0.3);
}

/* ============================================================================
   COMPLETION
   ============================================================================ */

/* Success Icon with Animation */
.complete-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.7));
    }
}

/* Success Card Container */
.completion-card {
    background: linear-gradient(135deg, var(--success-color) 0%, #00cc6a 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.completion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.completion-card h2 {
    color: var(--bg-primary);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.completion-card .complete-icon {
    color: var(--bg-primary);
    filter: none;
    animation: none;
    margin-bottom: 0.75rem;
}

.complete-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

#completion-message {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Summary Card inside Completion */
.completion-summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.summary-item-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .completion-card {
        padding: 2rem;
        border-radius: 20px;
    }

    .completion-card h2 {
        font-size: 1.75rem;
    }

    .complete-icon {
        font-size: 4.5rem;
    }
}

/* ============================================================================
   PLAY DIAGRAMS
   ============================================================================ */

.play-diagrams-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.play-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.875rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 4px 12px rgba(47, 139, 85, 0.2);
}

.play-group-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-group {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: var(--bg-primary);
    font-size: 0.95rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
}

.toggle-group:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.play-group-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
    margin-top: 0.75rem;
}

.play-diagram-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.play-diagram-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(47, 139, 85, 0.2);
}

.play-diagram-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.play-diagram-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s;
}

.play-diagram-img.loaded {
    opacity: 1;
}

.play-diagram-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.play-diagram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    gap: 0.5rem;
}

.play-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
}

.play-type {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    background: rgba(47, 139, 85, 0.2);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================================
   MODAL
   ============================================================================ */

.play-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.play-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.play-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.play-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-primary);
    font-weight: 700;
}

.play-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.play-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.play-modal-body {
    flex: 1;
    overflow: auto;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}

.play-modal-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.play-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* ============================================================================
   STREAMLINED STEP 2 - OPTIMIZED LAYOUT
   ============================================================================ */


.step-2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .step-2-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        gap: 0.5rem;
    }
}

/* Situation Selector (Compact) */
.situation-selector-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.situation-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.situation-select {
    flex: 1;
    max-width: 250px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.situation-select:hover {
    border-color: var(--primary-color);
    background: var(--card-hover);
}

.situation-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 139, 85, 0.1);
}

@media (min-width: 768px) {
    .situation-selector-compact {
        padding: 0.625rem 0.75rem;
        margin-bottom: 1rem;
    }

    .situation-label {
        font-size: 0.85rem;
    }

    .situation-select {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Horizontal Situation Selector */
.situation-selector-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.situation-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1 1 auto;
    min-width: 70px;
}

.situation-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.situation-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.situation-btn.active .situation-text {
    color: white;
    font-weight: 700;
}

.situation-btn.active .situation-icon {
    transform: scale(1.1);
}

.situation-icon {
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.situation-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.1;
    transition: all 0.2s ease;
}

/* Light mode adjustments */
@media (prefers-color-scheme: light) {
    .situation-btn {
        background: white;
    }

    .situation-btn:hover {
        background: #f3f4f6;
    }
}

/* Mobile optimization - 2 rows of 3 buttons */
@media (max-width: 480px) {
    .situation-selector-horizontal {
        gap: 0.3rem;
        padding: 0.4rem;
    }

    .situation-btn {
        padding: 0.4rem 0.5rem;
        flex: 1 1 calc(33.333% - 0.2rem);
        min-width: 0;
        max-width: calc(33.333% - 0.2rem);
    }

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

    .situation-text {
        font-size: 0.62rem;
        line-height: 1;
    }
}

/* Very small screens - ensure buttons don't get too cramped */
@media (max-width: 360px) {
    .situation-btn {
        padding: 0.35rem 0.4rem;
    }

    .situation-icon {
        font-size: 0.9rem;
    }

    .situation-text {
        font-size: 0.58rem;
    }
}

.step-2-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.btn-record-inline {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .btn-record-inline {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
}

.team-confidence-display {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    background: rgba(47, 139, 85, 0.1);
    border: 1px solid rgba(47, 139, 85, 0.3);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

@media (min-width: 768px) {
    .team-confidence-display {
        font-size: 0.8rem;
        padding: 0.3rem 0.625rem;
    }
}

.formation-display-large {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .formation-display-large {
        font-size: 1.1rem;
    }
}

.step-2-main {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

@media (min-width: 768px) {
    .step-2-main {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Priority Row - Most Important Info Side by Side */
.step-2-priority-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .step-2-priority-row {
        gap: 0.5rem;
    }
}

/* Secondary Row - Supporting Info - Full Width Sections */
.step-2-secondary-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .step-2-secondary-row {
        gap: 0.5rem;
    }
}

/* Compact Sections */
.section-compact {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.375rem;
}

@media (min-width: 768px) {
    .section-compact {
        border-radius: 6px;
        padding: 0.5rem;
    }
}

/* Priority sections get extra emphasis */
.section-priority {
    border-color: rgba(47, 139, 85, 0.3);
}

.section-compact h3 {
    font-size: 0.7rem;
    margin: 0 0 0.375rem 0;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-label-compact {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 0.2rem;
}

@media (min-width: 768px) {
    .section-label-compact {
        gap: 0.25rem;
        margin-bottom: 0.25rem;
    }
}

.section-label-compact .label-icon {
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .section-label-compact .label-icon {
        font-size: 0.9rem;
    }
}

.section-label-compact .label-text {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .section-label-compact .label-text {
        font-size: 0.7rem;
    }
}

.section-compact .subtext {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .section-compact .subtext {
        font-size: 0.625rem;
        margin-bottom: 0.375rem;
        line-height: 1.2;
    }
}

/* ============================================================================
   NOTIFICATIONS
   ============================================================================ */

.quick-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    font-weight: 600;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
    text-align: center;
}

.quick-notification.show {
    top: 24px;
}

.quick-notification.success {
    background: var(--success-color);
    color: var(--bg-primary);
    border-color: var(--success-color);
    box-shadow: 0 0 24px rgba(0, 255, 136, 0.5);
}

.quick-notification.error {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
    box-shadow: 0 0 24px rgba(255, 68, 68, 0.5);
}

.quick-notification.info {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 24px rgba(47, 139, 85, 0.5);
}

/* ============================================================================
   PLAYBOOK SELECTION
   ============================================================================ */

.playbook-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.playbook-option {
    cursor: pointer;
}

.playbook-option input[type="radio"] {
    display: none;
}

.playbook-card {
    padding: 0.625rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
}

.playbook-option input[type="radio"]:checked + .playbook-card {
    background: var(--card-hover);
    border-color: var(--primary-color);
    box-shadow: 0 0 16px rgba(47, 139, 85, 0.3);
}

.playbook-card:hover {
    border-color: var(--primary-color);
}

.playbook-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.playbook-info {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ============================================================================
   FORMATIONS
   ============================================================================ */

.formation-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .formation-list {
        gap: 0.5rem;
    }
}

.selected-formation {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-primary);
    padding: 1.125rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    box-shadow: var(--glow);
}

/* ============================================================================
   FILTERS & COLLAPSIBLE
   ============================================================================ */

.filters-section {
    margin-top: 0.875rem;
}

.filter-subsection {
    margin-top: 1.25rem;
}

.filter-subsection h3 {
    margin-bottom: 0.625rem;
    font-size: 0.95rem;
}

.section.collapsed {
    display: none;
}

.browse-all-section.selected {
    opacity: 0.5;
    pointer-events: none;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.browse-all-section.selected::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, var(--card-bg));
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    text-align: center;
    padding: var(--space-lg) var(--space-sm);
    color: var(--text-muted);
    font-size: 0.65rem;
}

.footer p {
    margin: 0;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    color: var(--primary-color);
}

/* ============================================================================
   ACTIONS
   ============================================================================ */

.actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.actions .btn {
    width: 100%;
}

/* ============================================================================
   COMPACT PLAY DIAGRAMS
   ============================================================================ */

.play-diagrams-list-compact .play-group-container {
    grid-template-columns: 1fr;
}

/* ============================================================================
   RESPONSIVE - TABLET
   ============================================================================ */

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

    .header {
        padding: 1rem;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .logo-icon {
        width: min(260px, 50vw);
        height: auto;
    }

    .logo-title {
        font-size: 1.5rem;
    }

    .step-2-main {
        grid-template-columns: 1fr 1fr;
    }

    .play-group-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .play-diagrams-list-compact .play-group-container {
        grid-template-columns: repeat(2, 1fr);
    }

    /* More columns for lists on tablet */
    .option-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .recent-formations {
        grid-template-columns: repeat(3, 1fr);
    }

    .playbook-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================================
   RESPONSIVE - DESKTOP
   ============================================================================ */

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

    .play-group-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .play-modal-content {
        max-width: 1100px;
    }

    /* Even more columns on desktop */
    .option-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .recent-formations {
        grid-template-columns: repeat(4, 1fr);
    }

    .playbook-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================================
   RESPONSIVE - MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    .step-2-header {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .step-2-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
}

    .formation-display-large {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: min(220px, 60vw);
        height: auto;
    }

    .logo-title {
        font-size: 1.35rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
    }

    /* Stack guide and outcome hints on mobile */
    .outcome-guide {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   SAFE AREA (Mobile Notch)
   ============================================================================ */

/* Record Section Styling (All-in-One Step 3) */
.record-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.record-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.record-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.record-section-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Selected Defense Card (Gradient Style) */
.selected-defense-card {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.selected-defense-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.selected-defense-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
}

.selected-defense-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-change-defense {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-change-defense:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

@media (min-width: 768px) {
    .selected-defense-card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .selected-defense-name {
        font-size: 1.5rem;
    }

    .btn-change-defense {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }
}

/* Legacy - keep for backwards compatibility */
.selected-item-display {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1.5px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.selected-item-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-item-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    flex: 1;
}

.btn-change {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-change:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Light mode */
@media (prefers-color-scheme: light) {
    .record-section {
        background: #f9fafb;
    }

    .selected-item-display {
        background: #f3f4f6;
    }
}

/* Mobile optimization */
@media (max-width: 480px) {
    .record-section {
        padding: 1rem;
    }

    .record-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .record-section-header h3 {
        font-size: 0.9rem;
    }

    .selected-item-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-change {
        align-self: flex-end;
    }
}

/* Play Category Cards (What Did They Run?) */
#play-categories-list .option-card {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

#play-categories-list .option-card:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 139, 85, 0.3);
}

#play-categories-list .option-card:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

#play-categories-list .option-card:hover .option-title {
    color: var(--bg-primary);
}

#play-categories-list .option-card:hover .option-description {
    color: rgba(10, 14, 26, 0.8);
}

#play-categories-list .option-card:active {
    transform: translateY(0);
}

/* Completion Summary */
.completion-summary {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.summary-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

@media (prefers-color-scheme: light) {
    .completion-summary {
        background: #f9fafb;
    }
}

@media (max-width: 480px) {
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .summary-value {
        text-align: left;
    }
}

/* ============================================================================
   2024 REDESIGN OVERRIDES
   ============================================================================ */

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px;
    padding: 24px;
    border-radius: 16px;
    background: rgba(10, 10, 10, 0.6);
    border: 2px solid rgba(212, 169, 41, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(212, 169, 41, 0.1);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

html[data-theme="light"] .home-hero {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(212, 169, 41, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(212, 169, 41, 0.1);
}

.hero-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.7rem;
    color: var(--gold);
    font-family: var(--font-label);
    font-weight: 700;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--text-primary);
    margin: 0;
    font-family: var(--font-display);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.hero-card {
    background: rgba(10, 10, 10, 0.6);
    border-radius: 16px;
    padding: 18px;
    border: 2px solid rgba(212, 169, 41, 0.3);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(212, 169, 41, 0.1);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.hero-card:hover {
    border-color: rgba(212, 169, 41, 0.5);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(212, 169, 41, 0.2);
}

html[data-theme="light"] .hero-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(212, 169, 41, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(212, 169, 41, 0.1);
}

html[data-theme="light"] .hero-card:hover {
    border-color: rgba(212, 169, 41, 0.5);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(212, 169, 41, 0.2);
}

.hero-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-checklist {
    grid-column: 1 / -1;
}

.hero-card-label {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    font-family: var(--font-label);
    font-weight: 700;
}

.hero-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.hero-card-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hero-card-meta.hero-card-success {
    font-weight: 600;
}

.hero-card-meta.hero-card-success.success {
    color: var(--success-color);
}

.hero-card-meta.hero-card-success.warning {
    color: var(--warning-color);
}

.hero-card-meta.hero-card-success.danger {
    color: var(--danger-color);
}

.hero-card-compact .hero-card-value {
    font-size: 1.25rem;
}

.hero-card-compact .hero-card-meta {
    font-size: 0.8rem;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-link:hover {
    text-decoration: underline;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 24px;
    align-items: start;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.first-run-card {
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

.first-run-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.first-run-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.first-run-step .step-num {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(47, 139, 85, 0.18);
    color: var(--primary-color);
    font-weight: 700;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
}

.intel-card {
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.intel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.intel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.intel-formation {
    font-weight: 600;
    color: var(--text-primary);
}

.intel-outcome {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
}

.intel-next {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.intel-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-tertiary);
}

.intel-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.home-cta {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-lg);
}

.home-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(4, 9, 20, 0.45), 0 0 40px rgba(47, 139, 85, 0.2);
}

.home-cta:active {
    transform: translateY(-1px);
}

.cta-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.2);
}

.cta-icon svg,
.cta-arrow svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

.cta-arrow {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 0;
    background: transparent;
}

.stat-item {
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    padding: 14px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.stat-divider {
    display: none;
}

.stat-num {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.stat-num.success {
    color: var(--success-color);
}

.stat-num.warning {
    color: var(--warning-color);
}

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

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

.stat-opponent {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.locked-panel {
    position: relative;
    overflow: hidden;
}

.locked-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(12, 20, 30, 0.24);
    z-index: 1;
}

.locked-panel > * {
    opacity: 0.45;
    filter: saturate(0.6);
    pointer-events: none;
    position: relative;
    z-index: 0;
}

html[data-theme="light"] .locked-panel::after {
    background: rgba(248, 250, 252, 0.45);
}

.unlock-banner {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 20, 30, 0.78);
    color: #f8fafc;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 20px rgba(7, 12, 22, 0.35);
}

html[data-theme="light"] .unlock-banner {
    background: rgba(248, 250, 252, 0.92);
    color: #0f1726;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.early-access-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(212, 169, 41, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold-dark);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-label);
}

html[data-theme="light"] .early-access-note {
    background: rgba(212, 169, 41, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold-dark);
}

.early-access-note-header {
    line-height: 1.2;
}

.threats-section,
.best-defenses-section,
.play-history-section,
.recent-section {
    background: rgba(10, 10, 10, 0.6);
    border-radius: 16px;
    padding: 18px;
    margin: 16px 0;
    border: 2px solid rgba(212, 169, 41, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(212, 169, 41, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.threats-section:hover,
.best-defenses-section:hover,
.play-history-section:hover,
.recent-section:hover {
    border-color: rgba(212, 169, 41, 0.4);
}

html[data-theme="light"] .threats-section,
html[data-theme="light"] .best-defenses-section,
html[data-theme="light"] .play-history-section,
html[data-theme="light"] .recent-section {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(212, 169, 41, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(212, 169, 41, 0.1);
}

.play-history-split {
    margin: 18px 0;
}

.play-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.play-history-trend {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 14px;
    border: 1px solid var(--border-color);
}

.play-history-trend .chart-container {
    height: 240px;
}

.situation-strip-card {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: linear-gradient(135deg, rgba(47, 139, 85, 0.08), rgba(12, 20, 30, 0.02));
}

.situation-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.situation-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-tertiary);
}

.situation-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.situation-strip {
    display: grid;
    grid-template-columns: repeat(var(--situation-count, 1), minmax(0, 1fr));
    gap: 4px;
    height: 12px;
    padding: 2px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    position: relative;
    overflow: hidden;
}

.situation-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.14) 0 1px,
        transparent 1px 18px
    );
    opacity: 0.3;
    pointer-events: none;
}

.situation-cell {
    border-radius: 999px;
    background: rgba(140, 156, 175, 0.4);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.situation-cell.normal {
    background: rgba(47, 139, 85, 0.7);
}

.situation-cell.red-zone {
    background: rgba(239, 68, 68, 0.75);
}

.situation-cell.third-down {
    background: rgba(246, 184, 74, 0.85);
}

.situation-cell.fourth-down {
    background: rgba(96, 165, 250, 0.8);
}

.situation-cell.goal-line {
    background: rgba(168, 85, 247, 0.75);
}

.situation-cell.two-minute {
    background: rgba(34, 197, 94, 0.85);
}

.situation-legend {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.legend-item.normal {
    color: var(--success-color);
}

.legend-item.red-zone {
    color: var(--danger-color);
}

.legend-item.third-down {
    color: var(--warning-color);
}

.legend-item.other {
    color: rgba(140, 156, 175, 0.8);
}

.play-history-panel {
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-family: var(--font-label);
}

.threat-chips,
.recent-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.threat-chip,
.recent-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(47, 139, 85, 0.08);
    border: 1px solid rgba(47, 139, 85, 0.2);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.threat-chip.primary {
    background: rgba(224, 183, 90, 0.18);
    border-color: rgba(224, 183, 90, 0.4);
    color: var(--text-primary);
}

.best-defense-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.best-defense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.play-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.inline-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.play-item {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 12px;
    border: 1px solid var(--border-color);
    border-left: 3px solid rgba(47, 139, 85, 0.25);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.play-item.has-outcome {
    border-left-color: var(--success-color);
}

.play-item.play-item-active {
    border-left-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(47, 139, 85, 0.45), 0 6px 16px rgba(47, 139, 85, 0.12);
    background: linear-gradient(135deg, rgba(47, 139, 85, 0.14), rgba(47, 139, 85, 0.04));
    transform: translateX(2px);
}

.play-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.play-sequence {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-tertiary);
}

.play-formation {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.play-category {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.play-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.85rem;
}

.play-defense {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.play-situation {
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.12);
    font-weight: 600;
}

.play-situation.normal {
    color: var(--success-color);
    border-color: rgba(47, 139, 85, 0.35);
    background: rgba(47, 139, 85, 0.14);
}

.play-situation.red-zone {
    color: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.14);
}

.play-situation.third-down {
    color: var(--warning-color);
    border-color: rgba(246, 184, 74, 0.35);
    background: rgba(246, 184, 74, 0.16);
}

.play-situation.fourth-down {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(96, 165, 250, 0.16);
}

.play-situation.goal-line {
    color: #c084fc;
    border-color: rgba(192, 132, 252, 0.35);
    background: rgba(192, 132, 252, 0.16);
}

.play-situation.two-minute {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.16);
}

.play-situation.other {
    color: var(--text-tertiary);
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.12);
}

.play-defense-icon {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
}

.play-outcome {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.play-outcome.great-stop {
    background: rgba(23, 201, 129, 0.2);
    color: var(--success-color);
}

.play-outcome.moderate-gain {
    background: rgba(246, 184, 74, 0.2);
    color: var(--warning-color);
}

.play-outcome.big-play {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.play-outcome.special {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.play-no-outcome {
    color: var(--text-tertiary);
    font-style: italic;
}

@media (max-width: 900px) {
    .play-history-grid {
        grid-template-columns: 1fr;
    }

    .play-history-list {
        max-height: 360px;
    }
}

.home-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, var(--action) 0%, var(--action-dark) 100%);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-label);
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow:
        0 4px 0 rgba(212, 169, 41, 0.5),
        0 6px 16px rgba(46, 130, 35, 0.4);
}

.action-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.action-btn:hover {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 rgba(212, 169, 41, 0.5),
        0 4px 12px rgba(46, 130, 35, 0.5);
}

.action-btn:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 rgba(212, 169, 41, 0.5),
        0 2px 8px rgba(46, 130, 35, 0.3);
}

.action-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.action-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.help-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
}

.help-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    background: transparent;
    color: currentColor;
}

.help-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.help-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.help-modal {
    background: rgba(5, 10, 20, 0.7);
}

.help-modal-content {
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
}

.help-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.help-close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.help-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

.help-section-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    color: var(--primary-color);
}

.empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.flash-message.error {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.flash-message.success {
    background: rgba(23, 201, 129, 0.12);
    color: #bbf7d0;
    border: 1px solid rgba(23, 201, 129, 0.4);
}

.flash-message.info {
    background: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

/* Games */
.new-game-section,
.active-game-section,
.games-list-section {
    background: var(--surface-elevated);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.new-game-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(47, 139, 85, 0.6);
    box-shadow: 0 0 0 3px rgba(47, 139, 85, 0.15);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.game-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(10, 10, 10, 0.6);
    border: 2px solid rgba(212, 169, 41, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(212, 169, 41, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.game-card-link {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.game-card-link:hover .game-card {
    border-color: rgba(212, 169, 41, 0.5);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(212, 169, 41, 0.2);
}

html[data-theme="light"] .game-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(212, 169, 41, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(212, 169, 41, 0.1);
}

.game-card-link:hover {
    transform: translateY(-1px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.game-card-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.game-card.active {
    border-color: rgba(47, 139, 85, 0.5);
    background: rgba(47, 139, 85, 0.08);
}

.game-opponent {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.game-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.game-card.completed {
    opacity: 0.7;
}

.game-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.rename-details {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.rename-summary {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-tertiary);
    cursor: pointer;
    list-style: none;
}

.rename-summary::-webkit-details-marker {
    display: none;
}

.rename-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.rename-form input {
    flex: 1 1 220px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: rgba(6, 12, 24, 0.7);
    color: var(--text-primary);
}

.rename-hint {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-small {
    padding: 8px 16px;
    border-radius: 12px;
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, var(--action) 0%, var(--action-dark) 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-label);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 3px 0 rgba(212, 169, 41, 0.5),
        0 4px 12px rgba(46, 130, 35, 0.4);
}

.btn-small:hover {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 rgba(212, 169, 41, 0.5),
        0 3px 8px rgba(46, 130, 35, 0.5);
}

.btn-small.primary {
    background: linear-gradient(135deg, var(--action) 0%, var(--action-dark) 100%);
    border-color: var(--gold);
    color: white;
}

.btn-small.secondary {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: none;
}

.btn-small.secondary:hover {
    background: rgba(212, 169, 41, 0.1);
    transform: translateY(0);
}

.game-status-badge {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-dark);
    border: 1px solid var(--gold);
    background: rgba(212, 169, 41, 0.15);
    font-family: var(--font-label);
    font-weight: 700;
}

/* Play sequence header */
.sequence-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sequence-title {
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.back-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.search-icon svg,
.label-icon svg,
.btn-icon svg,
.btn-record-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.label-icon {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
}

.btn-icon,
.btn-record-icon {
    display: inline-flex;
    align-items: center;
    color: currentColor;
}

.search-icon {
    display: grid;
    place-items: center;
}

.btn-record-icon svg {
    width: 20px;
    height: 20px;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-text svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

@media (max-width: 900px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }
}

/* Quick Record formation name */
.qr-formation {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 2px;
}
