:root {
    --primary-color: #1a1a1a;
    --accent-color: #c41e3a;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #e5e5e5;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --primary-color: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #1f1f1f;
    --border-color: #333;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Hero */
.hero {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

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

.season-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Event Cards */
.events-grid {
    display: grid;
    gap: 1.5rem;
}

.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
}

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

.date-box {
    background: linear-gradient(135deg, var(--accent-color), #a01729);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
}

.date-box.tournament {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.date-box.training {
    background: linear-gradient(135deg, #10b981, #059669);
}

.date-box .day {
    font-size: 1.75rem;
    font-weight: bold;
}

.date-box .month {
    font-size: 0.875rem;
    text-transform: uppercase;
    opacity: 0.95;
}

.event-info h3 {
    margin-bottom: 0.5rem;
}

.details {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
}

.event-type {
    padding: 0.15rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.score {
    font-size: 1.75rem;
    font-weight: bold;
}

.score.win {
    color: #22c55e;
}

.score.loss {
    color: #ef4444;
}

.score.draw {
    color: #f59e0b;
}

/* Event tags styling */
.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.event-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #e8e8e8;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-primary);
}

[data-theme="dark"] .event-tag {
    background: #333;
    color: #e0e0e0;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab.active,
.filter-tab:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

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

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: var(--bg-secondary);
}

.theme-btn[data-theme="light"].active,
[data-theme="light"] .theme-btn[data-theme="light"] {
    background: var(--accent-color);
    color: white;
}

.theme-btn[data-theme="dark"].active,
[data-theme="dark"] .theme-btn[data-theme="dark"] {
    background: var(--accent-color);
    color: white;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

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

/* Button */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile responsive */
@media (max-width: 768px) {
    /* Stack header elements */
    nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    /* Logo on its own line */
    .logo {
        font-size: 1.5rem;
        margin: 0;
        white-space: nowrap;  /* Prevent "Team Egger" from wrapping */
    }
    
    /* Navigation menu on second line */
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
        font-size: 0.9rem;
        flex-wrap: wrap;  /* Changed from nowrap to wrap */
        padding: 0;
    }
    
    .nav-links li {
        white-space: nowrap;
    }
    
    .nav-links a {
        padding: 0.25rem 0.5rem;
    }

    .nav-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }

    .theme-switcher {
        margin-top: 1rem;
    }
    
    /* Rest of mobile styles... */
    .event-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .date-box {
        margin: 0 auto;
    }
    
    .theme-switcher {
        bottom: 1rem;
        right: 1rem;
    }
}

[data-theme="dark"] .filter-tab:not(.active) {
    background: #404040;
    color: #e0e0e0;
    border-color: #555;
}

[data-theme="dark"] .filter-tab:not(.active):hover {
    background: #4a4a4a;
    color: white;
    border-color: #666;
}

/* Event Detail Pages */
.breadcrumb {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.event-detail {
    max-width: 800px;
    margin: 0 auto;
}

.event-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.event-date-large {
    display: block;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.event-score-large {
    margin-top: 2rem;
    text-align: center;
}

.score-large {
    font-size: 3rem;
    font-weight: bold;
}

.event-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.event-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.tournament-schedule {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.tournament-game {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tournament-game:last-child {
    border-bottom: none;
}

/* Event card links */
.event-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-card-link .event-card {
    cursor: pointer;
}

.event-card-link .event-card * {
    pointer-events: none;
}

.event-card-link:hover .event-card {
    transform: translateY(-4px);
}

.venue-link {
    position: relative;
    z-index: 10;
}

/* ============================================
   SPONSOR CAROUSEL
   ============================================ */

/* Light theme / Default */
.sponsor-carousel-section {
    background: var(--bg-secondary);
    padding: 2rem 0;  /* ← CHANGED from 3rem to 2rem */
    margin-top: 4rem;
    overflow: hidden;
}

.sponsor-carousel-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.sponsor-carousel {
    overflow: hidden;
    position: relative;
}

.sponsor-track {
    display: flex;
    animation: scroll 30s linear infinite;
}

.sponsor-item {
    flex: 0 0 200px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-item img {
    max-width: 100%;
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.sponsor-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ============================================
   DARK THEME - SPONSOR CAROUSEL
   ============================================ */

/* Dark theme: light gray background (same as light theme) */
[data-theme="dark"] .sponsor-carousel-section {
    background-color: #f5f5f5;  /* Light gray */
    padding: 2rem 0;  /* Same as light theme */
}

/* Dark theme: dark text for section heading */
[data-theme="dark"] .sponsor-carousel-section h3 {
    color: #333;  /* Dark text on light background */
}

/* Dark theme: grayscale logos by default */
[data-theme="dark"] .sponsor-item img {
    filter: grayscale(100%);
    opacity: 0.9;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Dark theme: colorful on hover */
[data-theme="dark"] .sponsor-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Emergency Banner */
.emergency-banner {
    position: sticky;
    top: 0;
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.emergency-banner.info {
    background: #0066cc;
}

    flex: 1;
    max-width: 1200px;
}

    font-weight: 500;
    animation: scrollText 20s linear infinite;
    display: inline-block;
    padding-left: 100%;
    white-space: nowrap;
}

    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes scrollText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Hide banner if closed */
.emergency-banner.hidden {
    display: none;
}

/* Event Detail Pages */
.breadcrumb {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.event-detail {
    max-width: 800px;
    margin: 0 auto;
}

.event-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.event-date-large {
    display: block;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.event-score-large {
    margin-top: 2rem;
    text-align: center;
}

.score-large {
    font-size: 3rem;
    font-weight: bold;
}

.event-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.event-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.tournament-schedule {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.tournament-game {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tournament-game:last-child {
    border-bottom: none;
}

/* Event card links */
.event-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-card-link:hover .event-card {
    transform: translateY(-4px);
}

.venue-link {
    position: relative;
    z-index: 10;
}

/* Sponsor Carousel */
.sponsor-carousel-section {
    background: var(--bg-secondary);
    padding: 3rem 0;
    margin-top: 4rem;
    overflow: hidden;
}

.sponsor-carousel-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.sponsor-carousel {
    overflow: hidden;
    position: relative;
}

.sponsor-track {
    display: flex;
    animation: scroll 30s linear infinite;
}

.sponsor-item {
    flex: 0 0 200px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-item img {
    max-width: 100%;
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.sponsor-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Emergency Banner */
.emergency-banner {
    position: sticky;
    top: 0;
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.emergency-banner.info {
    background: #0066cc;
}

    flex: 1;
    max-width: 1200px;
}

    font-weight: 500;
    animation: scrollText 20s linear infinite;
    display: inline-block;
    padding-left: 100%;
    white-space: nowrap;
}

    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes scrollText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Hide banner if closed */
.emergency-banner.hidden {
    display: none;
}

/* Fix sponsor carousel spacing */
.sponsor-carousel-section {
    background: var(--bg-secondary);
    padding: 1.5rem 0;
    margin-top: 2rem;
    overflow: hidden;
}

/* Fix link colors to not change on visit */
.venue-link,
.event-tag a {
    color: inherit !important;
    text-decoration: underline dotted !important;
}

.venue-link:visited,
.event-tag a:visited,
.venue-link:hover,
.event-tag a:hover {
    color: inherit !important;
}

/* Camp card styling */
.date-box.camp {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Fix mobile responsive for filter tabs */
@media (max-width: 768px) {
    .filter-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-tab {
        flex: 1 1 auto;
        min-width: 80px;
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Fix theme switcher to be horizontal */
.theme-switcher-inline {
    display: flex;
    flex-direction: row !important;
    gap: 0.5rem;
}

.theme-switcher-inline .theme-btn {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-switcher-inline .theme-btn:hover {
    background: var(--bg-secondary);
}

.theme-switcher-inline .theme-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Style for tournament card links */
.event-card-wrapper {
    text-decoration: none;
    color: inherit;
    display: contents;
}

.event-card-wrapper:hover .event-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Ensure all events have proper status for filtering */
[data-status="confirmed"] {
    /* Past events that have been played */
}

/* === THEME SWITCHER FIX === */
.theme-switcher {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.theme-switcher-inline {
    display: inline-flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px; /* Pill shape */
    padding: 4px;
    gap: 4px;
}

.theme-switcher-inline .theme-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.theme-switcher-inline .theme-btn:hover {
    background: var(--bg-primary);
}

.theme-switcher-inline .theme-btn.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* === EVENT CARD LINK WRAPPER === */
.event-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-card-link:hover .event-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}


/* === TEMPORARILY HIDE EXTRA CONTROLS === */
.team-selector,
.season-selector,
.timezone-selector {
    display: none;
}

/* When we're ready to show them, we'll remove this section */

/* === COLORED DATE BOXES BY EVENT TYPE === */
.game-card .date-box {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0066cc 100%);
}

.tournament-card .date-box {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.training-card .date-box {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.camp-card .date-box {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.social-card .date-box {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.password-protected {
    overflow: hidden;
}

.password-gate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, #0066cc 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

[data-theme="dark"] .password-gate {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.password-gate-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

[data-theme="dark"] .password-gate-content {
    background: var(--bg-secondary);
}

.password-gate-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.password-gate-logo h1 {
    font-size: 2rem;
    margin: 0;
    color: var(--accent-color);
}

.password-gate-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.password-gate-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.password-gate-form input[type="password"] {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.password-gate-form input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.password-gate-form button {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.password-gate-form button:hover {
    background: #0066cc;
}

.password-error {
    text-align: center;
    color: #dc2626;
    font-weight: 600;
    margin-top: 1rem;
    animation: shake 0.5s;
}

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


/* === TOURNAMENT DETAIL PAGE === */
.tournament-detail {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
}

.tournament-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tournament-header h1 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.tournament-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
}

.meta-item a {
    color: var(--accent-color);
    text-decoration: none;
}

.meta-item a:hover {
    text-decoration: underline;
}

.tournament-content {
    line-height: 1.8;
}

.tournament-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tournament-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.tournament-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.tournament-content table th {
    background: var(--accent-color);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.tournament-content table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.tournament-content table tr:last-child td {
    border-bottom: none;
}

/* Highlight our games */
.tournament-content table tr:has(td strong) {
    background: rgba(var(--accent-color-rgb), 0.1);
    font-weight: 600;
}

[data-theme="dark"] .tournament-content table tr:has(td strong) {
    background: rgba(59, 130, 246, 0.15);
}

.tournament-content ul, 
.tournament-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.tournament-content li {
    margin-bottom: 0.5rem;
}

.back-link {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .tournament-detail {
        padding: 1rem;
    }
    
    .tournament-content table {
        font-size: 0.9rem;
    }
    
    .tournament-content table th,
    .tournament-content table td {
        padding: 0.5rem;
    }
}


@media (max-width: 768px) {
    .password-gate-content {
        padding: 2rem 1.5rem;
        width: 95%;
        margin: 1rem;
    }
    
    .password-gate-logo h1 {
        font-size: 1.5rem;
    }
    
    .password-gate-form h2 {
        font-size: 1.1rem;
    }
    
    .password-gate-form input[type="password"],
    .password-gate-form button {
        font-size: 1rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .password-gate-content {
        padding: 1.5rem 1rem;
    }
    
    .password-gate-logo {
        margin-bottom: 1.5rem;
    }
    
    .password-gate-logo h1 {
        font-size: 1.25rem;
    }
    
    .password-gate-form h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}


/* === PASSWORD GATE MOBILE FIX - COMPLETE REWRITE === */
.password-protected {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.password-gate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, #0066cc 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    overflow-y: auto;
}

[data-theme="dark"] .password-gate {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.password-gate-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    margin: auto;
}

[data-theme="dark"] .password-gate-content {
    background: var(--bg-secondary);
}

.password-gate-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.password-gate-logo h1 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--accent-color);
    word-break: break-word;
}

.password-gate-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.4;
}

.password-gate-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.password-gate-form input[type="password"] {
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.password-gate-form input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.password-gate-form button {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.password-gate-form button:hover {
    background: #0066cc;
}

.password-error {
    text-align: center;
    color: #dc2626;
    font-weight: 600;
    margin-top: 1rem;
    animation: shake 0.5s;
    font-size: 0.95rem;
}

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

/* Mobile optimizations */
@media (max-width: 768px) {
    .password-gate-content {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    .password-gate-logo h1 {
        font-size: 1.5rem;
    }
    
    .password-gate-form h2 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .password-gate {
        padding: 0.5rem;
    }
    
    .password-gate-content {
        padding: 1.25rem;
        max-width: 95%;
    }
    
    .password-gate-logo {
        margin-bottom: 1rem;
    }
    
    .password-gate-logo h1 {
        font-size: 1.25rem;
    }
    
    .password-gate-form h2 {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .password-gate-form input[type="password"],
    .password-gate-form button {
        padding: 0.875rem;
        font-size: 1rem;
    }
}


.emergency-banner {
    position: relative;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 1rem 3rem 1rem 1.5rem;
    display: none;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Prevent content from overflowing */
    width: 100%;
    box-sizing: border-box;
}

    flex: 1;
    overflow: hidden; /* Prevent text from overflowing */
    word-wrap: break-word;
    word-break: break-word;
    min-width: 0; /* Allow flex item to shrink below content size */
}

    display: block;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Ensure body doesn't overflow */
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Ensure main content doesn't overflow */
main, .container {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .emergency-banner {
        padding: 0.875rem 2.5rem 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
        right: 0.5rem;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .emergency-banner {
        padding: 0.75rem 2rem 0.75rem 0.75rem;
        font-size: 0.85rem;
    }
}


@media (max-width: 768px) {
        /* Faster animation on mobile/tall screens */
    }
}

@media (min-width: 769px) {
        /* Normal speed on desktop */
    }
}

    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}


.emergency-banner {
    position: relative;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: none;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

    display: flex;
    width: 100%;
    overflow: hidden;
    position: relative;
}

    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
}

@media (max-width: 768px) {
    }
}

    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-100%, 0);
    }
}

    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 1;
}

    opacity: 1;
}

@media (max-width: 768px) {
    .emergency-banner {
        padding: 0.875rem 2.5rem 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
        right: 0.5rem;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .emergency-banner {
        padding: 0.75rem 2rem 0.75rem 0.75rem;
        font-size: 0.85rem;
    }
}


/* === EMERGENCY BANNER === */
.emergency-banner {
    position: relative;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 1rem 3rem 1rem 1.5rem;
    display: none;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.emergency-banner.info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.emergency-banner.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.banner-content {
    display: flex;
    width: 100%;
    overflow: hidden;
    position: relative;
    flex: 1;
}

.banner-message {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}

@media (max-width: 768px) {
    .banner-message {
        animation: marquee 12s linear infinite;
    }
    
    .emergency-banner {
        padding: 0.875rem 2.5rem 0.875rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .emergency-banner {
        padding: 0.75rem 2rem 0.75rem 0.75rem;
        font-size: 0.85rem;
    }
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-100%, 0);
    }
}

.banner-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 1;
}

.banner-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .banner-close {
        right: 0.5rem;
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Logo and Hero Image Additions - Added 2024-11-20
   ========================================================================== */

/* Header Logo (after Kontakt, before theme switcher) */
.header-logo-link {
    display: flex;
    align-items: center;
    margin: 0 1rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-logo-link:hover {
    opacity: 0.8;
}

.header-logo {
    height: 50px;
    width: auto;
    display: block;
}

/* Responsive header logo */
@media (max-width: 768px) {
    .header-logo {
        height: 35px;
    }
    
    .header-logo-link {
        margin: 0 0.5rem;
    }
}

/* Hero Image Section */
.hero-image-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Responsive hero heights */
@media (max-width: 768px) {
    .hero-image {
        height: 200px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-image {
        height: 250px;
    }
}

/* Adjust spacing when hero image is present */
.hero-image-section + .container {
    margin-top: 2rem;
}

/* Footer tagline */
.footer-tagline {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-tagline p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}