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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: #0f0f0f;
    color: #ffffff;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Better touch scrolling on mobile */
    -webkit-overflow-scrolling: touch;
}

/* Prevent scrolling when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Improve focus visibility for accessibility */
*:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    background: #1a1a1a;
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 100;
    cursor: pointer;
}

.header-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.header-filters {
    width: 100%;
}

.header-filters.hidden {
    display: none;
}

.header .filter-bar {
    margin-bottom: 0;
    justify-content: center;
}

.header .filter-select {
    background-color: rgba(255, 255, 255, 0.06);
}

/* Auto-hide header on mobile when scrolling */
@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
    }
    
    .header.hidden {
        transform: translateY(-100%);
    }
}

.header-content h1 {
    font-size: 1.5em;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.countdown {
    margin-top: 10px;
}

.starts-in {
    font-size: 0.75em;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.countdown-days {
    font-size: 2em;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: -0.02em;
}

.tournament-dates {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
    font-weight: 400;
}

/* Compact countdown on mobile for minimalist design */
@media (max-width: 768px) {
    .countdown {
        margin-top: 6px;
    }
    
    .starts-in {
        font-size: 0.7em;
        margin-bottom: 3px;
    }
    
    .tournament-dates {
        font-size: 0.8em;
        margin-top: 3px;
    }
}

@media (min-width: 1024px) {
    .header-inner {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .header-content {
        align-items: flex-start;
        text-align: left;
        width: auto;
    }

    .header-filters {
        width: auto;
    }

    .header .filter-bar {
        justify-content: flex-end;
    }
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

/* Bottom navigation for mobile */
@media (max-width: 768px) {
    .navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(20, 20, 20, 0.98);
        border-top: 1px solid rgba(255, 215, 0, 0.2);
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.8);
        padding: 6px 4px;
        gap: 2px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        animation: slideUpNav 0.3s ease-out;
    }
    
    @keyframes slideUpNav {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    /* Add padding to bottom of main content to account for fixed bottom nav */
    .main-content {
        padding-bottom: 80px;
    }
    
    .footer {
        padding-bottom: 80px;
    }
}

.nav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 215, 0, 0.6);
    padding: 10px 18px;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Better touch targets for mobile */
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(255, 215, 0, 0.1);
    font-weight: 500;
}

.nav-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    transform: translateY(-1px);
}

.nav-btn:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

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

.nav-btn.active {
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    border-bottom: 2px solid #FFD700;
    border-radius: 10px 10px 0 0;
}

.nav-btn.nav-link {
    text-decoration: none;
}

/* Better active state on mobile bottom nav */
@media (max-width: 768px) {
    .nav-btn.active {
        background: rgba(255, 215, 0, 0.12);
        border-bottom: none;
        border-radius: 8px;
    }
    
    /* Icon color change on active - more prominent */
    .nav-btn.active .icon {
        color: #FFD700;
        transform: scale(1.1);
    }
    
    .nav-btn:active {
        transform: scale(0.95);
    }
    
    .nav-btn:active .icon {
        transform: scale(0.9);
    }
}

.icon {
    font-size: 1.3em;
}

/* Main Content */
.main-content {
    padding: 15px 10px;
    min-height: 400px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.content-section h2 {
    font-size: 1.4em;
    color: #FFD700;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-select {
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 8px 12px;
    font-size: 0.9em;
    border-radius: 6px;
    cursor: pointer;
    min-width: 160px;
    /* Better mobile interaction */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
    transition: all 0.2s ease;
}

.filter-select option {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 8px 12px;
}

.filter-select option:hover,
.filter-select option:checked {
    background-color: #2a2a2a;
}

.filter-select:hover {
    border-color: rgba(255, 215, 0, 0.3);
    background-color: #222;
}

.filter-select:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.5);
    background-color: #1a1a1a;
}

/* Matches Container */
.matches-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Add momentum scrolling for iOS */
}

/* Custom scrollbar for matches container */
.matches-container::-webkit-scrollbar {
    height: 8px;
}

.matches-container::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.5);
    border-radius: 4px;
}

.matches-container::-webkit-scrollbar-thumb {
    background: #B8860B;
    border-radius: 4px;
}

.matches-container::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

