/* Sport filter pills (board + fixtures) */
.sport-filter-bar {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.sport-filter-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--table-border, #dee2e6);
    border-radius: 20px;
    background: transparent;
    color: var(--text-color, #555);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.sport-filter-btn:hover {
    background: var(--hover-background, #f0f0f0);
}

.sport-filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

[data-theme="dark"] .sport-filter-btn.active {
    background: #5568d3;
    border-color: #5568d3;
}

/* Root Variables for Responsive Design */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --bonus-gradient: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    --shadow-sm: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.25);
    --border-radius: 12px;
}

/* Global Mobile-First Styles */
* {
    box-sizing: border-box;
}

body {
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Leaderboard Section */
.fantasy-leaderboard-section {
    background-color: var(--global-background-color);
    color: var(--text-color);
    padding: 0 0 2rem 0;
    margin-top: 0;
}

/* ── Shared section-header pattern (matches mission/manifesto style) ── */
.section-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #667eea;
    margin-bottom: 8px;
    display: block;
}

/* Icon pill — replaces bare <i> tags in section titles */
.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(102,126,234,0.22), rgba(118,75,162,0.22));
    color: #667eea;
    font-size: 1rem;
    margin-right: 12px;
    flex-shrink: 0;
    vertical-align: middle;
}

.section-title {
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 800;
    text-shadow: none;
    color: var(--title-color);
    margin-bottom: 0.3rem;
    letter-spacing: -0.4px;
    line-height: 1.2;
    word-break: break-word;
    display: flex;
    align-items: center;
}

/* Gradient accent on key word(s) — wrap target text in <span class="title-accent"> */
.title-accent {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.52;
    font-weight: 500;
    margin-bottom: 0;
    line-height: 1.55;
}

/* Indent subtitle only when a .section-icon is present in the sibling title */
.section-title:has(.section-icon) + .section-subtitle,
.timeline-title:has(.section-icon) + .timeline-subtitle,
.points-race-title:has(.section-icon) + .points-race-subtitle,
.predictions-section-title:has(.section-icon) + .predictions-section-subtitle {
    margin-left: 50px;
}

.section-header {
    margin-bottom: 1.75rem;
}

.leaderboard-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.leaderboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-color);
}

.leaderboard-card:active {
    transform: translateY(-2px);
}

.leaderboard-card.bonus {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

.leaderboard-card.bonus .card-body {
    color: white;
}

.card-header {
    background: var(--gradient-color);
    color: white;
    padding: 1rem;
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: bold;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header i {
    font-size: 1.2em;
}

.leaderboard-card.bonus .card-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card-body {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--table-border);
    font-weight: 500;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    animation: fadeInUp 0.6s ease forwards;
}

.leaderboard-item:nth-child(1) {
    animation-delay: 0.1s;
}

.leaderboard-item:nth-child(2) {
    animation-delay: 0.2s;
}

.leaderboard-item:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.leaderboard-item.current-user {
    font-weight: 600;
}

.lb-form-dots {
    display: flex;
    gap: 3px;
    align-items: center;
    margin-left: 4px;
}

.lb-form-dots .form-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: default;
}

