:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --background-color: #f1f5f9;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    transition: transform 0.3s var(--smooth);
    padding: 1rem 2rem;
    box-shadow: var(--card-shadow);
    width: 100%;
}

.header.header-hidden {
    transform: translateY(-100%);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

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

.logo-container i {
    font-size: 2rem;
    color: var(--primary-color);
    animation: bounce 2s var(--bounce) infinite;
}

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

.header h1 {
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 600;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: var(--background-color);
    border-radius: 2rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    transition: var(--transition);
}

.status-dot.healthy {
    background-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

section {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    opacity: 1;
    transform: none;
    transition: opacity 0.3s var(--smooth), transform 0.3s var(--smooth);
}

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

.section-header h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.games-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin: 1rem auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.games-slider-container {
    position: relative;
    width: 100%;
    padding: 1rem 0;
    margin-top: 2rem;
}

.games-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.games-slider::-webkit-scrollbar {
    display: none;
}

.games-filters {
    margin-bottom: 1.5rem;
}

.filter-group {
    margin-bottom: 1rem;
}

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

.games-dates {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.games-dates::-webkit-scrollbar {
    display: none;
}

.date-nav {
    padding: 0.5rem;
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-nav:hover {
    color: var(--primary-color);
}

.date-chips {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem;
}

.date-chip {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.date-chip:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

.date-chip.active {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    background: none;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .games-section {
        margin: 0.5rem;
        padding: 1rem;
    }

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

    .section-header h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .games-container {
        margin-top: 1rem;
    }

    .games-filters {
        margin-bottom: 1rem;
    }

    .games-dates {
        margin-bottom: 1rem;
        padding: 0.75rem 0;
    }
}

.filters {
    display: flex;
    gap: 1rem;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    pointer-events: none;
}

.select-input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    min-width: 200px;
    background-color: white;
    color: var(--text-color);
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.select-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    margin: 0;
}

.games-slider-container {
    position: relative;
    width: 100%;
    padding: 1rem 0;
    margin-top: 2rem;
}

.games-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.games-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.slider-nav.prev {
    left: -20px;
}

.slider-nav.next {
    right: -20px;
}

.game-card {
    flex: 0 0 320px;
    position: relative;
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 220px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: visible;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.game-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, white, rgba(37, 99, 235, 0.05));
}

.game-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
    white-space: nowrap;
}

.game-status.upcoming {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.game-status.live {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    animation: pulse 2s infinite;
}

.game-status.final {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.game-teams {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    padding: 0 1rem;
}

.team-info {
    flex: 1;
    text-align: center;
    overflow: visible;
}

.team-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    color: var(--text-color);
    max-width: 100%;
    display: block;
}

.team-record {
    font-size: 0.85rem;
    color: var(--text-light);
}

.vs-divider {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.game-score {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 0.25rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* -----------------------------------------------------
   Enhanced Game Card Details Style
----------------------------------------------------- */
.game-details {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08));
    border-top: 2px solid var(--primary-color);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.game-details .game-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Remove bottom margin for the last info line */
.game-details .game-info:last-child {
    margin-bottom: 0;
}

/* Hover state for improved interactivity */
.game-card:hover .game-details {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.1));
    border-top: 2px solid var(--primary-hover);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.game-info i {
    color: var(--primary-color);
    font-size: 1rem;
}

.game-card:hover .game-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* Load More Card Styles */
.load-more-card {
    background: white;
    border: 2px dashed var(--border-color);
    justify-content: center;
    align-items: center;
    min-height: 200px;
    cursor: pointer;
}

.load-more-card:hover {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, white, rgba(37, 99, 235, 0.05));
    transform: translateY(-4px);
}

.load-more-card::before {
    display: none;
}

.load-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.load-more-btn i {
    font-size: 2rem;
    transition: transform 0.2s ease;
}

.load-more-card:hover .load-more-btn i {
    transform: scale(1.1);
}

.game-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.game-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.game-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
    white-space: nowrap;
}

.game-teams {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    padding-right: 80px; /* Add space for status */
}

.team-info {
    flex: 1;
    text-align: center;
    min-width: 0; /* Allow text to wrap */
}

.team-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.team-record {
    font-size: 0.8rem;
    color: var(--text-light);
}

.vs-divider {
    color: var(--text-light);
    font-size: 0.9rem;
    flex-shrink: 0;
    padding: 0 0.5rem;
}

.game-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.game-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.game-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.games-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-number {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 2.5rem;
    font-family: 'Poppins', sans-serif;
}

.page-number:hover:not(.active):not(.ellipsis) {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-number.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.page-number.ellipsis {
    border: none;
    cursor: default;
    padding: 0.5rem 0.25rem;
}

.page-number.ellipsis:hover {
    background: none;
    color: var(--text-color);
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

@media (max-width: 768px) {
    .games-section {
        padding: 1rem;
    }

    .games-slider-container {
        margin-top: 1rem;
    }

    .game-card {
        flex: 0 0 260px;
    }

    .slider-nav {
        width: 32px;
        height: 32px;
    }

    .slider-nav.prev {
        left: -16px;
    }

    .slider-nav.next {
        right: -16px;
    }
}

/* Loading skeleton animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.game-card.skeleton {
    pointer-events: none;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

.skeleton-text {
    height: 1rem;
    background: #e0e0e0;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
}

.preferences-form {
    display: grid;
    gap: 2rem;
}

.preference-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preference-group label {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preference-group label i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background-color: var(--background-color);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.custom-checkbox:hover {
    background-color: rgba(37, 99, 235, 0.05);
    border-color: var(--border-color);
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    transform-origin: center;
}

.custom-checkbox input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    animation: checkmark 0.4s var(--bounce) forwards;
}

.custom-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 0.875rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 500;
}

.checkbox-label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.checkbox-label small {
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: normal;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 1rem;
}

.btn-text {
    transition: opacity 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.6s var(--smooth), opacity 0.4s var(--smooth);
}

.btn:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    transition: 0s;
}

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

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.btn-preview {
    background: linear-gradient(45deg, var(--primary-color), #4f46e5);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.btn-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.story-output {
    opacity: 1;
    transform: none;
    transition: opacity 0.3s var(--smooth);
    display: none;
    position: relative;
    z-index: 1;
}

.story-output.hidden {
    display: none;
    opacity: 0;
}

.story-text {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--smooth), transform 0.5s var(--smooth);
    animation: slideIn 0.5s var(--smooth);
}

.story-text.fade-in {
    opacity: 1;
    transform: translateY(0);
}

section.story-output {
    min-height: 200px;
    height: auto;
    overflow: visible;
    opacity: 1;
    transform: none;
}

.story-text:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: slideIn 0.5s var(--smooth);
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

.audio-controls h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-controls h3 i {
    color: var(--primary-color);
}

.audio-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.range-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    padding: 0.5rem 0;
}

.range-value {
    min-width: 3rem;
    text-align: center;
    font-weight: 500;
    color: var(--text-light);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: linear-gradient(
        to right,
        var(--primary-color) var(--range-progress),
        var(--border-color) var(--range-progress)
    );
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
    --range-progress: 0%;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.audio-player {
    margin-top: 1.5rem;
}

audio {
    width: 100%;
    height: 40px;
    margin: 1rem 0;
    border-radius: 0.5rem;
    background-color: var(--background-color);
    transition: var(--transition);
}

audio::-webkit-media-controls-panel {
    background: var(--background-color);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: all 0.2s ease;
}

audio::-webkit-media-controls-play-button:hover,
audio::-webkit-media-controls-mute-button:hover {
    transform: scale(1.1);
}

audio::-webkit-media-controls-timeline,
audio::-webkit-media-controls-volume-slider {
    background: var(--border-color);
    border-radius: 2px;
    height: 4px;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
}

.footer {
    background-color: white;
    padding: 1.5rem;
    box-shadow: 0 -1px 3px var(--shadow-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--text-light);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s var(--smooth);
}

.loader {
    position: relative;
    width: 60px;
    height: 60px;
}

.loader::after,
.loader::before {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

.loader::after {
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    animation-delay: 0.5s;
}

.loader::before {
    width: 80%;
    height: 80%;
    border: 2px solid var(--secondary-color);
    top: 10%;
    left: 10%;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

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

    .select-wrapper {
        width: 100%;
    }

    .select-input {
        width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
    }

    .audio-settings {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header {
        position: relative;
    }

    .game-card:hover {
        transform: translateY(-2px);
    }

    .toast {
        min-width: auto;
        margin: 0 1rem;
        transform: translateY(120%);
    }

    .toast.show {
        transform: translateY(0);
    }

    .form-feedback {
        margin: 1rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .custom-checkbox {
        padding: 0.75rem;
    }

    .preference-group > label {
        font-size: 1rem;
    }
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Add scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    z-index: 1001;
    transition: width 0.1s var(--smooth);
}

/* Toast notifications */
.toast {
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid transparent;
    transform: translateX(120%);
    transition: transform 0.3s var(--smooth);
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

/* Form feedback styles */
.form-feedback {
    background-color: rgba(239, 68, 68, 0.05);
    border: 1px solid var(--error-color);
    padding: 1rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--error-color);
    animation: shake 0.4s var(--bounce);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Enhanced animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-text {
    animation: slideIn 0.5s var(--smooth);
}

.audio-controls {
    animation: slideIn 0.5s var(--smooth);
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

/* Required field indicator */
.select-input[required] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444' width='8' height='8'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2.5rem center;
    background-size: 6px;
}

.select-input[required]:valid {
    background-image: none;
}

/* Enhanced select styling */
.select-wrapper select {
    padding-right: 3rem;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-light);
    pointer-events: none;
}

.preferences-section {
    margin-bottom: 2rem;
}

.preferences-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
    outline: none;
}

.form-control:disabled {
    background: var(--disabled-bg);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-control option {
    padding: 0.5rem;
}

/* Voice settings specific styles */
.voice-settings {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .voice-settings {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Narration Section Styles */
.narration-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn i {
    font-size: 1rem;
}

.tab-btn.active {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
}

.tab-content {
    display: block;
    opacity: 1;
    transition: all 0.3s ease;
}

.tab-content.hidden {
    display: none;
    opacity: 0;
}

.voice-settings, .advanced-settings {
    display: grid;
    gap: 1.5rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.setting-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.setting-value {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: normal;
}

.range-container {
    position: relative;
    padding: 0.5rem 0;
}

.range-ticks {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.8rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.narration-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

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

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.audio-visualizer {
    background: var(--background-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1rem 0;
}

audio {
    width: 100%;
    height: 40px;
    border-radius: 0.5rem;
}

audio::-webkit-media-controls-panel {
    background: var(--background-color);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: all 0.2s ease;
}

audio::-webkit-media-controls-play-button:hover,
audio::-webkit-media-controls-mute-button:hover {
    transform: scale(1.1);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
}

audio::-webkit-media-controls-timeline {
    background: var(--border-color);
    border-radius: 2px;
    height: 4px;
}

audio::-webkit-media-controls-volume-slider {
    background: var(--border-color);
    border-radius: 2px;
    height: 4px;
}

/* Enhanced Voice Selection Styles */
select optgroup {
    font-weight: 600;
    color: var(--text-color);
    padding: 0.5rem 0;
    background: var(--background-color);
}

select optgroup option {
    font-weight: normal;
    padding: 0.75rem;
    color: var(--text-color);
    background: white;
}

select option {
    padding: 0.75rem;
    font-size: 0.95rem;
}

select option:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
}

/* Voice quality indicators */
select optgroup[label*="Premium"] {
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

select optgroup[label*="Studio"] {
    color: #8b5cf6;
    border-bottom: 1px solid var(--border-color);
}

select optgroup[label*="WaveNet"] {
    color: #06b6d4;
    border-bottom: 1px solid var(--border-color);
}

select optgroup[label*="Standard"] {
    color: var(--text-light);
}

/* Enhance form controls for voice settings */
.voice-settings .form-control {
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23475569' width='24' height='24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5rem;
}

.voice-settings .form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232563eb' width='24' height='24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

/* Voice preview button enhancement */
.btn-preview {
    background: linear-gradient(45deg, var(--primary-color), #4f46e5);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.btn-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn-preview:hover::before {
    transform: translateX(100%);
}

/* Loading state enhancement */
.form-control:disabled {
    background-color: var(--background-color);
    cursor: not-allowed;
}

.form-control option:disabled {
    color: var(--text-light);
    font-style: italic;
}

/* Enhanced Game Listing Styles */
.games-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.games-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

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

.filter-group label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
    --range-progress: 0%;
    background: linear-gradient(
        to right,
        var(--primary-color) var(--range-progress),
        var(--border-color) var(--range-progress)
    );
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3);
    border: 2px solid white;
}

input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.3);
    transform: scale(1.2);
}

.story-text {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--smooth), transform 0.5s var(--smooth);
    animation: slideIn 0.5s var(--smooth);
}

audio {
    width: 100%;
    height: 40px;
    margin: 1rem 0;
    border-radius: 0.5rem;
    background-color: var(--background-color);
    transition: var(--transition);
}

audio::-webkit-media-controls-panel {
    background: var(--background-color);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: all 0.2s ease;
}

audio::-webkit-media-controls-play-button:hover,
audio::-webkit-media-controls-mute-button:hover {
    transform: scale(1.1);
}

audio::-webkit-media-controls-timeline,
audio::-webkit-media-controls-volume-slider {
    background: var(--border-color);
    border-radius: 2px;
    height: 4px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    margin: 0;
}

.games-slider-container {
    position: relative;
    width: 100%;
    padding: 1rem 0;
    margin-top: 2rem;
}

.games-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.games-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.slider-nav.prev {
    left: -20px;
}

.slider-nav.next {
    right: -20px;
}

.game-card {
    flex: 0 0 320px;
    position: relative;
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 220px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.game-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, white, rgba(37, 99, 235, 0.05));
}

.game-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
    white-space: nowrap;
}

.game-status.upcoming {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.game-status.live {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    animation: pulse 2s infinite;
}

.game-status.final {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.game-teams {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    padding: 0 1rem;
}

.team-info {
    flex: 1;
    text-align: center;
    overflow: visible;  /* Removed hidden clipping so names can wrap */
}

.team-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    white-space: normal;  /* Allow wrapping for names with three or more words */
    word-break: break-word;
    color: var(--text-color);
}

.team-record {
    font-size: 0.85rem;
    color: var(--text-light);
}

.vs-divider {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.game-score {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 0.25rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* -----------------------------------------------------
   Enhanced Game Card Details Style
----------------------------------------------------- */
.game-details {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08));
    border-top: 2px solid var(--primary-color);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.game-details .game-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Remove bottom margin for the last info line */
.game-details .game-info:last-child {
    margin-bottom: 0;
}

/* Hover state for improved interactivity */
.game-card:hover .game-details {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.1));
    border-top: 2px solid var(--primary-hover);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.game-info i {
    color: var(--primary-color);
    font-size: 1rem;
}

.game-card:hover .game-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* Load More Card Styles */
.load-more-card {
    background: white;
    border: 2px dashed var(--border-color);
    justify-content: center;
    align-items: center;
    min-height: 200px;
    cursor: pointer;
}

.load-more-card:hover {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, white, rgba(37, 99, 235, 0.05));
    transform: translateY(-4px);
}

.load-more-card::before {
    display: none;
}

.load-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.load-more-btn i {
    font-size: 2rem;
    transition: transform 0.2s ease;
}

.load-more-card:hover .load-more-btn i {
    transform: scale(1.1);
}

.game-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.game-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.game-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
    white-space: nowrap;
}

.game-teams {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    padding-right: 80px; /* Add space for status */
}

.game-teams {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    padding: 0 1rem;
}

.team-info {
    flex: 1;
    text-align: center;
    overflow: visible;  /* Removed hidden clipping so names can wrap */
}

.team-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    white-space: normal;  /* Allow wrapping for names with three or more words */
    word-break: break-word;
    color: var(--text-color);
}