.matches-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.matches-table thead {
    background: rgba(255, 215, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Filter row in table header */
.matches-table .filter-row th {
    padding: 8px 4px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: none;
}

.filter-select.table-filter {
    min-width: 100%;
    width: 100%;
    padding: 6px 28px 6px 8px;
    font-size: 0.8em;
    background-size: 12px;
    background-position: right 6px center;
}

/* View toggle overlay */
.view-toggle-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    display: flex;
    gap: 4px;
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    color: #FFD700;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
}

/* Show mobile toggle only on mobile, desktop toggle only on desktop */
.view-toggle-btn.mobile-only {
    display: none;
}

.view-toggle-btn.desktop-only {
    display: inline-flex;
}

@media (max-width: 768px) {
    .view-toggle-btn.mobile-only {
        display: inline-flex;
    }
    .view-toggle-btn.desktop-only {
        display: none;
    }
}

/* Make content sections relative for overlay positioning */
.content-section {
    position: relative;
}

.matches-table th {
    padding: 14px 12px;
    text-align: left;
    color: #FFD700;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    background: inherit;
}

.matches-table th:first-child {
    width: 70px;
    max-width: 70px;
    padding: 12px 4px;
}

.matches-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    background: transparent;
}

.matches-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.matches-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.05);
    transform: translateX(2px);
    cursor: pointer;
}

.matches-table td {
    padding: 12px;
    color: #ffffff;
    font-size: 0.9em;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.match-code {
    color: #FFD700;
    font-weight: bold;
    white-space: nowrap;
    max-width: 80px;
    padding: 4px 4px !important;
}

.match-badge {
    font-size: 0.8em;
    font-weight: 700;
    margin-bottom: 2px;
    color: #FFD700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.phase-badge {
    font-size: 0.65em;
    color: rgba(255, 215, 0, 0.7);
    font-style: normal;
    font-weight: 500;
    padding: 2px 6px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(255, 215, 0, 0.2);
    line-height: 1;
}

.datetime-cell {
    white-space: nowrap;
    min-width: 90px;
}

.date-main {
    color: #ffffff;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 3px;
    letter-spacing: 0;
}

.time-sub {
    color: #888;
    font-size: 0.8em;
    font-weight: 400;
    opacity: 1;
}

.match-date {
    color: #B8860B;
    white-space: nowrap;
}

.match-time {
    color: #B8860B;
    white-space: nowrap;
    font-size: 0.8em;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.team-flag-img {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.team-cell:hover .team-flag-img {
    border-color: rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

.team-flag-emoji {
    font-size: 1.5em;
    flex-shrink: 0;
}

.team-name-short {
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.team-name-full {
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.team-cell:hover .team-name-full {
    color: #FFD700;
}

.vs-cell {
    text-align: center;
    color: #666;
    font-weight: 600;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 8px;
    opacity: 1;
}

.venue-cell {
    color: #aaa;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.venue-cell:hover {
    color: #ffffff;
}

.pricing-cell {
    color: #4ade80;
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
    font-size: 0.9em;
    padding: 10px 12px;
    background: transparent;
    border-left: 1px solid rgba(74, 222, 128, 0.1);
    transition: all 0.2s ease;
}

.pricing-cell:hover {
    background: rgba(74, 222, 128, 0.05);
    border-left-color: rgba(74, 222, 128, 0.2);
}

/* Mobile-friendly match cards (alternative to table on very small screens) */
.match-card-mobile {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 2px solid #B8860B;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.match-card-mobile .match-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #3d3d3d;
}

.match-card-mobile .match-code {
    font-size: 0.85em;
    font-weight: bold;
    color: #FFD700;
}

.match-card-mobile .match-phase {
    font-size: 0.75em;
    color: #B8860B;
    font-style: italic;
}

.match-card-mobile .match-datetime-mobile {
    text-align: center;
    margin-bottom: 10px;
}

.match-card-mobile .match-date-mobile {
    font-size: 0.9em;
    color: #FFD700;
    font-weight: bold;
}

.match-card-mobile .match-time-mobile {
    font-size: 0.75em;
    color: #B8860B;
    margin-top: 2px;
}

.match-card-mobile .match-teams-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
}

.match-card-mobile .team-mobile {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-card-mobile .team-mobile.away {
    flex-direction: row-reverse;
}

.match-card-mobile .team-flag-mobile {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #B8860B;
}

.match-card-mobile .team-name-mobile {
    font-size: 0.9em;
    font-weight: bold;
    color: #FFD700;
}

.match-card-mobile .vs-mobile {
    font-size: 1em;
    color: #B8860B;
    font-weight: bold;
    padding: 0 8px;
}

.match-card-mobile .match-venue-mobile {
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3d3d3d;
    font-size: 0.85em;
    color: #FFD700;
}

.match-card-mobile .match-pricing-mobile {
    text-align: center;
    margin-top: 6px;
    font-size: 0.8em;
    color: #90EE90;
    font-weight: bold;
}

/* Match cards replaced by table layout */

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.match-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.match-badge {
    background: #B8860B;
    color: #1a1a1a;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8em;
}

.match-date, .match-time {
    color: #FFD700;
    font-size: 0.85em;
}

.match-phase {
    color: #B8860B;
    font-style: italic;
    font-size: 0.8em;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    gap: 15px;
}

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

.team-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: #3d3d3d;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #B8860B;
    overflow: hidden;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-flag {
    font-size: 2em;
}

.team-name {
    font-size: 1em;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 3px;
}

.team-code {
    color: #B8860B;
    font-size: 0.8em;
}

.vs {
    font-size: 1.2em;
    color: #FFD700;
    font-weight: bold;
}

.match-venue {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #3d3d3d;
}

.venue-icon {
    color: #B8860B;
    margin-right: 5px;
}

.venue-name {
    color: #FFD700;
    font-size: 0.9em;
}

.match-pricing {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #3d3d3d;
}

.pricing-title {
    color: #FFD700;
    font-size: 0.85em;
    margin-bottom: 8px;
    font-weight: bold;
}

.pricing-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.price-category {
    background: #3d3d3d;
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 3px solid #B8860B;
}

.category-name {
    color: #B8860B;
    font-size: 0.75em;
    margin-bottom: 2px;
}

.category-price {
    color: #FFD700;
    font-weight: bold;
    font-size: 0.95em;
}

.category-availability {
    font-size: 0.7em;
    color: #90EE90;
    margin-top: 2px;
}

.category-availability.limited {
    color: #FFA500;
}

.category-availability.sold-out {
    color: #FF6347;
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.team-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 215, 0, 0.05);
    border-color: rgba(255, 215, 0, 0.3);
}

.team-card .team-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
}

.team-card .team-name {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
    color: #FFD700;
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    font-size: 0.85em;
}

.team-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

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

.info-label {
    color: #999;
    font-size: 0.9em;
}

.info-value {
    color: #fff;
    font-weight: 500;
    text-align: right;
    flex: 1;
    margin-left: 8px;
}

.team-view-more {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(184, 134, 11, 0.3);
    color: #B8860B;
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.team-card:hover .team-view-more {
    color: #FFD700;
}

/* Stadiums Grid */
.stadiums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.stadium-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stadium-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.15);
}

.stadium-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.stadium-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    padding: 15px;
}

.stadium-city {
    color: #FFD700;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.stadium-content {
    padding: 15px;
}

.stadium-name {
    font-size: 1em;
    color: #FFD700;
    margin-bottom: 10px;
    font-weight: bold;
}

.stadium-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stadium-info-item {
    color: #B8860B;
    font-size: 0.85em;
}

.stadium-info-item span {
    color: #ffffff;
}

/* Map Container */
/* Map section fullscreen when active */
#map-section.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: #0f0f0f;
    padding: 0;
    margin: 0;
    animation: none; /* Override fadeIn animation for instant display */
}

.map-container {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    height: 100vh;
    width: 100vw;
}

#map {
    height: 100%;
    width: 100%;
    border-radius: 0;
    z-index: 1;
}

.leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ffffff;
    border: 2px solid #B8860B;
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 15px;
    font-size: 14px;
}

.leaflet-popup-tip {
    background: #2d2d2d;
}

.popup-venue-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid #B8860B;
    padding-bottom: 8px;
}

.popup-venue-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #FFD700;
}

.popup-match-count {
    color: #FFD700;
    font-size: 0.95em;
}

.popup-matches-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
    overflow-x: auto;
}

.popup-matches-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.popup-match-row {
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.popup-match-row:hover {
    background: rgba(184, 134, 11, 0.1);
}

.popup-match-date {
    color: #FFD700;
    font-weight: bold;
    padding: 6px 8px;
    white-space: nowrap;
    vertical-align: middle;
    border-left: 3px solid #B8860B;
}

.popup-match-home {
    padding: 6px 8px;
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
    font-weight: 500;
}

.popup-match-flags {
    padding: 6px 8px;
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
}

.flag-separator {
    color: #FFD700;
    margin: 0 4px;
    font-weight: bold;
}

.popup-match-away {
    padding: 6px 8px;
    white-space: nowrap;
    vertical-align: middle;
    text-align: left;
    font-weight: 500;
}

.popup-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
    margin: 0 4px;
}

.popup-flag-placeholder {
    display: inline-block;
    width: 20px;
    text-align: center;
    vertical-align: middle;
    margin: 0 4px;
}

/* Custom scrollbar for popup table */
.popup-matches-table::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.popup-matches-table::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.5);
    border-radius: 4px;
}

.popup-matches-table::-webkit-scrollbar-thumb {
    background: #B8860B;
    border-radius: 4px;
}

.popup-matches-table::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

/* My Tickets Overlay (for map section) */
.my-tickets-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(15, 15, 15, 0.95) 100%);
    border: 2px solid #B8860B;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.my-tickets-overlay.collapsed {
    max-width: 60px;
    max-height: 60px;
    border-radius: 50%;
}

