/* ===== RESET & BASE ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html, body {
    max-width: 100%;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    background: #080e1a;
    color: #e2e8f0;
    min-height: 100vh;
}

/* ===== LAYOUT WRAPPER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #0f1929 0%, #080e1a 100%);
    border-bottom: 1px solid #1e3a5f;
    padding: 4px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: relative;
}

.header h1 {
    font-size: clamp(18px, 2.8vw, 28px);
    font-weight: 700;
    color: #f1f5f9;
    margin: 14px 0 10px;
    cursor: pointer;
    text-align: center;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

h2 {
    font-size: clamp(14px, 2vw, 20px);
    font-weight: 500;
    color: #94a3b8;
    margin: 18px 0 10px;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

h3 {
    font-size: clamp(15px, 1.8vw, 20px);
    font-weight: 600;
    color: #cbd5e1;
}

/* ===== STATS / TOP MENU BOX ===== */
.stats-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 24px;
    padding: 0 16px;
}

.stat-card {
    background: linear-gradient(135deg, #0f1929 0%, #0a1220 100%);
    border: 1px solid #1e3a5f;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.12);
    border-color: #22c55e;
}

.stat-value {
    font-size: clamp(15px, 1.5vw, 24px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-value.positive {
    color: #22c55e;
}

.stat-value.negative {
    color: #ef4444;
}

.stat-value.neutral {
    color: #22c55e;
}

.stat-label {
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 500;
}

/* FREE / Get Teams gold shimmer cards */
#prize-money-background {
    background: linear-gradient(135deg, #bfa355 0%, #fceabb 25%, #bfa355 50%, #fceabb 75%, #bfa355 100%);
    background-size: 400% 400%;
    animation: shimmeringGold 10s ease infinite;
    color: #166534;
    border-color: #ca8a04;
}

#prize-money-background:hover {
    border-color: #fbbf24;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3);
}

@keyframes shimmeringGold {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== EMOJI ===== */
.emoji {
    height: 1em;
    width: 1em;
    vertical-align: -0.15em;
}

.stat-card {
    font-size: 1rem;
    --card-font-size: 1em;
}

.stat-card #emoji-label {
    width: calc(var(--card-font-size) * 2.2);
    height: calc(var(--card-font-size) * 2.2);
    vertical-align: middle;
}

/* ===== CONTACT LINE ===== */
#showing-results-for {
    font-size: clamp(13px, 1.1vw, 20px);
}

#email {
    color: #22c55e;
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
}

#email:hover {
    text-decoration: underline;
}

/* ===== CHART ===== */
#chart {
    background: #0f1929;
    border-radius: 16px;
    padding: 20px;
    margin: 0 16px 28px;
    border: 1px solid #1e3a5f;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    min-height: 420px;
    width: calc(100% - 32px);
    box-sizing: border-box;
    overflow: hidden;
}

/* ===== MIDDLE MENU (between chart and form) ===== */
.middle-menu {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    flex-wrap: nowrap;
}

.middle-menu-card {
    flex: 1;
    min-width: 0;
    background: #0f1929;
    color: #f1f5f9;
    border: 1px solid #1e3a5f;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.middle-menu-card:hover {
    transform: translateY(-2px);
    border-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.middle-menu-card .stat-value {
    font-size: clamp(14px, 2vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    margin-bottom: 0;
}

.middle-menu-card .emoji {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin-right: 4px;
}

/* ===== STRATEGY FORM SECTION ===== */
.strategy-row {
    background: #0a1220;
    border: 1px solid #1e3a5f;
    border-radius: 12px;
    padding: 16px;
    margin: 0 16px 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
    transition: border-color 0.25s;
}

.strategy-row:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.08);
}

.strategy-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.strategy-divider {
    color: #64748b;
    margin: 0 4px;
}