.team-record {
    font-size: 0.85rem;
    color: var(--text-light);
}

.vs-divider {
    color: var(--text-light);
    font-size: 0.9rem;
    flex-shrink: 0;
    padding: 0 0.5rem;
}

.game-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.game-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.game-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.games-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-number {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 2.5rem;
    font-family: 'Poppins', sans-serif;
}

.page-number:hover:not(.active):not(.ellipsis) {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-number.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.page-number.ellipsis {
    border: none;
    cursor: default;
    padding: 0.5rem 0.25rem;
}

.page-number.ellipsis:hover {
    background: none;
    color: var(--text-color);
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

@media (max-width: 768px) {
    .games-filters {
        flex-direction: column;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .games-dates {
        padding: 0.5rem;
    }

    .date-chips {
        padding: 0 0.5rem;
    }

    .game-card {
        padding: 1rem;
        min-height: 160px;
    }
}

/* Loading skeleton animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.game-card.skeleton {
    pointer-events: none;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

.skeleton-text {
    height: 1rem;
    background: #e0e0e0;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
}

/* Large screens (1920x1080 and above) */
@media (min-width: 1920px) {
    .games-section {
        padding: 2.5rem;
        max-width: 1800px;
    }
    
    .games-grid {
        grid-template-columns: repeat(4, minmax(300px, 1fr));
        gap: 1.75rem;
        padding: 1.5rem;
    }
}

/* Medium-large screens */
@media (min-width: 1440px) and (max-width: 1919px) {
    .games-section {
        padding: 2rem;
        max-width: 1400px;
    }
    
    .games-grid {
        grid-template-columns: repeat(3, minmax(300px, 1fr));
        gap: 1.5rem;
        padding: 1.25rem;
    }
}

/* Medium screens */
@media (min-width: 1024px) and (max-width: 1439px) {
    .games-section {
        padding: 1.75rem;
        max-width: 1200px;
    }
    
    .games-grid {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
        gap: 1.25rem;
        padding: 1rem;
    }
}

/* Tablet and smaller screens */
@media (max-width: 1023px) {
    .games-section {
        padding: 1.5rem;
        margin: 0.75rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.8rem;
    }

    .header-content {
        padding: 0 0.5rem;
    }

    .main-content {
        padding: 1rem;
    }

    .games-section {
        margin: 0.5rem;
        padding: 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.8rem;
    }

    .filters {
        flex-direction: column;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .games-dates {
        padding: 0.75rem;
    }

    .date-chips {
        padding: 0 0.5rem;
    }
}

/* Game Stats Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: var(--background-color);
    margin: 2rem auto;
    padding: 2rem;
    width: 95%;
    max-width: 1400px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

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

.modal-header h2 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h2 i {
    color: var(--primary-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    transform: rotate(90deg);
}

body.modal-open {
    overflow: hidden;
    padding-right: 15px; /* Prevent layout shift */
}

/* Game Summary */
.game-summary {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.team-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

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

.team-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.team:hover .team-logo {
    transform: scale(1.1);
}

.team h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0;
}

.vs {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
    margin: 0 3rem;
    position: relative;
}

.vs::before, .vs::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 1px;
    background: var(--border-color);
    top: 50%;
}

.vs::before {
    right: calc(100% + 1rem);
}

.vs::after {
    left: calc(100% + 1rem);
}

.score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
}

.game-info {
    display: flex;
    gap: 3rem;
    justify-content: center;
    color: var(--text-light);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 1.1rem;
}

.game-info p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Highlights Section Styles */
.highlights-section {
    margin-top: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.highlights-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.highlights-section h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlights-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

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

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.highlight-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}

.highlight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}