.my-tickets-overlay.collapsed .overlay-content {
    display: none;
}

.overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: linear-gradient(135deg, #B8860B 0%, #FFD700 100%);
    color: #000;
    cursor: pointer;
    user-select: none;
}

.my-tickets-overlay.collapsed .overlay-header {
    padding: 10px;
    justify-content: center;
    border-radius: 50%;
}

.overlay-header-title {
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-tickets-overlay.collapsed .overlay-header-title span {
    display: none;
}

.overlay-toggle {
    background: none;
    border: none;
    color: #000;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.my-tickets-overlay.collapsed .overlay-toggle {
    display: none;
}

.overlay-toggle:hover {
    transform: scale(1.1);
}

.overlay-content {
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.overlay-content::-webkit-scrollbar {
    width: 6px;
}

.overlay-content::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.5);
    border-radius: 3px;
}

.overlay-content::-webkit-scrollbar-thumb {
    background: #B8860B;
    border-radius: 3px;
}

.overlay-content::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

.overlay-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.overlay-stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.overlay-stat-value {
    font-size: 1.5em;
    color: #FFD700;
    font-weight: bold;
}

.overlay-stat-label {
    font-size: 0.85em;
    color: #888;
    margin-top: 4px;
}

.overlay-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.overlay-btn {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #B8860B 0%, #FFD700 100%);
    color: #000;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.overlay-btn:hover {
    transform: translateY(-2px);
}

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

.overlay-match-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.2s ease;
}

.overlay-match-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #B8860B;
}

.overlay-match-date {
    color: #FFD700;
    font-size: 0.85em;
    margin-bottom: 6px;
}

.overlay-match-teams {
    font-weight: 500;
    margin-bottom: 4px;
}

.overlay-match-venue {
    font-size: 0.85em;
    color: #888;
}

/* Mobile responsive for overlay */
@media (max-width: 768px) {
    .my-tickets-overlay {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        max-height: 70vh;
    }
    
    .my-tickets-overlay.collapsed {
        left: auto;
        max-width: 50px;
        max-height: 50px;
    }
    
    .overlay-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Phases Container */
.phases-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phase-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
}

.phase-name {
    font-size: 1.1em;
    color: #FFD700;
    margin-bottom: 10px;
    font-weight: 600;
}

.phase-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.phase-stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #888;
    font-size: 0.8em;
    margin-bottom: 3px;
}

.stat-value {
    color: #ffffff;
    font-size: 1.1em;
    font-weight: 600;
}