/* ===== FORM ELEMENTS ===== */
.form-section {
    background: #0a1220;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #1e3a5f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.form-section h4 {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

select {
    padding: 8px 12px;
    background: #080e1a;
    color: #e2e8f0;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:hover {
    border-color: #22c55e;
}

select:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.mobile-select-label {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.mobile-select-group {
    display: flex;
    flex-direction: column;
}

/* ===== TEAM SEARCH ===== */
.team-search-container {
    position: relative;
    flex: 1;
}

.team-search-input {
    padding: 8px 12px;
    background: #080e1a;
    color: #e2e8f0;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.team-search-input:hover {
    border-color: #22c55e;
}

.team-search-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.team-search-input.invalid {
    border-color: #ef4444;
}

.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f1929;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    margin-top: 4px;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
}

.suggestion-item:hover {
    background: #1e3a5f;
}

.suggestion-item.active {
    background: #22c55e;
    color: #080e1a;
}

.no-results {
    padding: 8px 12px;
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

/* ===== TEAM WARNING ===== */
.team-warning {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #fca5a5;
}

.team-warning-icon {
    font-size: 15px;
    flex-shrink: 0;
}

/* ===== INFO BOX (Terms Explained) ===== */
.info-box {
    background: linear-gradient(135deg, #0f1929, #080e1a);
    border: 1px solid #1e3a5f;
    border-radius: 12px;
    padding: 20px;
    margin: 0 auto 16px;
    font-family: inherit;
    color: #e2e8f0;
    text-align: left;
    max-width: 560px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.info-box h3 {
    font-size: clamp(14px, 1.8vw, 17px);
    color: #22c55e;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e3a5f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box-toggle {
    cursor: pointer;
    user-select: none;
}

.info-box-icon {
    width: 1.1em !important;
    height: 1.1em !important;
    flex-shrink: 0;
}

.info-toggle-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s ease;
    color: #64748b;
}

.info-box.collapsed .info-toggle-arrow {
    transform: rotate(-90deg);
}

.info-box.collapsed .info-box-body {
    display: none;
}

.info-box.collapsed h3 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-box p {
    margin-bottom: 9px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
}

.info-box p strong {
    color: #86efac;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* ===== ANALYZE BUTTON ===== */
.btn-analyze {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
    margin-top: 16px;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(34, 197, 94, 0.5);
}

/* ===== TABLE ===== */
.table-container {
    background: #0f1929;
    border: 1px solid #1e3a5f;
    border-radius: 14px;
    padding: 12px;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin: 20px 16px 0;
}

#output-csv {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    color: #e2e8f0;
}

#output-csv thead th {
    background: #080e1a;
    color: #94a3b8;
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #1e3a5f;
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#output-csv thead th:first-child { border-top-left-radius: 10px; }
#output-csv thead th:last-child  { border-top-right-radius: 10px; }

#output-csv tbody tr {
    transition: background 0.15s;
}

#output-csv tbody tr:nth-child(even) {
    background: rgba(30, 58, 95, 0.15);
}

#output-csv tbody tr:hover {
    background: rgba(34, 197, 94, 0.06);
}

#output-csv td {
    padding: 12px 14px;
    border-bottom: 1px solid #1a2e47;
    white-space: nowrap;
}

#output-csv tbody tr:last-child td {
    border-bottom: none;
}

#output-csv td:nth-child(4),
#output-csv td:nth-child(5),
#output-csv td:nth-child(6),
#output-csv td:nth-child(9),
#output-csv td:nth-child(10) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#output-csv td.positive { color: #22c55e; }
#output-csv td.negative { color: #ef4444; }

/* ===== TABLE NOTE ===== */
.table-note {
    margin: 12px 16px 0;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
}

.table-note strong {
    color: #94a3b8;
    font-weight: 600;
}

.table-note a {
    color: #22c55e;
    text-decoration: none;
}

.table-note a:hover {
    text-decoration: underline;
}

/* ===== DOWNLOAD SECTION ===== */
.download-section {
    text-align: center;
    padding: 22px;
    background: #0f1929;
    border-radius: 14px;
    border: 1px solid #1e3a5f;
    margin: 20px 16px 30px;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-family: inherit;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(34, 197, 94, 0.45);
}

/* ===== ODDS INFO CARD ===== */
#oddsinfo .label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#oddsinfo .value {
    color: #22c55e;
    font-weight: 700;
    margin-left: 4px;
}

#oddsinfo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

/* ===== UNIFIED MOBILE RESULT CARD ===== */
.result-card-mobile {
    display: none;
    padding: 0 16px;
    margin-bottom: 0;
}

.result-team-name {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.result-team-profit {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1;
}

.result-team-profit.positive { color: #22c55e; }
.result-team-profit.negative { color: #ef4444; }

.result-team-meta {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
}

.meta-sep {
    color: #334155;
}

/* ===== PROFIT CARD ===== */
#totalProfit {
    cursor: default;
}

#totalprofitvalue {
    font-weight: 700;
}

/* ===== NO DATA ===== */
.no-data-msg {
    color: #94a3b8;
    text-align: center;
    padding: 80px 20px;
    font-size: 16px;
}

/* ===== WARNING BOX ===== */
.warning-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #78350f;
    padding: 22px;
    border-radius: 14px;
    text-align: center;
    margin: 0 16px 24px;
    border: 2px solid #fbbf24;
}

.warning-box h3 {
    margin-bottom: 10px;
    color: #92400e;
}