.form-dot-great { background: transparent; border-radius: 0; color: #10B981; font-size: 13px; line-height: 1; }
.form-dot-good  { background-color: #3B82F6; }
.form-dot-good2 { background-color: #16A34A; }
.form-dot-zero  { background-color: #94A3B8; }
.form-dot-bad   { background: transparent; border-radius: 0; color: #F43F5E; font-size: 13px; line-height: 1; }
.form-dot-empty { background-color: transparent; border-radius: 2px; border: 1px solid #94A3B8; opacity: 0.55; }

.loyalty-tier-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    vertical-align: middle;
    text-transform: none;
}
.loyalty-tier-diehard  { background: #F59E0B; color: #1a1a1a; }
.loyalty-tier-ultrafan { background: #10B981; color: #fff; }
.loyalty-tier-legend   { background: #EF4444; color: #fff; }

.leaderboard-ellipsis {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
    color: var(--text-color-secondary);
}

.rank {
    font-weight: bold;
    font-size: clamp(1.5rem, 5vw, 2rem);
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.rank[data-position="1"] {
    animation: bounce 1.5s ease-in-out infinite;
}

.rank[data-position="2"] {
    animation: bounce 1.7s ease-in-out infinite;
}

.rank[data-position="3"] {
    animation: bounce 1.9s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.rank::before {
    content: attr(data-emoji);
    display: inline-block;
    margin-right: 0.25rem;
}

.player-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1em;
    flex-shrink: 0;
}

.leaderboard-card.bonus .score {
    color: #f5576c;
}

/* Login Card */
@keyframes auth-card-in {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes header-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes btn-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pin-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); }
    70%  { transform: scale(0.94); }
    100% { transform: scale(1); }
}

.login-card {
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(83,109,254,0.13), 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    animation: auth-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-card .card-header {
    background: linear-gradient(270deg, #f093fb, #f5576c, #536DFE, #854fee);
    background-size: 400% 400%;
    animation: header-gradient-shift 6s ease infinite;
    border-bottom: none;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-card .card-header .login-card-text {
    flex: 1;
    text-align: center;
    padding-bottom: 1.25rem;
}

/* floating sport icons behind header text */
.login-card .card-header::before {
    content: '⚽ 🏏 ⚽ 🏏 ⚽';
    position: absolute;
    font-size: 2.2rem;
    opacity: 0.08;
    letter-spacing: 1.2rem;
    white-space: nowrap;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.login-card .card-header .auth-header-icon {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.login-card .card-header span {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}


.login-card .card-header .login-img-spacer {
    width: 100px;
    flex-shrink: 0;
}

.login-card .card-header .login-img {
    height: 110px;
    width: 90px;
    object-fit: contain;
    object-position: right bottom;
    flex-shrink: 0;
    align-self: flex-end;
}

.login-card .card-header .auth-header-sub {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255,255,255,0.8);
    margin-top: 0.2rem;
    letter-spacing: 0.3px;
    text-align: center;
}

@media (max-width: 767px) {
    .login-card .card-header .login-img-spacer {
        display: none;
    }
    .login-card .card-header .login-img {
        height: 75px;
        width: 75px;
    }
    .login-card .card-header .login-card-text {
        text-align: left;
        padding-left: 0;
    }
    .login-card .card-header .auth-header-sub {
        text-align: left;
    }
}

.login-card .card-body {
    background: var(--card-background);
    color: var(--text-color);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.4rem 1.8rem;
}

.login-card p.auth-sub {
    font-size: 0.88rem;
    color: var(--text-color);
    opacity: 0.65;
    text-align: center;
    margin-bottom: 0.9rem;
    line-height: 1.5;
}

/* Label hints */
.login-card .auth-label-hint {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-color);
    opacity: 0.5;
    margin-top: 1px;
    font-style: italic;
}

/* Input fields */
.login-card .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-color);
    opacity: 1;
    margin-bottom: 0.4rem;
}

.login-card .form-control {
    border: 2px solid var(--table-border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    background: var(--card-background);
    color: var(--title-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card .form-control:focus {
    border-color: #536DFE;
    box-shadow: 0 0 0 3px rgba(83,109,254,0.15);
    outline: none;
    background-color: var(--card-background);
}

/* Select styling */
.login-card select.form-control {
    cursor: pointer;
    height: auto !important;
    color: var(--title-color) !important;
    background-color: var(--card-background) !important;
}

[data-theme="dark"] .login-card select.form-control option {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

/* Submit button with shimmer */
.login-card .btn {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.78rem 1.5rem;
    border: none;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.4px;
}

.login-card .btn-primary {
    background: linear-gradient(90deg, #536DFE 0%, #854fee 40%, #f5576c 70%, #536DFE 100%);
    background-size: 200% auto;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(83,109,254,0.35);
    transition: background-position 0.4s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.login-card .btn-primary:hover {
    background-position: right center;
    box-shadow: 0 6px 20px rgba(83,109,254,0.45);
    transform: translateY(-1px);
    color: white;
}

.login-card .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(83,109,254,0.3);
}

.login-card .btn-dark {
    background: var(--title-color);
    color: var(--card-background);
}

.login-card .btn-dark:active {
    opacity: 0.85;
}

.login-card hr {
    margin: 1.2rem 0;
    border: none;
    border-top: 1px solid var(--table-border);
}

.login-card .auth-footer-text {
    font-size: 0.88rem;
    text-align: center;
    color: var(--text-color);
    opacity: 0.75;
}

.login-card .auth-footer-text a {
    font-weight: 700;
    color: #536DFE;
    text-decoration: none;
}

.login-card .auth-footer-text a:hover {
    text-decoration: underline;
}

/* Help & Rules Card */
.help-card {
    min-height: unset;
}

.help-card .card-body {
    padding: 0.6rem 0.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.help-section {
    margin-bottom: 0.5rem;
}

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

.help-section-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    padding: 0.3rem 0.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 6px;
}

.help-sport-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.help-sport-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--title-color);
}

.help-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0 0.2rem;
}

.help-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    background: var(--card-background-secondary);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.82rem;
    font-weight: 500;
}

.help-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-left-color: var(--primary-color);
    transform: translateX(4px);
    color: var(--primary-color);
    text-decoration: none;
}

.help-link i {
    font-size: 0.82rem;
    width: 16px;
    text-align: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.help-link span {
    flex: 1;
}

.help-divider {
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--table-border) 20%,
        var(--table-border) 80%,
        transparent 100%
    );
    margin: 0.5rem 0;
}

/* Hero Banner Section - FPL Style */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    margin-bottom: 0.5rem;
}

.hero-banner-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 1rem 3rem;
    min-height: unset;
}

.hero-text {
    color: white;
}

.hero-eyebrow {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.hero-eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.hero-eyebrow-free {
    background: rgba(56, 239, 125, 0.2);
    border-color: rgba(56, 239, 125, 0.45);
    color: #afffce;
}

.hero-main-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 1.2rem;
    line-height: 1.15;
    color: white;
    text-align: left;
}

.hero-title-accent {
    display: inline-block;
    background: linear-gradient(90deg, #ffe259, #ffa751);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-main-description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.65;
    margin-bottom: 1.4rem;
    opacity: 0.92;
    text-align: left;
}

.hero-perks {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    justify-content: flex-start;
}

.hero-perk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
}

.hero-perk i {
    font-size: 0.72rem;
    opacity: 0.75;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.btn-hero {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: 2px solid white;
    min-width: 160px;
    text-align: center;
}

.btn-hero-outline {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: 2px solid #4facfe;
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn-hero-outline:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.6);
    border-color: #00f2fe;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    color: white;
    border: 2px solid #38ef7d;
    box-shadow: 0 5px 15px rgba(56, 239, 125, 0.4);
}

.btn-hero-primary:hover {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(56, 239, 125, 0.6);
    border-color: #11998e;
}

.btn-hero-amber {
    background: linear-gradient(135deg, #a855f7 0%, #6d28d9 100%);
    color: white;
    border: 2px solid #a855f7;
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
}

.btn-hero-amber:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.6);
    border-color: #6d28d9;
}

.btn-hero-navy {
    background: linear-gradient(135deg, #1e90ff 0%, #1565c0 100%);
    color: white;
    border: 2px solid #1e90ff;
    box-shadow: 0 5px 15px rgba(30, 144, 255, 0.4);
}

.btn-hero-navy:hover {
    background: linear-gradient(135deg, #1565c0 0%, #1e90ff 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(30, 144, 255, 0.6);
    border-color: #1565c0;
}

.btn-hero-orange {
    background: linear-gradient(135deg, #f7971e 0%, #e05d12 100%);
    color: white;
    border: 2px solid #f7971e;
    box-shadow: 0 5px 15px rgba(247, 151, 30, 0.4);
}

.btn-hero-orange:hover {
    background: linear-gradient(135deg, #e05d12 0%, #f7971e 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(247, 151, 30, 0.55);
    border-color: #e05d12;
}

.btn-hero-sm {
    padding: 0.3rem 1.2rem;
    font-size: 0.85rem;
    min-width: 100px;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-logo {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Responsive Hero */
@media (max-width: 991px) {
    .hero-banner-content {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
        gap: 3rem;
        text-align: center;
    }

    .hero-eyebrow {
        justify-content: center;
    }

    .hero-main-title {
        text-align: center;
    }

    .hero-main-description {
        text-align: center;
    }

    .hero-perks {
        justify-content: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
        padding: 0;
    }

    .hero-logo {
        max-width: 300px;
    }
}

@media (max-width: 767px) {
    .hero-banner-content {
        padding: 2.5rem 1.5rem;
        gap: 2.5rem;
    }

    .hero-main-title {
        font-size: 2rem;
    }

    .hero-main-description {
        font-size: 1rem;
    }

    .btn-hero {
        padding: 0.85rem 2rem;
        font-size: 1rem;
        min-width: 140px;
    }

    .btn-hero.btn-hero-sm {
        padding: 0.3rem 1.2rem;
        font-size: 0.85rem;
        min-width: 100px;
    }

    .hero-buttons {
        gap: 1rem;
    }

    .hero-logo {
        max-width: 250px;
    }

    .hero-image {
        padding: 0;
    }
}

@media (max-width: 479px) {
    .hero-banner-content {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-hero {
        width: 100%;
    }

    .btn-hero.btn-hero-sm {
        width: auto;
    }

    .hero-logo {
        max-width: 200px;
    }

    .hero-image {
        padding: 0;
    }
}

/* Ticker Section */
.fantasy-ticker-section {
    background-color: var(--global-background-color);
    padding: 1.6rem 0 0.4rem 0;
}

.ticker-wrapper {
    background: transparent;
    display: flex;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .ticker-wrapper {
        padding: 0.25rem 1rem;
    }

    .ticker {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }

    .ticker-item {
        font-size: 0.75rem;
        padding: 0.4rem 0.9rem;
    }
}

.ticker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    align-items: center;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1.1rem 0.35rem 0.75rem;
    border: 1.5px solid #c9a84c;
    border-radius: 999px;
    background: transparent;
    font-size: clamp(0.72rem, 2vw, 0.88rem);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #b8902a;
    flex-shrink: 0;
    white-space: nowrap;
}

[data-theme="dark"] .ticker-item {
    border-color: #c9a84c99;
    color: #d4a93a;
}

.ticker-vs {
    text-transform: none;
    font-size: 0.8em;
    font-weight: 500;
    opacity: 0.6;
    letter-spacing: 0;
}

.ticker-dot {
    position: relative;
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ticker-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: ticker-ring 1.6s ease-out infinite;
}

.ticker-dot--live              { background: #e74c3c; }
.ticker-dot--live::after       { background: #e74c3c; }
.ticker-dot--done              { background: #27ae60; }
.ticker-dot--done::after       { background: #27ae60; }

@keyframes ticker-ring {
    0%   { transform: scale(1);   opacity: 0.7; }
    100% { transform: scale(2.8); opacity: 0; }
}


/* ===== Private Leagues ===== */

/* Tab bar */
.board-view-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--table-border);
    padding-bottom: 0;
}

.board-view-tabs-left {
    display: flex;
    gap: 0;
    align-items: center;
}

.board-view-tabs-right {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    padding-bottom: 4px;
    flex-shrink: 0;
}

.league-tab-action-btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.league-tab-action-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.league-tab-action-btn--join {
    border-color: var(--text-muted, #888);
    color: var(--text-muted, #888);
}

.league-tab-action-btn--join:hover {
    background: var(--text-muted, #888);
    color: #fff;
}


.board-view-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 0.02em;
    border-radius: 0;
    white-space: nowrap;
}

.board-view-tab:hover {
    color: var(--primary-color);
}

.board-view-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ── Tab bar responsive ──────────────────────────────────────── */
@media (max-width: 575px) {
    .board-view-tabs {
        flex-wrap: wrap;
        gap: 0;
        border-bottom: none;
        margin-bottom: 0;
    }

    /* Tabs row fills full width with its own bottom border */
    .board-view-tabs-left {
        width: 100%;
        border-bottom: 2px solid var(--table-border);
        margin-bottom: 0.6rem;
    }

    .board-view-tab {
        flex: 1;
        text-align: center;
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }

    /* Hide action buttons on small screens — empty state has its own CTA buttons */
    .board-view-tabs-right {
        display: none;
    }
}

.league-tab-count {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0 6px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.6;
}

/* Empty state */
.league-empty-state {
    text-align: center;
    padding: 3rem 1rem 2.5rem;
    color: var(--text-color);
}

.league-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    display: block;
    animation: trophy-bounce 2.4s ease-in-out infinite;
}

@keyframes trophy-bounce {
    0%, 100% { transform: translateY(0);    }
    45%       { transform: translateY(-8px); }
    60%       { transform: translateY(-4px); }
    75%       { transform: translateY(-7px); }
}

.league-empty-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--title-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.league-empty-sub {
    font-size: 0.88rem;
    line-height: 1.6;
    opacity: 0.6;
    margin-bottom: 2rem;
}

.league-empty-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* CTA buttons */
.league-cta-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-align: left;
    min-width: 190px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
}

.league-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.18s ease;
}

.league-cta-btn:hover { transform: translateY(-3px); }
.league-cta-btn:hover::before { background: rgba(255,255,255,0.07); }
.league-cta-btn:active { transform: translateY(0); }

.league-cta-btn--create {
    background: linear-gradient(135deg, #536DFE 0%, #448AFF 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(83, 109, 254, 0.4);
}

.league-cta-btn--create:hover {
    box-shadow: 0 8px 24px rgba(83, 109, 254, 0.55);
}

.league-cta-btn--join {
    background: transparent;
    color: var(--text-color);
    box-shadow: inset 0 0 0 1.5px var(--table-border);
}

.league-cta-btn--join:hover {
    box-shadow: inset 0 0 0 1.5px var(--primary-color), 0 4px 14px rgba(83,109,254,0.15);
    color: var(--primary-color);
}

.league-cta-btn i {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.league-cta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.league-cta-text strong { font-size: 0.92rem; font-weight: 700; }
.league-cta-text small  { font-size: 0.72rem; opacity: 0.7; }

/* League selector */
.league-selector-bar { margin-bottom: 1rem; }
.league-selector-select {
    background: var(--card-background);
    color: var(--title-color);
    border: 1px solid var(--table-border);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
}

/* League header bar */
.league-header-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.league-header-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--title-color);
    flex: 1;
    min-width: 120px;
}

.league-code-pill {
    display: inline-block;
    background: var(--card-background-secondary);
    border: 1.5px solid #c9a84c;
    color: #b8902a;
    border-radius: 999px;
    padding: 0.2rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    font-family: monospace;
}

[data-theme="dark"] .league-code-pill {
    color: #d4a93a;
    border-color: #c9a84c88;
}

.league-code-copy-btn {
    background: none;
    border: 1px solid var(--table-border);
    color: var(--text-color);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.league-code-copy-btn:hover {
    background: var(--hover-background);
    color: var(--primary-color);
}

.league-leave-btn {
    color: #dc2626;
    border-color: #dc262633;
    background: none;
    font-size: 0.78rem;
    border-radius: 6px;
}

.league-leave-btn:hover {
    background: #dc262618;
    color: #dc2626;
    border-color: #dc262660;
}

.league-loading, .league-error {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.6;
}

/* Modal styles */
.league-modal-content {
    background: var(--card-background);
    border: 1px solid var(--table-border);
    border-radius: 12px;
}

.league-modal-header {
    border-bottom: 1px solid var(--table-border);
    padding: 1.25rem 1.5rem;
}

.league-modal-header .modal-title {
    color: var(--title-color);
    font-weight: 700;
    font-size: 1rem;
}

.league-modal-close {
    color: var(--text-color);
    opacity: 0.6;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
}

.league-modal-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.75;
    letter-spacing: 0.03em;
    display: block;
    margin-bottom: 0.5rem;
}

.league-modal-input {
    width: 100%;
    background: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    color: var(--title-color);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.league-modal-input:focus { border-color: var(--primary-color); }

.league-modal-msg {
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

.league-modal-footer {
    border-top: 1px solid var(--table-border);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Code display after creation */
.league-code-display-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-color);
    opacity: 0.65;
    margin-bottom: 0.5rem;
}

.league-code-display {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--card-background-secondary);
    border: 1.5px solid #c9a84c;
    border-radius: 12px;
    padding: 0.75rem 1.1rem;
}

.league-code-display span {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: #b8902a;
    font-family: monospace;
    flex: 1;
    text-align: center;
}

[data-theme="dark"] .league-code-display span { color: #d4a93a; }

/* Profile card league pills */
.pc-league-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--card-background-secondary);
    border: 1px solid var(--table-border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--title-color);
    cursor: pointer;
    transition: background 0.15s;
}

.pc-league-pill:hover { background: var(--hover-background); }

.pc-league-pill-count {
    background: var(--primary-color);
    color: #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0 5px;
    line-height: 1.6;
}

/* Touch-Friendly Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Mobile touchscreen devices */
    .leaderboard-card,
    .login-card,
    .help-card {
        margin-bottom: 1.5rem;
    }

    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .leaderboard-item,
    .table tbody td {
        padding: 1rem 0.75rem;
    }

    .help-link {
        min-height: 44px;
        padding: 0.75rem;
    }
}

/* Small Phones (320px - 479px) */
@media (max-width: 479px) {
    .league-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .league-header-name {
        font-size: 0.95rem;
    }
    .league-code-display span {
        font-size: 1.3rem;
        letter-spacing: 0.15em;
    }
    .league-empty-actions {
        flex-direction: column;
        align-items: center;
    }
    .league-cta-btn {
        width: 100%;
        max-width: 280px;
    }
    .league-modal-footer {
        flex-direction: column-reverse;
        gap: 0.4rem;
    }
    .league-modal-footer .btn {
        width: 100%;
    }
    .league-selector-select {
        width: 100%;
    }
    #createLeagueModal .modal-dialog,
    #joinLeagueModal .modal-dialog {
        margin: 0.5rem;
    }

    .fantasy-leaderboard-section {
        padding: 0.5rem 0 1.5rem 0;
    }

    .fantasy-ticker-section {
        padding: 1rem 0 0.5rem 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .row {
        margin-left: -0.375rem;
        margin-right: -0.375rem;
    }

    .col-md-4 {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    .card-header {
        padding: 0.75rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .leaderboard-item {
        padding: 0.6rem 0;
        gap: 0.25rem;
    }

    .rank {
        min-width: 30px;
        font-size: 1.5rem;
    }

    .login-card .btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    .ticker-item {
        font-size: 0.72rem;
        padding: 0.3rem 0.85rem 0.3rem 0.6rem;
    }


    .table thead th {
        padding: 0.5rem 0.25rem;
    }

    .table tbody td {
        padding: 0.5rem 0.25rem;
    }

    .help-card .card-body {
        padding: 0.75rem 0.5rem;
    }

    .help-section-header {
        padding: 0.4rem 0.4rem;
        gap: 0.4rem;
    }

    .help-sport-icon {
        font-size: 1.3rem;
    }

    .help-sport-title {
        font-size: 1rem;
    }

    .help-link {
        padding: 0.6rem 0.5rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .help-link i {
        font-size: 0.9rem;
        width: 18px;
    }
}

/* Medium Phones/Tablets (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .container {
        max-width: 95%;
    }

    .col-md-4 {
        margin-bottom: 1.2rem;
    }

    .leaderboard-item {
        padding: 0.8rem 0;
    }

    .login-card .btn {
        padding: 0.7rem 1.2rem;
    }


    .help-link {
        padding: 0.7rem 0.65rem;
    }
}

/* Tablets/Medium Devices (768px - 1023px) */
@media (min-width: 768px) {
    .fantasy-ticker-section {
        padding: 1.6rem 0 0.4rem 0;
    }

    .fantasy-leaderboard-section {
        padding: 0.5rem 0 1.5rem 0;
    }

    .leaderboard-card {
        margin-bottom: 0;
    }

    .login-card {
        margin-bottom: 0;
    }

    .help-card {
        margin-bottom: 0;
    }

    .leaderboard-item {
        padding: 1rem 0;
    }
}

/* Large Devices (1024px+) */
@media (min-width: 1024px) {
    .fantasy-ticker-section {
        padding: 1.6rem 0 0.4rem 0;
    }

    .fantasy-leaderboard-section {
        padding: 0.5rem 0 1.5rem 0;
    }

    .leaderboard-card:hover {
        transform: translateY(-8px);
    }

    .login-card:hover {
        transform: translateY(-8px);
    }
}

/* Landscape Orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .fantasy-leaderboard-section {
        padding: 0.5rem 0 1rem 0;
    }
    
    .fantasy-ticker-section {
        padding: 1rem 0 0.5rem 0;
    }

    .section-title {
        margin-bottom: 0.75rem;
    }

    .card-body {
        max-height: 250px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .leaderboard-card,
    .login-card {
        box-shadow: var(--box-shadow);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .leaderboard-card,
    .login-card,
    .btn,
    .rank,
    .leaderboard-item,
    .hero-logo,
    .btn-hero {
        animation: none;
        transition: none;
    }

    .ticker {
        animation: none;
    }

    .btn-hero:hover,
    .btn-hero-outline:hover,
    .btn-hero-primary:hover {
        transform: none;
    }
}

/* Profile Card Header */
.pc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    gap: 0.75rem;
}

.pc-header-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.pc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0;
    backdrop-filter: blur(4px);
}

.pc-header-text {
    min-width: 0;
}

.pc-greeting {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.pc-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.pc-pw-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.pc-pw-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.pc-pw-btn i {
    font-size: 0.7rem;
    opacity: 0.85;
}

@media (max-width: 400px) {
    .pc-pw-btn span { display: none; }
    .pc-pw-btn { padding: 0.42rem 0.65rem; }
    .pc-pw-btn i { font-size: 0.85rem; opacity: 1; }
}

/* Profile Section Styles */
.profile-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.profile-body {
    padding: 2rem;
}

.profile-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 767px) {
    .profile-two-col {
        grid-template-columns: 1fr;
    }
}

.profile-info {
    margin-bottom: 1.5rem;
}

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

.info-row:last-of-type {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-color);
}

.info-value {
    color: var(--title-color);
    text-align: right;
}

.favorites-section {
    margin-top: 2rem;
}

.favorites-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--title-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gradient-color);
    padding-bottom: 0.5rem;
}

.favorites-grid {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.favorite-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.favorite-icon:hover {
    transform: scale(1.1);
}

.favorite-icon img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
    padding: 4px;
}

/* Achievements Section */
.achievements-section {
    margin-top: 2rem;
}

/* Profile card no-trophy state */
.pc-no-trophies {
    text-align: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #2d2d2d 0%, #252525 100%);
    border-radius: 8px;
    border: 2px dashed #404040;
}
[data-theme="light"] .pc-no-trophies {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #ced4da;
}
.pc-no-trophy-icon { font-size: 2rem; margin-bottom: 0.4rem; opacity: 0.35; }
.pc-no-trophy-text {
    margin: 0;
    font-size: 0.88rem;
    color: #888;
    font-style: italic;
    font-weight: 500;
}
[data-theme="light"] .pc-no-trophy-text { color: #6c757d; }

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.achievement-card {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe8cc 100%);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 0.65rem 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .achievement-card {
    background: linear-gradient(135deg, #3d3d1f 0%, #2d2d1a 100%);
    border-color: #664400;
    box-shadow: 0 4px 8px rgba(255, 168, 0, 0.15);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.achievement-card:hover::before {
    left: 100%;
}

.achievement-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.4);
}

.achievement-icon {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.achievement-details {
    position: relative;
    z-index: 1;
}

.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.15rem 0.4rem;
    border-radius: 20px;
    margin-bottom: 0.3rem;
    font-size: 0.62rem;
    font-weight: bold;
}

[data-theme="dark"] .achievement-badge {
    background: rgba(0, 0, 0, 0.3);
}

.achievement-sport {
    color: var(--text-color);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

[data-theme="dark"] .achievement-title {
    color: #e6d5a8;
}

.achievement-subtitle {
    font-size: 0.62rem;
    font-weight: 600;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-achievements {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 1rem;
}

[data-theme="dark"] .no-achievements {
    background: #252525;
}

.no-achievements i {
    display: block;
    margin: 0 auto 1rem;
}

/* Responsive achievements */
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .achievement-card {
        padding: 0.5rem 0.35rem;
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .achievement-title {
        font-size: 0.9rem;
    }
}

/* Match Predictions Section */
.predictions-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.match-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 4px solid #5a67d8;
}

.match-card:hover:not(.match-locked) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-color);
}

.match-card.match-locked {
    opacity: 0.85;
    border-left-color: #ccc;
    background-color: #f9f9f9;
}

[data-theme="dark"] .match-card.match-locked {
    border-left-color: #555;
    background-color: #1f1f1f;
}

.match-card.match-today {
    border-left: 4px solid #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.07) 0%, var(--card-background) 50%);
    box-shadow: 0 0 0 1.5px rgba(34, 197, 94, 0.3), 0 6px 24px rgba(34, 197, 94, 0.12);
    animation: today-glow 3s ease-in-out infinite;
}

.match-card.match-today:hover:not(.match-locked) {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.45), 0 8px 28px rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .match-card.match-today {
    border-left-color: #4ade80;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, var(--card-background) 50%);
    box-shadow: 0 0 0 1.5px rgba(74, 222, 128, 0.35), 0 6px 24px rgba(74, 222, 128, 0.15);
}

@keyframes today-glow {
    0%, 100% { box-shadow: 0 0 0 1.5px rgba(34, 197, 94, 0.3), 0 6px 24px rgba(34, 197, 94, 0.12); }
    50%       { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.55), 0 6px 28px rgba(34, 197, 94, 0.22); }
}

.today-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    background: #22c55e;
    color: #fff;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.today-badge .fa-circle {
    font-size: 0.45em;
    animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

[data-theme="dark"] .today-badge {
    background: #16a34a;
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.35);
}

.match-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.6rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.match-header .sport-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.match-header .sport-badge-football {
    background-color: #d4edda;
    color: #155724;
}

.match-header .sport-badge-cricket {
    background-color: #fff3cd;
    color: #856404;
}

[data-theme="dark"] .match-header .sport-badge-football {
    background-color: #1e5631;
    color: #90ee90;
}

[data-theme="dark"] .match-header .sport-badge-cricket {
    background-color: #4d4d1a;
    color: #ffd700;
}

.derby-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    background: rgba(255, 107, 107, 0.3);
    color: white;
    width: fit-content;
    animation: pulse-glow 2s ease-in-out infinite;
}

[data-theme="dark"] .derby-badge {
    background: rgba(255, 107, 107, 0.4);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
    }
}

.derby-name-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    justify-content: center;
}

.match-date-time,
.match-venue,
.match-competition {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.match-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    white-space: nowrap;
}

.match-status.locked {
    background: #ff5252;
    padding: 0.3rem 0.6rem;
}

.match-status.result-available {
    background: #22c55e;
    padding: 0.3rem 0.6rem;
}

.match-result-panel {
    margin: 0.75rem 0 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    text-align: center;
}

[data-theme="dark"] .match-result-panel {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.25);
}

.result-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #22c55e;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .result-label {
    color: #4ade80;
}