/* Footer */
.footer {
    background: transparent;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Version Info - Fixed top-right corner */
.version-info {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    font-size: 0.75em;
    transition: all 0.3s ease;
    display: none; /* Hidden by default */
}

.version-info.visible {
    display: block; /* Show when header is double-clicked */
}

.version-toggle {
    padding: 4px 10px;
    border-radius: 4px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #aaa;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Consolas', 'Monaco', monospace;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.version-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

.version-details {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.85);
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    min-width: 180px;
    position: absolute;
    bottom: 100%;
    right: 0;
}

.version-info.expanded .version-details {
    display: flex;
}

.version-info.expanded .version-toggle {
    background: #1f6feb;
    color: #fff;
}

.version-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.version-badge.pr {
    background: #238636;
    color: #ffffff;
}

.version-badge.branch {
    background: #1f6feb;
    color: #ffffff;
}

.version-badge.commit {
    background: #6e7681;
    color: #ffffff;
}

.version-build-time {
    color: #aaa;
    font-size: 0.9em;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.version-time-ago {
    color: #888;
}

/* Responsive Design */

/* Tablet Landscape and below (1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
    }

    .matches-table {
        font-size: 0.9em;
    }

    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .stadiums-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Tablet Portrait and below (768px) */
@media (max-width: 768px) {
    .header {
        padding: 15px 10px;
    }

    .header-content h1 {
        font-size: 1.5em;
    }

    .countdown-days {
        font-size: 1.8em;
    }

    .tournament-dates {
        font-size: 0.85em;
    }

    /* Navigation - bottom bar style */
    .navigation {
        gap: 1px;
        padding: 4px 0;
        justify-content: space-evenly;
    }

    .nav-btn {
        flex: 1;
        padding: 6px 2px 4px;
        font-size: 0.65em;
        gap: 2px;
        min-width: auto;
        flex-direction: column;
        align-items: center;
        text-align: center;
        border-radius: 8px;
        border: none;
        position: relative;
    }

    /* Icon styling for cleaner mobile look */
    .nav-btn .icon {
        font-size: 1.5em;
        margin-bottom: 1px;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    /* Text label - smaller and cleaner */
    .nav-btn span:not(.icon):not(.selection-badge) {
        font-size: 0.7em;
        line-height: 1;
        font-weight: 500;
        letter-spacing: 0.01em;
    }

    /* Main content */
    .main-content {
        padding: 10px 5px;
    }

    .content-section h2 {
        font-size: 1.3em;
        margin-bottom: 12px;
    }

    /* Filter bar */
    .filter-bar {
        gap: 8px;
        margin-bottom: 12px;
    }

    .filter-select {
        padding: 8px 10px;
        font-size: 0.85em;
        min-width: 140px;
        flex: 1;
    }

    /* Matches Table - optimize for tablet */
    .matches-table {
        border-radius: 8px;
    }

    .matches-table th:nth-child(1),
    .matches-table td:nth-child(1) {
        /* Match code - keep visible but smaller */
        font-size: 0.8em;
        padding: 10px 6px;
    }

    .matches-table th,
    .matches-table td {
        padding: 10px 6px;
        font-size: 0.85em;
    }

    .team-flag-img {
        width: 24px;
        height: 16px;
    }

    .team-name-full {
        font-size: 0.9em;
    }

    .venue-cell {
        max-width: 140px;
        font-size: 0.85em;
    }

    .pricing-cell {
        padding: 10px 8px;
        font-size: 0.85em;
    }

    .match-badge {
        font-size: 0.95em;
    }

    .phase-badge {
        padding: 2px 6px;
        font-size: 0.7em;
    }

    .team-cell {
        gap: 6px;
        min-width: 150px;
    }

    /* Teams and Stadiums grids */
    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .team-card {
        padding: 12px;
    }

    .team-card .team-logo {
        width: 50px;
        height: 50px;
    }

    .team-card .team-name {
        font-size: 1em;
    }

    .stadiums-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stadium-image {
        height: 150px;
    }

    /* Groups grid */
    .groups-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Map */
    .map-container {
        height: 400px;
        padding: 10px;
    }

    #map {
        border-radius: 5px;
    }

    .popup-matches-list {
        max-height: 200px;
    }

    /* Phases */
    .phase-stats {
        gap: 15px;
    }
}

/* Mobile Large (640px) */
@media (max-width: 640px) {
    .header-content h1 {
        font-size: 1.3em;
    }

    .countdown-days {
        font-size: 1.5em;
    }

    .starts-in {
        font-size: 0.75em;
    }

    .tournament-dates {
        font-size: 0.8em;
    }

    /* Navigation - bottom bar continues */
    .navigation {
        padding: 4px 0;
    }

    .nav-btn {
        padding: 6px 2px 4px;
        font-size: 0.6em;
    }

    .nav-btn .icon {
        font-size: 1.4em;
    }

    /* Filters - stack better on mobile */
    .filter-bar {
        flex-direction: column;
        gap: 8px;
    }

    .filter-select {
        width: 100%;
        min-width: auto;
    }

    /* Matches table - simplified for mobile */
    .matches-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }

    .matches-table {
        min-width: 650px; /* Allow horizontal scroll */
        border-radius: 8px;
    }

    .matches-table th {
        padding: 10px 6px;
        font-size: 0.75em;
        position: sticky;
        top: 0;
    }

    .matches-table td {
        padding: 10px 6px;
        font-size: 0.75em;
    }

    .team-flag-img {
        width: 20px;
        height: 14px;
    }

    .team-cell {
        gap: 5px;
        min-width: 120px;
    }

    .team-name-full {
        font-size: 0.8em;
    }

    .venue-cell {
        max-width: 100px;
        font-size: 0.7em;
    }

    .pricing-cell {
        padding: 8px 6px;
        font-size: 0.75em;
    }

    .match-badge {
        font-size: 0.9em;
        margin-bottom: 4px;
    }

    .phase-badge {
        padding: 2px 4px;
        font-size: 0.65em;
    }

    .date-main {
        font-size: 0.8em;
    }

    .time-sub {
        font-size: 0.7em;
    }

    .vs-cell {
        font-size: 0.7em;
        padding: 0 4px;
    }

    /* Teams grid - 2 columns on mobile */
    .teams-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .team-card {
        padding: 10px;
    }

    .team-card .team-logo {
        width: 40px;
        height: 40px;
    }

    .team-card .team-name {
        font-size: 0.9em;
        margin-bottom: 8px;
    }

    .team-info {
        font-size: 0.75em;
    }

    /* Stadiums - single column */
    .stadiums-grid {
        grid-template-columns: 1fr;
    }

    .stadium-image {
        height: 120px;
    }

    .stadium-content {
        padding: 12px;
    }

    /* Map */
    .map-container {
        height: 350px;
        padding: 8px;
    }

    /* Popup adjustments */
    .leaflet-popup-content {
        margin: 10px;
        font-size: 12px;
    }

    .popup-matches-table {
        font-size: 0.85em;
    }

    .popup-flag {
        width: 16px;
        height: 12px;
    }
}

/* Mobile Small (480px) */
@media (max-width: 480px) {
    .header {
        padding: 12px 8px;
    }

    .header-content h1 {
        font-size: 1.2em;
        margin-bottom: 8px;
    }

    .countdown {
        margin-top: 8px;
    }

    .countdown-days {
        font-size: 1.3em;
    }

    .starts-in {
        font-size: 0.7em;
    }

    .tournament-dates {
        font-size: 0.75em;
    }

    /* Navigation - keep bottom bar compact */
    .nav-btn {
        padding: 5px 1px 3px;
        font-size: 0.55em;
    }

    .nav-btn .icon {
        font-size: 1.3em;
        margin-bottom: 1px;
    }

    /* Content */
    .main-content {
        padding: 8px 4px;
    }

    .content-section h2 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    /* Matches table - even more compact */
    .matches-container {
        margin: 0 -8px;
        padding: 0 8px;
    }

    .matches-table {
        min-width: 550px;
        border-radius: 6px;
    }

    .matches-table th {
        padding: 8px 4px;
        font-size: 0.65em;
        letter-spacing: 0.2px;
    }

    .matches-table td {
        padding: 8px 4px;
        font-size: 0.7em;
    }

    .team-flag-img {
        width: 18px;
        height: 13px;
        border-width: 1px;
    }

    .team-cell {
        gap: 4px;
        min-width: 100px;
    }

    .team-name-full {
        font-size: 0.75em;
    }

    .venue-cell {
        max-width: 80px;
        font-size: 0.65em;
    }

    .pricing-cell {
        padding: 6px 4px;
        font-size: 0.7em;
        border-left-width: 1px;
    }

    .match-badge {
        font-size: 0.85em;
        margin-bottom: 3px;
    }

    .phase-badge {
        padding: 2px 3px;
        font-size: 0.6em;
    }

    .date-main {
        font-size: 0.75em;
        margin-bottom: 2px;
    }

    .time-sub {
        font-size: 0.65em;
    }

    .vs-cell {
        font-size: 0.65em;
        padding: 0 3px;
    }

    /* Teams - single column on very small screens */
    .teams-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Groups */
    .groups-grid {
        gap: 10px;
    }

    .group-card {
        padding: 12px;
    }

    .group-header {
        font-size: 1.2em;
    }

    .group-team-flag {
        width: 32px;
        height: 24px;
    }

    /* Map */
    .map-container {
        height: 300px;
        padding: 5px;
    }

    /* Phases */
    .phase-card {
        padding: 12px;
    }

    .phase-name {
        font-size: 1.1em;
    }

    .phase-stats {
        gap: 10px;
    }

    .stat-value {
        font-size: 1em;
    }
}

/* Extra Small Mobile (360px) */
@media (max-width: 360px) {
    .header-content h1 {
        font-size: 1.1em;
    }

    .countdown-days {
        font-size: 1.2em;
    }

    .nav-btn {
        font-size: 0.6em;
        padding: 5px 2px 3px;
    }

    .matches-container {
        margin: 0 -4px;
        padding: 0 4px;
    }

    .matches-table {
        min-width: 500px;
        border-radius: 4px;
    }

    .matches-table th {
        padding: 6px 3px;
        font-size: 0.6em;
    }

    .matches-table td {
        padding: 6px 3px;
        font-size: 0.65em;
    }

    .team-flag-img {
        width: 16px;
        height: 12px;
    }

    .team-cell {
        gap: 3px;
        min-width: 85px;
    }

    .team-name-full {
        font-size: 0.7em;
    }

    .pricing-cell {
        padding: 5px 3px;
        font-size: 0.65em;
    }

    .match-badge {
        font-size: 0.8em;
    }

    .phase-badge {
        padding: 1px 2px;
        font-size: 0.55em;
    }

    .map-container {
        height: 250px;
    }
}

/* Landscape mode optimizations for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 10px;
    }

    .header-content h1 {
        font-size: 1.2em;
        margin-bottom: 5px;
    }

    .countdown {
        margin-top: 5px;
    }

    .countdown-days {
        font-size: 1.3em;
    }

    .navigation {
        padding: 5px;
    }

    .nav-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    .main-content {
        padding: 10px;
    }

    .map-container {
        height: 250px;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 50px;
    color: #FFD700;
    font-size: 1.2em;
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.group-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
}

.group-header {
    color: #FFD700;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.group-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.group-team {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 215, 0, 0.03);
    border-radius: 5px;
    transition: background 0.2s;
}

.group-team:hover {
    background: rgba(255, 215, 0, 0.08);
}

.group-team-flag {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.group-team-name {
    color: #fff;
    font-size: 1em;
    flex: 1;
}

/* Utility classes for responsive visibility */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 640px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .desktop-table-only {
        display: none;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* This targets touch devices */
    .nav-btn,
    .filter-select,
    .team-card,
    .stadium-card,
    .group-card {
        /* Increase touch targets */
        min-height: 44px;
    }
    
    .matches-table tbody tr:active {
        background: rgba(184, 134, 11, 0.2);
    }
    
    .team-card:active,
    .stadium-card:active {
        transform: scale(0.98);
    }
}

/* ============================================
   TEAM PREDICTIONS STYLES
   ============================================ */

/* Team display with prediction support */
.team-display {
    display: inline-block;
    position: relative;
}

.team-placeholder {
    color: #FFD700;
    font-style: italic;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.team-placeholder.clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.team-placeholder.clickable:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: #FFED4E;
    transform: translateY(-1px);
}

.team-placeholder.clickable:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
    background-color: rgba(255, 215, 0, 0.15);
}