.warning-box a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.warning-box a:hover {
    text-decoration: underline;
}

/* ===== NAV ===== */
.nav-container {
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
    padding: 15px 0;
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo span { color: #94a3b8; }

.site-logo {
    display: block;
    text-align: center;
    font-size: clamp(6px, 0.84vw, 8.4px);
    font-weight: 800;
    letter-spacing: 2px;
    color: #22c55e;
    white-space: nowrap;
    cursor: default;
    user-select: none;
    margin-bottom: 6px;
}

.nav-tabs {
    display: flex;
    gap: 5px;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-tab {
    padding: 15px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.25s;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 14px;
}

.nav-tab:hover {
    color: #e2e8f0;
    background: rgba(34, 197, 94, 0.07);
}

.nav-tab.active {
    color: #22c55e;
    border-bottom-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

/* ===== HIDDEN BUTTON (free strategy) ===== */
#free-strat-button {
    position: absolute;
    left: -9999px;
}

/* ===== DESKTOP STATS BOX ===== */
@media (min-width: 600px) {
    .stats-box {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (min-width: 900px) {
    .stats-box {
        grid-template-columns: repeat(5, 1fr);
        gap: 14px;
    }

    .stat-card {
        padding: 16px 12px;
    }
}

/* ===== DESKTOP GRID — STRATEGY CONTROLS ===== */
@media (min-width: 1024px) {
    .form-section {
        max-width: 1200px;
        margin: 20px auto;
    }

    .strategy-controls {
        display: grid;
        grid-template-columns:
            minmax(200px, 2fr)
            minmax(100px, 1fr)
            minmax(100px, 1fr)
            minmax(180px, 1.2fr)
            minmax(180px, 1.2fr)
            minmax(100px, 0.8fr);
        gap: 14px;
        align-items: end;
    }

    .strategy-divider {
        display: none;
    }

    .strategy-row {
        padding: 20px;
    }

    .strategy-row-header {
        font-size: 16px;
        margin-bottom: 12px;
    }
}

@media (min-width: 1280px) {
    .form-section   { max-width: 1200px; }
    .strategy-row-header { font-size: 18px; }

    .form-section label,
    .mobile-select-label { font-size: 13px; }

    .team-search-input,
    .strategy-controls select {
        font-size: 15px;
        padding: 10px 14px;
    }

    .btn-analyze {
        font-size: 17px;
        padding: 14px 36px;
    }
}

@media (min-width: 1536px) {
    .form-section       { max-width: 1350px; }
    .strategy-row       { padding: 24px; }
    .strategy-row-header { font-size: 20px; }

    .team-search-input,
    .strategy-controls select { font-size: 16px; }

    .btn-analyze { font-size: 18px; }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .stats-box {
        padding: 0 10px;
        margin-bottom: 16px;
    }

    .stat-card {
        padding: 14px 10px;
        border-radius: 12px;
    }

    #chart {
        margin: 0 10px 20px;
        padding: 10px;
        border-radius: 12px;
        min-height: 300px;
        width: calc(100% - 20px);
    }

    .middle-menu {
        padding: 8px 10px;
        gap: 8px;
    }

    .strategy-row {
        margin: 0 10px 10px;
        padding: 12px;
        gap: 0;
    }

    .strategy-controls {
        flex-direction: column;
        gap: 0;
    }

    .strategy-divider {
        display: none;
    }

    .mobile-select-group {
        width: 100%;
        margin-bottom: 10px;
    }

    .mobile-select-group:last-child {
        margin-bottom: 0;
    }

    .mobile-select-group select {
        width: 100%;
        min-width: auto;
        font-size: 13px;
        padding: 10px;
    }

    .mobile-range-group {
        width: 100%;
        display: flex;
        gap: 8px;
        align-items: center;
        margin-bottom: 10px;
    }

    .mobile-range-group .mobile-select-group {
        margin-bottom: 0;
        flex: 1;
    }

    .mobile-range-separator {
        color: #64748b;
        font-size: 12px;
        padding-top: 18px;
    }

    .team-search-container {
        width: 100%;
        margin-bottom: 10px;
    }

    .team-warning {
        font-size: 12px;
        padding: 8px 10px;
    }

    .form-section {
        padding: 14px;
        border-radius: 12px;
    }

    .table-container {
        margin: 16px 10px 0;
        border-radius: 12px;
    }

    #output-csv {
        font-size: 13px;
    }

    #output-csv thead th,
    #output-csv td {
        padding: 10px 10px;
    }

    .table-note {
        font-size: 12px;
        margin: 10px 10px 0;
    }

    .download-section {
        padding: 14px;
        border-radius: 12px;
        margin: 16px 10px 24px;
    }

    .download-link {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 14px;
    }

    .warning-box {
        margin: 0 10px 20px;
        padding: 14px;
        border-radius: 12px;
    }

    .btn-analyze {
        padding: 12px 22px;
        font-size: 15px;
    }

    .info-box {
        margin: 0 10px 12px;
    }

    .result-card-mobile {
        display: block;
    }

    .results-row {
        display: none !important;
    }

    .actions-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 10px;
        gap: 8px;
    }

    .action-card {
        min-width: unset;
        max-width: unset;
        padding: 12px 10px;
        font-size: 12px;
        white-space: normal;
    }

    .action-card .stat-value {
        font-size: 12px;
    }

    .action-card .emoji {
        width: 16px;
        height: 16px;
    }

    .action-emoji {
        width: 1.4em !important;
        height: 1.4em !important;
        margin-bottom: 3px;
    }
}

@media (max-width: 400px) {
    .stats-box {
        grid-template-columns: repeat(2, minmax(80px, 1fr));
    }

    .actions-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 8px;
        gap: 6px;
    }

    .action-card {
        min-width: unset;
        max-width: unset;
        padding: 10px 8px;
        font-size: 11px;
    }

    .action-card .stat-value {
        font-size: 11px;
    }

    .action-card .emoji {
        width: 14px;
        height: 14px;
    }

    .action-emoji {
        width: 1.1em;
        height: 1.1em;
        margin-bottom: 1px;
    }

    #showing-results-for { font-size: 13px; }
    #email { font-size: 10px; }
}