.result-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.result-scoreline {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--heading-color);
    letter-spacing: 0.05em;
    padding: 0 0.3rem;
}

.result-team {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.result-winner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.result-team-winner {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--heading-color);
}

.result-won-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #22c55e;
}

[data-theme="dark"] .result-won-label {
    color: #4ade80;
}

.result-abandoned {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.result-bonus {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.result-bonus-label {
    color: var(--text-color);
    opacity: 0.7;
}

.result-bonus-value {
    font-weight: 700;
    color: var(--heading-color);
}

.match-body {
    padding: 0.85rem;
}

.match-teams {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 0.85rem;
    gap: 0.5rem;
}

.team {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}


.odds-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(255, 193, 7, 0.15);
    color: #b8860b;
    border: 1px solid rgba(255, 193, 7, 0.35);
    cursor: default;
    letter-spacing: 0.02em;
}

[data-theme="dark"] .odds-badge {
    background: rgba(255, 210, 63, 0.12);
    color: #ffd23f;
    border-color: rgba(255, 210, 63, 0.3);
}

.team-emblem {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-theme="dark"] .team-emblem {
    background: #e8e8e8;
    border-color: #ccc;
}

.team-emblem[data-side] {
    transition: box-shadow 0.15s ease, opacity 0.15s ease;
}

.team-emblem.emblem-active {
    box-shadow: 0 0 0 2px var(--primary-color, #536DFE);
    opacity: 1;
}

.match-card:has(.emblem-active) .team-emblem[data-side]:not(.emblem-active) {
    opacity: 0.45;
}

.team-name {
    font-weight: 600;
    color: var(--title-color);
    font-size: 0.82rem;
    line-height: 1.2;
}

.match-divider {
    font-weight: bold;
    color: #999;
    font-size: 0.9rem;
}

[data-theme="dark"] .match-divider {
    color: #777;
}

.prediction-inputs {
    background: #f9f9f9;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.65rem;
}

[data-theme="dark"] .prediction-inputs {
    background: #1f1f1f;
}

.football-prediction {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    align-items: flex-end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.football-prediction .input-group {
    align-items: center;
    flex: 1;
    max-width: 120px;
}

.football-prediction .input-group label {
    text-align: center;
}

.input-group label {
    font-weight: 600;
    font-size: 0.78rem;
    color: #555;
}

[data-theme="dark"] .input-group label {
    color: #b0b0b0;
}

.goal-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1.2rem;
    text-align: center;
    font-weight: bold;
    transition: border-color 0.3s ease;
}

[data-theme="dark"] .goal-input {
    background-color: #2d2d2d;
    border-color: #4a4a4a;
    color: #b0b0b0;
}

.goal-input:focus {
    outline: none;
    border-color: #667eea;
}

.goal-input:disabled {
    background-color: #eee;
    color: #999;
    cursor: not-allowed;
}

[data-theme="dark"] .goal-input:disabled {
    background-color: #1a1a1a;
    color: #666;
}

.vs-text {
    font-weight: bold;
    color: #999;
    font-size: 1rem;
    padding-bottom: 0.5rem;
}

[data-theme="dark"] .vs-text {
    color: #777;
}

.cricket-prediction {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.winner-selection {
    width: 100%;
}

.winner-select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
}

[data-theme="dark"] .winner-select {
    background-color: #2d2d2d;
    border-color: #4a4a4a;
    color: #b0b0b0;
}

.winner-select:focus {
    outline: none;
    border-color: #667eea;
}

.winner-select:disabled {
    background-color: #eee;
    color: #999;
    cursor: not-allowed;
}

[data-theme="dark"] .winner-select:disabled {
    background-color: #1a1a1a;
    color: #666;
}

.bonus-question {
    width: 100%;
}

.bonus-input {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
}

[data-theme="dark"] .bonus-input {
    background-color: #2d2d2d;
    border-color: #4a4a4a;
    color: #b0b0b0;
}

.bonus-input:focus {
    outline: none;
    border-color: #667eea;
}

.bonus-input:disabled {
    background-color: #eee;
    color: #999;
    cursor: not-allowed;
}

[data-theme="dark"] .bonus-input:disabled {
    background-color: #1a1a1a;
    color: #666;
}

.save-prediction {
    width: 100%;
    background: var(--gradient-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none; /* Hidden - using floating button instead */
}

/* Floating Save Button */
.floating-save-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.floating-save-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}

.floating-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.6);
}

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