.team-placeholder.clickable:active {
    transform: translateY(0);
}

.team-predicted {
    color: #87CEEB;
    font-weight: 500;
}

.prediction-indicator {
    color: #FFD700;
    font-size: 0.7em;
    margin-left: 2px;
    vertical-align: super;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal content */
.modal-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 2px solid #B8860B;
    animation: slideUp 0.3s ease;
}

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

/* Modal header */
.modal-header {
    padding: 20px 24px;
    border-bottom: 2px solid #B8860B;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #B8860B 0%, #FFD700 100%);
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: #1a1a1a;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

/* Modal body */
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.prediction-info {
    margin-bottom: 20px;
}

.prediction-info p {
    margin: 8px 0;
    color: #cccccc;
    line-height: 1.5;
}

.prediction-info strong {
    color: #FFD700;
}

.current-prediction {
    padding: 10px;
    background-color: rgba(135, 206, 235, 0.1);
    border-left: 3px solid #87CEEB;
    border-radius: 4px;
    margin-top: 10px;
}

/* Mapping info */
.mapping-info {
    margin: 15px 0;
    padding: 12px;
    background-color: rgba(135, 206, 235, 0.1);
    border-left: 3px solid #87CEEB;
    border-radius: 4px;
}

.mapping-description {
    color: #FFD700;
    font-weight: 500;
    margin-bottom: 8px;
}

.mapping-status {
    color: #87CEEB;
    font-size: 0.9em;
    margin: 5px 0;
}

.mapping-notes {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    margin-top: 8px;
    font-style: italic;
}

/* Team selection list */
.team-selection-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    background-color: #1a1a1a;
}