@media (max-width: 200px) {
    .stats-box {
        grid-template-columns: repeat(2, minmax(80px, 1fr));
        padding: 0;
    }

    #showing-results-for { font-size: 13px; }
    #email { font-size: 10px; }
}

/* ===== MENU SECTION LABEL ===== */
.menu-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 16px 4px;
    width: 100%;
}

/* ===== MENU ROWS (results + actions) ===== */
.menu-row {
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 0 16px;
    margin-bottom: 8px;
}

.results-row {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 4px;
}

/* ===== RESULT TOGGLE PILLS ===== */
.result-toggle {
    float: right;
    display: none;
}

.toggle-pill {
    background: #0f1929;
    border: 1px solid #1e3a5f;
    color: #94a3b8;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border-radius: 0;
}

.toggle-pill:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.toggle-pill:last-child {
    border-radius: 0 8px 8px 0;
}

.toggle-pill.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #080e1a;
}

.actions-row {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 24px;
}

@media (min-width: 600px) {
    .results-row { grid-template-columns: repeat(4, 1fr); }
    .actions-row { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
    .results-row { grid-template-columns: repeat(4, 1fr); }
    .actions-row { grid-template-columns: repeat(6, 1fr); }
}

/* ===== ACTION CARD ===== */
.action-card {
    cursor: pointer !important;
}

.action-emoji {
    width: 2em;
    height: 2em;
    vertical-align: middle;
    margin-bottom: 4px;
}

/* ===== GOLD CARD (class-based, replaces #prize-money-background) ===== */
.gold-card {
    background: linear-gradient(135deg, #bfa355 0%, #fceabb 25%, #bfa355 50%, #fceabb 75%, #bfa355 100%);
    background-size: 400% 400%;
    animation: shimmeringGold 10s ease infinite;
    color: #166534;
    border-color: #ca8a04;
}

.gold-card:hover {
    border-color: #fbbf24 !important;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3) !important;
}

.sticky-nav-card.gold-card {
    background: linear-gradient(135deg, #bfa355 0%, #fceabb 25%, #bfa355 50%, #fceabb 75%, #bfa355 100%);
    background-size: 400% 400%;
    animation: shimmeringGold 10s ease infinite;
    color: #166534;
    border-color: #ca8a04;
}

/* ===== CONTACT LINE ===== */
.contact-line {
    width: 100%;
    margin: 0 0 4px;
    text-align: center;
    font-size: clamp(13px, 1.1vw, 16px);
    color: #94a3b8;
}

.guide-link {
    color: #22c55e;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

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

/* ===== STICKY NAV (bottom fixed bar) ===== */
.sticky-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    padding: 8px 16px 14px;
    background: rgba(8, 14, 26, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #1e3a5f;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.sticky-nav.visible {
    transform: translateY(0);
}

.sticky-nav-card {
    flex: 1;
    min-width: 0;
    background: #0f1929;
    color: #f1f5f9;
    border: 1px solid #1e3a5f;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sticky-nav-card:hover {
    transform: translateY(-2px);
    border-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.sticky-nav-card .stat-value {
    font-size: clamp(13px, 2vw, 18px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    margin-bottom: 0;
}

.sticky-nav-card .emoji {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* ===== FREE PICK CELEBRATION ===== */
.free-pick-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.free-pick-overlay.visible {
    opacity: 1;
}

.free-pick-card {
    background: linear-gradient(135deg, #0f1929 0%, #1a2e47 100%);
    border: 2px solid #ca8a04;
    border-radius: 20px;
    padding: 32px 48px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(202, 138, 4, 0.25);
    transform: scale(0.82);
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90vw;
}

.free-pick-overlay.visible .free-pick-card {
    transform: scale(1);
}

.free-pick-label {
    font-size: clamp(15px, 2.5vw, 22px);
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.free-pick-team {
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 800;
    color: #FFD700;
    text-shadow: 0 0 24px rgba(255, 215, 0, 0.45);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.free-pick-sub {
    font-size: 13px;
    color: #94a3b8;
    letter-spacing: 0.4px;
}

.free-pick-particle {
    position: fixed;
    top: -30px;
    pointer-events: none;
    z-index: 9998;
    animation: freePickFall linear forwards;
}

@keyframes freePickFall {
    0%   { transform: translateY(0)     rotate(0deg);   opacity: 1; }
    75%  { opacity: 1; }
    100% { transform: translateY(108vh) rotate(600deg); opacity: 0; }
}

/* ===== PAGE TABS ===== */
.page-tabs-wrapper {
    background: #080e1a;
    border-bottom: 1px solid #1e3a5f;
    position: relative;
}

.burger-menu {
    display: none;
    background: none;
    border: 1px solid #1e3a5f;
    color: #94a3b8;
    font-size: 20px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin: 6px 8px;
    font-family: inherit;
    line-height: 1;
}

.burger-menu:hover,
.burger-menu:active {
    border-color: #22c55e;
    color: #22c55e;
}

.page-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 16px;
}

.page-tab {
    padding: 15px 28px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.page-tab:hover { color: #cbd5e1; border-bottom-color: #334155; }
.page-tab.active { color: #22c55e; border-bottom-color: #22c55e; }

/* ===== MOBILE PAGE TABS (burger menu) ===== */
@media (max-width: 768px) {
    .burger-menu {
        display: inline-block;
    }

    .page-tabs {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 500;
        background: #0f1929;
        border: 1px solid #1e3a5f;
        box-shadow: 0 8px 24px rgba(0,0,0,0.5);
        padding: 0;
        flex-wrap: nowrap;
    }

    .page-tabs.open {
        display: flex;
    }

    .page-tab {
        padding: 12px 16px;
        border-bottom: 1px solid #1a2e47;
        font-size: 14px;
        border-radius: 0;
    }

    .page-tab:last-child {
        border-bottom: none;
    }
}

/* ===== More filters (collapsible advanced filters) ===== */
.more-filters {
    width: 100%;
    flex: 1 1 100%;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    background: #0a1220;
    overflow: hidden;
}
.more-filters summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    user-select: none;
}
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary:hover { color: #22c55e; }
.more-filters .mf-caret {
    font-size: 11px;
    transition: transform 0.2s ease;
}
.more-filters[open] .mf-caret { transform: rotate(180deg); }
.more-filters-body {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 12px 14px;
    border-top: 1px solid #1e3a5f;
}

@media (min-width: 1024px) {
    .strategy-controls.fs-search {
        grid-template-columns: minmax(200px, 2fr) minmax(120px, 1fr) minmax(220px, 1.6fr);
    }
    .strategy-controls.fs-search .more-filters {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .more-filters-body {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
}

/* ===== More info (collapsible guide detail inside How It Works) ===== */
.more-info { margin-top: 2px; }
.more-info summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    color: #22c55e;
    font-size: 13px;
    font-weight: 600;
    user-select: none;
}
.more-info summary::-webkit-details-marker { display: none; }
.more-info summary:hover { color: #86efac; }
.more-info .mf-caret {
    font-size: 10px;
    transition: transform 0.2s ease;
}
.more-info[open] .mf-caret { transform: rotate(180deg); }
.more-info-body { margin-top: 6px; }
.more-info-body p:last-child { margin-bottom: 0; }

/* ── Chart "Show full history" toggle (subtle) ─────────────────────────── */
.chart-toggle-row { margin: 0 2px 6px; }
.chart-toggle-btn {
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    padding: 4px 10px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.chart-toggle-btn:hover { border-color: #22c55e; color: #22c55e; }