.floating-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.floating-save-btn i {
    font-size: 18px;
}

/* Dirty state — pulses to signal unsaved changes */
@keyframes save-pulse {
    0%   { box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4); transform: scale(1); }
    50%  { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); transform: scale(1.06); }
    100% { box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4); transform: scale(1); }
}

.floating-save-btn.has-unsaved {
    animation: save-pulse 1.6s ease-in-out infinite;
}

.floating-save-btn.has-unsaved::after {
    content: 'Unsaved changes';
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-save-btn.has-unsaved:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.save-status {
    background: var(--card-background);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-sm);
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.save-status.success {
    color: #155724;
    border-left: 4px solid #28a745;
    background: #d4edda;
}

.save-status.error {
    color: #721c24;
    border-left: 4px solid #dc3545;
    background: #f8d7da;
}

.save-status i {
    margin-right: 8px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design for Predictions */
@media (max-width: 768px) {
    .predictions-container {
        grid-template-columns: 1fr;
    }

    .match-teams {
        gap: 0.5rem;
    }

    .team-emblem {
        width: 40px;
        height: 40px;
    }

    .team-name {
        font-size: 0.8rem;
    }

    .match-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .football-prediction {
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
    }

    .football-prediction .input-group {
        max-width: 80px;
    }

    .goal-input {
        width: 100%;
        font-size: 1rem;
    }

    /* Floating button responsive */
    .floating-save-btn {
        padding: 20px 22px;
        border-radius: 50%;
        font-size: 20px;
    }

    .save-text {
        display: none;
    }

    .floating-save-container {
        bottom: 80px;
        right: 20px;
    }
}

.pin-digit {
    width: 50px;
    height: 54px;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--table-border);
    border-radius: 10px;
    padding: 0;
    background: var(--card-background);
    color: var(--title-color);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.pin-digit:focus {
    border-color: #536DFE;
    box-shadow: 0 0 0 3px rgba(83,109,254,0.18);
    outline: none;
}

.pin-digit.pin-filled {
    animation: pin-pop 0.22s ease;
    border-color: #536DFE;
}

.pin-digit::placeholder {
    color: var(--table-border);
    font-size: 20px;
    letter-spacing: normal;
}

[data-theme="dark"] .pin-digit {
    background: var(--card-background-secondary);
    border-color: var(--table-border);
    color: var(--title-color);
}

[data-theme="dark"] .pin-digit:focus {
    border-color: #7c8cff;
    box-shadow: 0 0 0 3px rgba(124, 140, 255, 0.2);
}

/* ========================================
   PERSONALIZED TIMELINE TABLE STYLES
   ======================================== */

/* Timeline Header */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2.5rem 0 1.5rem;
}

.timeline-title {
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 800;
    color: var(--title-color);
    margin-bottom: 0.3rem;
    letter-spacing: -0.4px;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.timeline-subtitle {
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.52;
    font-weight: 500;
    line-height: 1.55;
    margin-left: 50px;
}

.timeline-stats-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.timeline-total-score {
    text-align: center;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    min-width: 130px;
}

.timeline-total-score.cricket {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.12), rgba(255, 152, 0, 0.12));
    border: 2px solid rgba(255, 152, 0, 0.35);
}