.team-option {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    transition: all 0.2s ease;
}

.team-option:last-child {
    border-bottom: none;
}

.team-option:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

.team-option-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-option-flag {
    width: 32px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
    background-color: #0f0f0f;
    box-shadow: 0 0 0 1px #2a2a2a;
}

.team-option.selected {
    background-color: rgba(135, 206, 235, 0.15);
    border-left: 4px solid #87CEEB;
}

.team-option-name {
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
}

.team-option.selected .team-option-name {
    color: #87CEEB;
}

.team-option-badge {
    background-color: #87CEEB;
    color: #1a1a1a;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Modal footer */
.modal-footer {
    padding: 16px 24px;
    border-top: 2px solid #3a3a3a;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #1a1a1a;
    border-radius: 0 0 10px 10px;
}

.modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancel {
    background-color: #3a3a3a;
    color: #ffffff;
}

.btn-cancel:hover {
    background-color: #4a4a4a;
}

.btn-secondary {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-clear {
    background-color: #dc3545;
    color: #ffffff;
}

.btn-clear:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Scrollbar styling for modal */
.team-selection-list::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.team-selection-list::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.team-selection-list::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: #B8860B;
    border-radius: 4px;
}

.team-selection-list::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

/* All Predictions Modal */
.all-predictions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prediction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.prediction-item:hover {
    background-color: rgba(255, 215, 0, 0.05);
    border-color: #B8860B;
}

.prediction-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.prediction-item-flag {
    width: 40px;
    height: 25px;
    object-fit: contain;
    border-radius: 3px;
    background-color: #0f0f0f;
    box-shadow: 0 0 0 1px #2a2a2a;
}

.prediction-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prediction-item-placeholder {
    color: #FFD700;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.prediction-item-team {
    color: #ffffff;
    font-size: 16px;
}

.prediction-item-actions {
    display: flex;
    gap: 8px;
}

.btn-edit-prediction,
.btn-delete-prediction {
    background: none;
    border: 1px solid #3a3a3a;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.btn-edit-prediction:hover {
    background-color: #FFD700;
    color: #1a1a1a;
    border-color: #FFD700;
}

.btn-delete-prediction:hover {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}

.no-predictions {
    text-align: center;
    color: #cccccc;
    padding: 40px 20px;
    font-size: 16px;
    line-height: 1.6;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .modal-content {
        max-height: 90vh;
        margin: 10px;
    }
    
    .modal-header h3 {
        font-size: 1.2em;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .team-selection-list {
        max-height: 300px;
    }
    
    .modal-footer {
        padding: 12px 16px;
    }
    
    .modal-footer button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Selection and Tickets Styles */
.selection-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: 600;
    padding: 2px 5px;
    margin-left: 5px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

/* On mobile, make the badge centered and sized like the icon */
@media (max-width: 768px) {
    .nav-btn[data-section="my-tickets"] .selection-badge {
        /* Match the icon size on mobile */
        font-size: 1.3em; /* Same as .nav-btn .icon on mobile */
        min-width: auto;
        height: auto;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
        background: transparent;
        border: none;
        color: inherit; /* Inherit button color */
        font-weight: 500;
        box-shadow: none;
        /* Center the badge horizontally */
        align-self: center;
    }
    
    /* When active, use the active button color */
    .nav-btn[data-section="my-tickets"].active .selection-badge {
        color: #FFD700;
    }
}

.select-header {
    width: 40px;
    text-align: center;
}

.select-cell {
    text-align: center;
    vertical-align: middle;
    padding: 8px !important;
}

.match-select-checkbox,
#select-all-checkbox,
.select-all-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FFD700;
    transition: transform 0.1s ease;
}

.match-select-checkbox:hover,
#select-all-checkbox:hover,
.select-all-checkbox:hover {
    transform: scale(1.15);
}

.match-select-checkbox:focus,
#select-all-checkbox:focus,
.select-all-checkbox:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.match-select-checkbox:active,
#select-all-checkbox:active,
.select-all-checkbox:active {
    transform: scale(1.05);
}

.match-row.selected {
    background: linear-gradient(90deg, rgba(184, 134, 11, 0.15) 0%, rgba(255, 215, 0, 0.15) 100%) !important;
    border-left: 3px solid #FFD700;
}

.match-row.selected:hover {
    background: linear-gradient(90deg, rgba(184, 134, 11, 0.25) 0%, rgba(255, 215, 0, 0.25) 100%) !important;
}

/* Tickets Container */
.my-tickets-container {
    padding: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 20px 0;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #FFD700;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.empty-state p {
    color: #aaa;
    font-size: 1.1em;
}

.empty-state-cta,
.error-retry-btn {
    margin-top: 20px;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(244, 67, 54, 0.1);
    border: 2px solid rgba(244, 67, 54, 0.3);
    border-radius: 12px;
    margin: 20px 0;
}

.error-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.error-state h3 {
    color: #f44336;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.error-state p {
    color: #ccc;
    font-size: 1.1em;
    max-width: 500px;
    margin: 0 auto;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #FFD700;
    font-size: 1.2em;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Tickets Summary Cards */
.my-tickets-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border: 2px solid #B8860B;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.summary-icon {
    font-size: 2.5em;
}

.summary-content {
    flex: 1;
}

.summary-value {
    font-size: 2em;
    font-weight: bold;
    color: #FFD700;
    line-height: 1;
}

.summary-label {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 5px;
}

/* Tickets Actions */
.my-tickets-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, #B8860B 0%, #FFD700 100%);
    border: none;
    color: #1a1a1a;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.action-btn:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

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

.action-btn.secondary {
    background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
    color: #FFD700;
    border: 2px solid #B8860B;
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border-color: #f44336;
}

/* Tickets List */
.my-tickets-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.ticket-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    border: 2px solid #B8860B;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ticket-match-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ticket-phase {
    font-size: 0.85em;
    color: #FFD700;
    font-weight: bold;
}

.ticket-match-code {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9em;
}

.remove-btn {
    background: transparent;
    border: 2px solid #666;
    color: #666;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.ticket-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.ticket-flag {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ticket-team-name {
    font-size: 0.95em;
    font-weight: bold;
    color: #fff;
    text-align: center;
}

.ticket-vs {
    color: #FFD700;
    font-weight: bold;
    font-size: 1.1em;
    padding: 0 10px;
}

.ticket-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: #ddd;
}

.detail-icon {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.detail-text {
    flex: 1;
}

/* Map Filter Toggle */
.map-filter-toggle {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #FFD700;
    font-weight: bold;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #FFD700;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .my-tickets-summary {
        grid-template-columns: 1fr;
    }
    
    .my-tickets-list {
        grid-template-columns: 1fr;
    }
    
    .my-tickets-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ticket-teams {
        flex-direction: column;
        gap: 15px;
    }
    
    .ticket-vs {
        transform: rotate(90deg);
    }
}