.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.highlight-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.highlight-info {
    padding: 1rem;
}

.highlight-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.highlight-info p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.highlight-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.category-tag {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.category-tag i {
    font-size: 0.9rem;
}

.btn-play {
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background-color 0.2s ease;
}

.btn-play:hover {
    background: var(--primary-color-dark);
}

.no-highlights {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-highlights i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-highlights p {
    margin: 0;
    font-size: 1rem;
}



/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Header adjustments */
    .header {
        padding: 0.8rem;
    }

    .header-content {
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    /* Game filters and search */
    .filters-section {
        padding: 0.8rem;
        flex-direction: column;
        gap: 1rem;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
    }

    .filter-chips {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .chip {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    /* Date navigation */
    .date-navigation {
        padding: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .date-chips-container {
        margin: 0 0.5rem;
    }

    .date-chip {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        min-width: auto;
    }

    /* Games grid */
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.8rem;
    }

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

    .game-teams {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .team-info {
        width: 100%;
    }

    .vs-divider {
        margin: 0.3rem 0;
        font-size: 1rem;
    }

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

    .team-record {
        font-size: 0.9rem;
    }

    .game-details {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
        margin-top: 1rem;
    }

    .game-info {
        font-size: 0.9rem;
        flex: 1 1 auto;
        text-align: center;
        min-width: 45%;
    }

    /* Pagination */
    .pagination {
        padding: 1rem 0.8rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-numbers {
        gap: 0.3rem;
    }

    .page-number {
        min-width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Loading states */
    .loading-overlay {
        padding: 1rem;
    }

    .spinner {
        width: 40px;
        height: 40px;
    }

    /* Toast notifications */
    .toast {
        max-width: 90%;
        margin: 0.5rem;
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    /* No games message */
    .no-games {
        padding: 2rem 1rem;
    }

    .no-games i {
        font-size: 2rem;
    }

    .no-games p {
        font-size: 0.95rem;
    }

    /* Scroll progress */
    .scroll-progress {
        height: 3px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .game-card {
        padding: 0.8rem;
        border-radius: 8px;
    }

    .game-status {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

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

    .game-info {
        font-size: 0.85rem;
        min-width: 100%;
    }

    .pagination {
        justify-content: center;
    }

    .page-numbers {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .prev-page,
    .next-page {
        order: 1;
        flex: 1;
    }
}

/* Landscape mode adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-card {
        height: auto;
    }

    .game-teams {
        flex-direction: row;
    }

    .date-chips-container {
        max-width: 70%;
    }
}

/* Baseball Loader Animation */
.baseball-spinner {
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.baseball {
    font-size: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.5);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-filters {
    display: flex;
    gap: 0.75rem;
}

.select-wrapper.compact {
    min-width: auto;
}

.select-wrapper.compact .select-input {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    min-width: 100px;
    font-size: 0.9rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23475569' width='24' height='24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

.select-wrapper.compact .select-input:hover {
    border-color: var(--primary-color);
}

.select-wrapper.compact .select-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.search-wrapper {
    position: relative;
    width: 250px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem;
    }

    .header-controls {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-wrapper {
        width: 100%;
    }

    .header-filters {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .select-wrapper.compact {
        flex: 1;
        min-width: calc(50% - 0.375rem);
    }

    .select-wrapper.compact .select-input {
        width: 100%;
    }
}

.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding: 1rem;
}

#loadMoreGames {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#loadMoreGames:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

#loadMoreGames i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .load-more-container {
        margin-top: 1.5rem;
        padding: 0.75rem;
    }
    
    #loadMoreGames {
        width: 100%;
        justify-content: center;
    }
}

.load-more-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    background: linear-gradient(to right, var(--background-color), rgba(37, 99, 235, 0.1));
    border: 2px dashed var(--border-color);
    cursor: default;
}

.load-more-card:hover {
    transform: none;
    box-shadow: none;
}

.load-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    transform: scale(1.05);
}

.load-more-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 i {
    color: var(--primary-color);
}

.section-header #takeQuizBtn {
    margin-left: auto;
}



@media (max-width: 768px) {
    .load-more-card {
        min-width: 260px;
    }
    
    .load-more-btn {
        padding: 1rem;
    }
    
    .load-more-btn i {
        font-size: 1.5rem;
    }
} 