.timeline-total-score.football {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.12), rgba(0, 128, 0, 0.12));
    border: 2px solid rgba(40, 167, 69, 0.35);
}

.total-score-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.total-score-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.total-score-value.cricket {
    color: #e67e00;
}

[data-theme="dark"] .total-score-value.cricket {
    color: #ffc107;
}

.total-score-value.football {
    color: #28a745;
}

[data-theme="dark"] .total-score-value.football {
    color: #4cd964;
}

.total-score-position {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.7;
}

.position-total {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .timeline-header {
        flex-direction: column;
        text-align: left;
        gap: 1.5rem;
    }

    .timeline-stats-container {
        flex-direction: column;
        width: 100%;
    }

    .timeline-total-score {
        width: 100%;
    }
}

/* Empty State */
.timeline-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow-sm);
}

.timeline-empty-state i {
    font-size: 3rem;
    color: var(--text-color);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.timeline-empty-state h3 {
    font-size: 1.25rem;
    color: var(--title-color);
    margin-bottom: 0.5rem;
}

.timeline-empty-state p {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.95rem;
}

/* Excel-like Table Container */
.timeline-table-container {
    background: var(--card-background);
    border-radius: 6px;
    box-shadow: 0 1px 3px var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--table-border);
}

/* Timeline Table */
.timeline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: fixed;
}

/* Table Header */
.timeline-table thead {
    background: var(--table-header-bg);
    border-bottom: 2px solid var(--table-border);
}

.timeline-table thead th {
    padding: 0.65rem 0.5rem;
    text-align: center;
    font-weight: 700;
    color: var(--title-color);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    border-right: 1px solid var(--table-border);
    white-space: nowrap;
}

.timeline-table thead th:last-child {
    border-right: none;
}

/* Column Widths */
.timeline-table thead th:nth-child(1) { width: 4%; }  /* Status */
.timeline-table thead th:nth-child(2) { width: 10%; } /* Date */
.timeline-table thead th:nth-child(3) { width: 4%; }  /* Sport */
.timeline-table thead th:nth-child(4) { width: 20%; } /* Match */
.timeline-table thead th:nth-child(5) { width: 8%; } /* Prediction */
.timeline-table thead th:nth-child(6) { width: 20%; } /* Bonus */
.timeline-table thead th:nth-child(7) { width: 15%; } /* Result */
.timeline-table thead th:nth-child(8) { width: 4%; }  /* Pts */
.timeline-table thead th:nth-child(9) { width: 5%; }  /* Action */

/* Table Body */
.timeline-table tbody tr {
    border-bottom: 1px solid var(--table-border);
    transition: background-color 0.15s ease;
    background-color: var(--card-background);
}

.timeline-table tbody tr:hover {
    background-color: var(--hover-background);
}

.timeline-table tbody tr.past-match {
    background-color: var(--card-background);
    opacity: 0.9;
}

.timeline-table tbody tr.future-match {
    background-color: var(--card-background);
}

.timeline-table tbody tr.no-prediction {
    opacity: 0.6;
}

.timeline-row-hidden {
    display: none;
}

.timeline-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.5rem;
}

.timeline-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
    border: 1px solid rgba(139,92,246,0.4);
    border-radius: 999px;
    color: #a78bfa;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 0 0 0 rgba(139,92,246,0);
}

.timeline-load-more-btn::before {
    content: '↕';
    font-size: 0.85rem;
    opacity: 0.8;
}

.timeline-load-more-btn:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.28), rgba(139,92,246,0.28));
    border-color: rgba(139,92,246,0.7);
    color: #c4b5fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139,92,246,0.2);
}

.timeline-load-more-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.timeline-load-more-count {
    opacity: 0.7;
    font-size: 0.75rem;
    font-weight: 400;
}

.timeline-table tbody td {
    padding: 0.5rem 0.4rem;
    vertical-align: middle;
    border-right: 1px solid var(--table-border);
    color: var(--text-color);
    text-align: center;
}

.timeline-table tbody td:last-child {
    border-right: none;
}

/* Status Column */
.td-status {
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

[data-theme="dark"] .status-badge.completed {
    background: #1e5631;
    color: #90ee90;
}

.status-badge.upcoming {
    background: #fff3cd;
    color: #856404;
}

[data-theme="dark"] .status-badge.upcoming {
    background: #4d4d1a;
    color: #ffd700;
}

/* DateTime Column */
.td-datetime {
    font-size: 0.8rem;
}

.datetime-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.datetime-wrapper .date {
    font-weight: 600;
    color: var(--title-color);
}

.datetime-wrapper .time {
    color: var(--text-color);
    opacity: 0.9;
    font-size: 0.75rem;
}

/* Sport Column */
.td-sport {
    text-align: center;
    vertical-align: middle;
    width: 36px;
    min-width: 36px;
    padding-left: 6px;
    padding-right: 6px;
}

.td-sport .sport-badge {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    width: 24px;
    height: 24px;
    margin: 0 auto;
}

/* Match Column */
.td-match {
    font-size: 0.85rem;
}

.match-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.team-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.team-short {
    font-weight: 600;
    color: var(--title-color);
}

.team-logo-tiny {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

.vs-inline {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0 0.25rem;
}

/* Prediction & Bonus Columns */
.td-prediction,
.td-bonus {
    font-size: 0.85rem;
}

.td-bonus .bonus-chip {
    width: 100%;
    box-sizing: border-box;
}

.td-bonus .bonus-chip-answer {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pred-text {
    font-weight: 600;
    color: var(--title-color);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pred-text.score {
    font-weight: 700;
    color: #667eea;
    font-size: 0.95rem;
}

.pred-text.correct {
    color: #28a745;
    background: #d4edda;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.pred-text.incorrect {
    color: #dc3545;
    background: #f8d7da;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.pred-empty {
    color: var(--text-color);
    opacity: 0.5;
    font-style: italic;
    font-size: 0.8rem;
}

/* Result Column */
.td-result {
    text-align: center;
}

.result-icon {
    font-size: 1.1rem;
}

.result-icon.correct {
    color: #28a745;
}

.result-icon.incorrect {
    color: #dc3545;
}

/* Points Column */
.td-points {
    text-align: center;
    font-weight: 700;
    color: #667eea;
}

.points-value {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #e7eeff;
    border-radius: 4px;
    font-size: 0.9rem;
}

[data-theme="dark"] .points-value {
    background: #1a2d5a;
    color: #7c8cff;
}

/* Action Column */
.td-action {
    text-align: center;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #f8f9fa;
    color: #667eea;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-edit:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}


.btn-edit i {
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .timeline-table {
        font-size: 0.8rem;
    }
    
    .timeline-table thead th {
        padding: 0.5rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .timeline-table tbody td {
        padding: 0.5rem 0.5rem;
    }
}

/* Desktop: hide mobile-only elements */
.match-meta-mobile          { display: none; }
.match-pred-mobile          { display: none; }
.match-teams-row            { display: contents; } /* transparent on desktop */
.match-inline-meta          { display: none; }     /* teams in meta row — mobile only */
.pred-pill-mobile           { display: none; }
.bonus-chip-mobile          { display: none; }
.btn-edit-mobile            { display: none; }
.btn-edit-pts-mobile        { display: none; }     /* edit in pts cell — mobile only */
.td-points-desktop-dash     { display: inline; }   /* "—" shown on desktop */
.match-inline-desktop       { display: flex; }     /* shown on desktop */

@media (max-width: 768px) {
    .timeline-table-container {
        overflow-x: visible;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .timeline-table         { display: block; width: 100%; }
    .timeline-table thead   { display: none; }
    .timeline-table tbody   { display: block; }

    /* Each row = one flex line: [status] [match-cell] [pts] */
    .timeline-table tbody tr {
        display: flex !important;
        align-items: center;
        gap: 8px;
        background: var(--card-background);
        border: 1px solid var(--table-border);
        border-radius: 8px;
        margin-bottom: 6px;
        padding: 7px 10px;
    }

    .timeline-table tbody td {
        display: flex !important;
        align-items: center;
        padding: 0;
        border: none;
        text-align: left;
        vertical-align: unset;
    }

    /* Hide all separate columns — everything lives inside td-match now */
    .timeline-table tbody td.td-datetime,
    .timeline-table tbody td.td-sport,
    .timeline-table tbody td.td-prediction,
    .timeline-table tbody td.td-bonus,
    .timeline-table tbody td.td-result,
    .timeline-table tbody td.td-action {
        display: none !important;
    }

    /* Status icon */
    .timeline-table tbody td.td-status { flex: 0 0 auto; }

    /* Match cell — grows, stacks vertically */
    .timeline-table tbody td.td-match {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        font-size: 0.82rem;
    }

    /* Points — right edge */
    .timeline-table tbody td.td-points {
        flex: 0 0 auto;
        font-size: 0.82rem;
        font-weight: 700;
        white-space: nowrap;
        justify-content: flex-end;
        min-width: 28px;
    }

    /* Row 1: sport emoji + date + teams all on one dim line */
    .match-meta-mobile {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.72rem;
        opacity: 0.7;
        white-space: nowrap;
        overflow: hidden;
        width: 100%;
    }

    .sport-emoji-mobile  { font-size: 0.75rem; flex-shrink: 0; }
    .match-date-short    { flex-shrink: 0; }
    .meta-sep            { opacity: 0.4; flex-shrink: 0; }

    /* Teams inside meta row (mobile only) */
    .match-inline-meta {
        display: flex;
        align-items: center;
        gap: 3px;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }

    /* Hide desktop-only teams row on mobile */
    .match-inline-desktop { display: none !important; }

    /* Row 2 wrapper */
    .match-teams-row {
        display: flex !important;
        align-items: center;
        width: 100%;
        min-width: 0;
    }

    /* All match-inline (used inside meta) */
    .match-inline {
        gap: 3px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }

    .team-short     { font-size: 0.78rem; white-space: nowrap; font-weight: 600; }
    .team-logo-tiny { width: 14px; height: 14px; }
    .vs-inline      { font-size: 0.58rem; margin: 0 1px; opacity: 0.4; }

    /* Row 2: pred pill + bonus chip */
    .match-pred-mobile {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1 1 0;
        min-width: 0;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    /* Winner/score pill */
    .pred-pill-mobile {
        display: inline-flex;
        align-items: center;
        font-size: 0.75rem;
        font-weight: 600;
        padding: 3px 9px;
        border-radius: 5px;
        background: rgba(99,102,241,0.15);
        color: #818cf8;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .pred-pill-mobile.correct   { background: rgba(34,197,94,0.15);  color: #22c55e; }
    .pred-pill-mobile.incorrect { background: rgba(239,68,68,0.12);  color: #f87171; }

    /* Bonus chip on mobile — full remaining width */
    .bonus-chip-mobile {
        display: inline-flex !important;
        font-size: 0.72rem;
        padding: 3px 7px;
        flex: 1 1 0;
        min-width: 0;
        max-width: 100%;
    }

    .bonus-chip-mobile .bonus-chip-answer {
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Edit button in pts cell replaces "—" on mobile */
    .btn-edit-pts-mobile {
        display: inline-flex;
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .td-points-desktop-dash { display: none; }

    .timeline-title { font-size: 1.5rem; }
    .timeline-table tbody tr.no-prediction { opacity: 0.6; }
}

/* HVM Tag Styling - Orange Highlighted Chip */
.hvm-tag {
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    margin-left: 5px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(255, 152, 0, 0.3);
    vertical-align: middle;
    cursor: pointer;
    position: relative;
}

.hvm-tag .hvm-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    pointer-events: none;
    z-index: 9999;
    width: max-content;
}

.hvm-tag .hvm-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.hvm-tag.hvm-open .hvm-tooltip {
    display: block;
}

[data-theme="dark"] .hvm-tag {
    background: #ff9800;
    color: #000;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.4);
}

/* Bonus chips — base matches pred-text exactly */
.bonus-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
    max-width: 100%;
    border: none;
    color: var(--title-color);
    min-height: 26px;
}
.bonus-chip-icon {
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}
.bonus-chip-svg {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}
.bonus-chip-answer {
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bonus-chip.correct {
    background: #d4edda;
    color: #28a745;
}
.bonus-chip.incorrect {
    background: #f8d7da;
    color: #dc3545;
}
[data-theme="dark"] .bonus-chip.correct {
    background: rgba(40, 167, 69, 0.2);
    color: #81c784;
}
[data-theme="dark"] .bonus-chip.incorrect {
    background: rgba(220, 53, 69, 0.2);
    color: #ef9a9a;
}

/* HVM row animation */
@keyframes hvm-border-pulse {
    0%, 100% { border-left-color: #ff9800; }
    50%       { border-left-color: #ffe082; }
}

@keyframes hvm-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.timeline-table tbody tr.hvm-row {
    border-left: 3px solid #ff9800;
    animation: hvm-border-pulse 2s ease-in-out infinite;
    background: linear-gradient(
        90deg,
        var(--card-background) 0%,
        rgba(255, 152, 0, 0.07) 50%,
        var(--card-background) 100%
    ) !important;
    background-size: 200% auto !important;
    animation: hvm-border-pulse 2s ease-in-out infinite,
               hvm-shimmer 3s linear infinite;
}

.timeline-table tbody tr.hvm-row:hover {
    background: linear-gradient(
        90deg,
        var(--hover-background) 0%,
        rgba(255, 152, 0, 0.12) 50%,
        var(--hover-background) 100%
    ) !important;
    background-size: 200% auto !important;
}

[data-theme="dark"] .timeline-table tbody tr.hvm-row {
    background: linear-gradient(
        90deg,
        var(--card-background) 0%,
        rgba(255, 152, 0, 0.1) 50%,
        var(--card-background) 100%
    ) !important;
    background-size: 200% auto !important;
}

/* ─── Tournament Bonus Questions ─────────────────────────────────────────── */

.bonus-questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}


.bonus-question-card {
    border-radius: 12px;
    background: var(--card-background, #fff);
    box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 0 0 1px var(--border-color, #e2e8f0);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}

.bonus-question-card:hover {
    box-shadow: 0 4px 16px rgba(102,126,234,0.12), 0 0 0 1px #c7d2fe;
    transform: translateY(-1px);
}

.bonus-question-card.bq-unlocked .bq-header {
    border-bottom: 2px solid #667eea;
}

.bonus-question-card.bq-locked .bq-header {
    border-bottom: 2px solid #cbd5e1;
}

.bq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 11px 14px 10px;
    background: linear-gradient(135deg, rgba(102,126,234,0.06) 0%, rgba(139,92,246,0.04) 100%);
    flex-wrap: wrap;
}

[data-theme="dark"] .bq-header {
    background: linear-gradient(135deg, rgba(102,126,234,0.12) 0%, rgba(139,92,246,0.08) 100%);
}

.bq-question-text {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--title-color, #1a202c);
    flex: 1;
    line-height: 1.4;
}

.bq-meta {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.bq-answer-area {
    padding: 12px 14px 14px;
}

.bq-lock-badge {
    font-size: 11px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    padding: 2px 7px;
}

[data-theme="dark"] .bq-lock-badge {
    background: #2d3748;
    color: #94a3b8;
}

.bq-cutoff-badge {
    font-size: 11px;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 4px;
    padding: 2px 7px;
}

[data-theme="dark"] .bq-cutoff-badge {
    background: #1e3a5f;
    color: #93c5fd;
}

.bq-points-badge {
    font-size: 11px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    padding: 2px 7px;
    font-weight: 600;
}

[data-theme="dark"] .bq-points-badge {
    background: #3b2a0a;
    color: #fcd34d;
}

/* bq-answer-area defined above with padding */

.bq-locked-answer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
}

.bq-answer-value {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f8fafc;
}

[data-theme="dark"] .bq-answer-value {
    background: #2d3748;
}

.bq-answer-value.bq-correct {
    background: #dcfce7;
    color: #15803d;
}

[data-theme="dark"] .bq-answer-value.bq-correct {
    background: #14532d;
    color: #86efac;
}

.bq-answer-value.bq-wrong {
    background: #fee2e2;
    color: #b91c1c;
}

[data-theme="dark"] .bq-answer-value.bq-wrong {
    background: #450a0a;
    color: #fca5a5;
}

.bq-points-earned {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    background: #d1fae5;
    border-radius: 4px;
    padding: 2px 7px;
}

[data-theme="dark"] .bq-points-earned {
    background: #064e3b;
    color: #6ee7b7;
}

.bq-correct-answer {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

.bq-no-answer {
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
}

.bq-yesno-group {
    display: flex;
    gap: 10px;
}

.bq-radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    padding: 7px 22px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color, #e2e8f0);
    background: var(--card-background, #fff);
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.bq-radio-label:has(input:checked) {
    border-color: #667eea;
    background: #eef2ff;
    color: #4338ca;
}

[data-theme="dark"] .bq-radio-label {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .bq-radio-label:has(input:checked) {
    border-color: #818cf8;
    background: #1e2f5a;
    color: #a5b4fc;
}

.bq-radio-label input[type="radio"] {
    display: none;
}

/* ── Team option tiles (team-select & multi-team) ── */

.bq-team-select-grid,
.bq-multiteam-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.bq-team-option {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 7px 10px 6px;
    border-radius: 9px;
    border: 1.5px solid var(--border-color, #e2e8f0);
    background: var(--card-background, #fff);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    min-width: 60px;
    text-align: center;
    user-select: none;
    position: relative;
}

.bq-team-option input[type="radio"],
.bq-team-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.bq-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.bq-team-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-color, #374151);
    line-height: 1.2;
}

.bq-team-option.selected,
.bq-team-option:has(input:checked) {
    border-color: #667eea;
    background: #eef2ff;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.2);
}

.bq-team-option.selected .bq-team-name,
.bq-team-option:has(input:checked) .bq-team-name {
    color: #4338ca;
}

[data-theme="dark"] .bq-team-option {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .bq-team-option .bq-team-name {
    color: #e2e8f0;
}

[data-theme="dark"] .bq-team-option.selected,
[data-theme="dark"] .bq-team-option:has(input:checked) {
    border-color: #818cf8;
    background: #1e2f5a;
    box-shadow: 0 0 0 2px rgba(129,140,248,0.25);
}

[data-theme="dark"] .bq-team-option.selected .bq-team-name,
[data-theme="dark"] .bq-team-option:has(input:checked) .bq-team-name {
    color: #a5b4fc;
}

.bq-picks-hint {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 7px;
    font-style: italic;
}

/* ── Player pre-filter ── */

.bq-player-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bq-team-filter {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-background, #fff);
    color: var(--text-color, #374151);
    cursor: pointer;
    max-width: 200px;
}

[data-theme="dark"] .bq-team-filter {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

.bq-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #fff;
    background: linear-gradient(135deg, #536DFE 0%, #448AFF 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(83, 109, 254, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    position: relative;
    overflow: hidden;
}

.bq-save-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.15s ease;
    border-radius: inherit;
}

.bq-save-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(83, 109, 254, 0.55);
}

.bq-save-btn:hover:not(:disabled)::after {
    background: rgba(255,255,255,0.08);
}

.bq-save-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(83, 109, 254, 0.4);
}

.bq-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Admin Bonus Questions Editor ────────────────────────────────── */

/* Fix Bootstrap's fixed height clipping select text */
.bq-tournament-select,
#bonusQsEditor select.form-control,
.bq-admin-card select.form-control {
    height: auto !important;
    padding: 8px 12px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    appearance: auto;
    -webkit-appearance: auto;
}

.bq-tournament-select {
    max-width: 400px;
}

.bq-admin-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--card-bg);
}

.bq-admin-card .form-control {
    font-size: 15px;
    height: auto;
    padding: 8px 12px;
}

.bq-field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-color);
    opacity: 0.55;
    margin-bottom: 4px;
}

/* Responsive: stack to two columns on small screens */
@media (max-width: 640px) {
    .bq-admin-card > div {
        grid-template-columns: 1fr 1fr !important;
    }
    .bq-admin-card > div > div:first-child {
        grid-column: 1 / -1;
    }
}
/* ── Loyalty Dashboard ── */
.loyalty-you-tag {
    display: inline-block;
    margin-left: 5px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-radius: 4px;
    padding: 1px 5px;
    text-transform: uppercase;
}
.loyalty-item .player-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.loyalty-item-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.loyalty-item-meta {
    font-size: 11px;
    color: var(--text-color-secondary);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loyalty-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.loyalty-item-pct {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 700;
    color: #667eea;
}
.loyalty-item-picked {
    font-size: 11px;
    color: var(--text-color-secondary);
    font-weight: 400;
}
