/* Event Records page specific styles */

/* === Background & Page Theme === */
body {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    color: #ffffff;
    background: #0d0d0d; /* Fallback */
    --events-bg: url("../images/events-background.6f2254b303d4.webp");
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--events-bg) center 45% / cover no-repeat;
    filter: none;
    background-attachment: fixed;
    animation: backgroundZoom 6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    transform-origin: center;
}

@keyframes backgroundZoom {
    0% {
        transform: scale(1.25);
        opacity: 0.8;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* === SECTION LAYOUT === */
/* Remove all gaps and ensure full-width sections */
.title-section,
.event-summary-section,
.present-events-section,
.past-events-section {
    width: 100vw;
    margin: 0;
    padding: 40px 0;
    background: rgba(13, 13, 13, 0.95);
    border-radius: 0; /* No rounded corners */
    margin-left: calc(-50vw + 50%); /* Fix left side background visibility */
}

.event-summary-section .stats-filter,
.present-events-section .event-duo-grid,
.past-events-section > div,
.past-events-section .event-table {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.event-summary-section .stats-summary {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Title Section */
.title-section {
    height: calc(100vh - var(--nh-nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* Fully transparent to show background */
    padding: 0;
    margin: 0;
}

/* Event Summary Section */
.event-summary-section {
    background: rgba(13, 13, 13, 0.96);
}

/* Present Events Section */
.present-events-section {
    background: rgba(13, 13, 13, 0.96);
}

/* Past Events Section */
.past-events-section {
    background: rgba(13, 13, 13, 0.96);
    padding-bottom: 60px; /* Extra bottom padding for last section */
}

/* Legacy layout removal */
.main-grid { display: none; }
.left-panel { display: none; }
.right-panel { display: none; }

/* Override .nh-page padding for event records to prevent right-side gaps */
.nh-page {
    padding: calc(var(--nh-nav-h)) 0 0 0 !important;
    width: 100vw !important;
    max-width: none !important;
}

/* === TITLES === */
.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 6rem;
    font-weight: 400;
    text-align: center;
    margin: 0;
    color: #ffffff;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(255, 255, 255, 0.1);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0 20px;
}

.section-title {
    font-family: "Cinzel", serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 30px 0;
    text-align: center;
    color: #ffffff;
    letter-spacing: 1px;
}

.subsection-title {
    font-family: "Inter", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #ffffff;
    text-align: center;
}

/* === STATS SECTION === */
.stats-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 20px !important;
    gap: 20px;
}

.stats-filter select {
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Custom scrollbar for dropdowns */
.stats-filter select::-webkit-scrollbar {
    width: 8px;
}

.stats-filter select::-webkit-scrollbar-track {
    background: #2C2C2C;
    border-radius: 4px;
}

.stats-filter select::-webkit-scrollbar-thumb {
    background: #9F9F9F;
    border-radius: 4px;
}

.stats-filter select::-webkit-scrollbar-thumb:hover {
    background: #AFAFAF;
}

/* Firefox scrollbar for dropdowns */
.stats-filter select {
    scrollbar-width: thin;
    scrollbar-color: #9F9F9F #2C2C2C;
}

.stats-summary {
    display: flex;
    flex-direction: row;
    gap: 60px;
    align-items: stretch;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    flex: 0 0 400px;
}

.stat-card {
    background: rgba(26, 26, 26, 0.8);
    padding: 20px;
    text-align: center;
    border: 1px solid #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    background: rgba(30, 30, 30, 0.95);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.summary-charts {
    flex: 1;
    height: 300px;
}

.summary-charts canvas {
    width: 100% !important;
    height: 100% !important;
}

/* === PRESENT EVENTS SECTION === */
.event-duo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.event-subsection {
    background: rgba(26, 26, 26, 0.6);
    padding: 20px;
    border: 1px solid #333;
    border-radius: 8px;
}

/* === EVENT CARDS === */
.event-card-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-list-card {
    background: rgba(26, 26, 26, 0.8);
    padding: 20px;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.event-list-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: #666;
    background: rgba(30, 30, 30, 0.9);
}

/* === PAST EVENTS SECTION === */
.event-table {
    width: 100%;
    overflow-x: auto;
}

.event-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.event-table th,
.event-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
}

.event-table thead {
    background: #1a1a1a;
}

.event-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
    background: rgba(26, 26, 26, 0.6);
}

.event-table tbody tr:hover {
    background: rgba(42, 42, 42, 0.8);
    transform: translateX(2px);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}

.event-table tbody tr:nth-child(even) {
    background: rgba(20, 20, 20, 0.6);
}

.event-table th {
    background: #2a2a2a;
    border-bottom: 2px solid #444;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-size: 0.7rem;
    position: sticky;
    top: 0;
    z-index: 5;
    color: #fff;
}

.event-table th .btn {
    padding: 2px 4px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 0.7rem;
    vertical-align: middle;
    margin-left: 4px;
}

.event-table th .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: none;
    box-shadow: none;
}

/* Ensure table cells maintain proper width */
.event-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Adjust padding for better mobile display */
@media (max-width: 600px) {
    .event-table th,
    .event-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .event-table th .btn {
        padding: 1px 3px;
        font-size: 0.65rem;
    }
}

/* === RESPONSIVE === */
/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .page-title {
        font-size: 5rem;
        letter-spacing: 0.18em;
        padding: 0 30px;
    }
}

/* Medium tablets */
@media (max-width: 1000px) {
    .page-title {
        font-size: 4.5rem;
        letter-spacing: 0.16em;
        padding: 0 25px;
    }
}

@media (max-width: 900px) {
    .event-duo-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .stats-summary {
        flex-direction: column;
        gap: 30px;
    }
    
    .summary-cards {
        flex: none;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
    }
    
    .summary-charts {
        flex: none;
        width: 100%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 4rem;
        letter-spacing: 0.15em;
        padding: 0 20px;
    }
}

/* Small tablets and large phones */
@media (max-width: 750px) {
    .page-title {
        font-size: 3.5rem;
        letter-spacing: 0.12em;
        padding: 0 15px;
    }
}

@media (max-width: 600px) {
    .title-section {
        min-height: 60vh;
    }
    
    .title-section,
    .event-summary-section,
    .present-events-section,
    .past-events-section {
        padding: 30px 15px;
    }
    
    .page-title {
        font-size: 3rem;
        letter-spacing: 0.1em;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .subsection-title {
        font-size: 1.2rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .event-subsection {
        padding: 15px;
    }
    
    .event-summary-section .stats-filter,
    .event-summary-section .stats-summary,
    .present-events-section .event-duo-grid,
    .past-events-section > div,
    .past-events-section .event-table {
        padding: 0 15px !important;
    }
    
    /* Past Events mobile header fixes */
    .past-events-section > div[style*="display:flex"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }
    
    .past-events-section .section-title {
        margin-bottom: 0;
    }
    
    .past-events-section #sort-filter {
        font-size: 0.8rem !important;
        padding: 6px 8px !important;
        width: 100% !important;
        max-width: 200px;
    }
    
    /* Stats filter mobile improvements */
    .stats-filter {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats-filter label {
        font-size: 0.9rem;
        margin: 0 !important;
    }
    
    .stats-filter select {
        width: 100%;
        max-width: 200px;
        font-size: 0.85rem;
    }
    
    /* Filter chips mobile spacing */
    #active-filters {
        margin-bottom: 20px !important;
        padding: 10px 0;
    }
    
    .filter-chip {
        font-size: 0.75rem !important;
        padding: 3px 8px !important;
        margin: 2px !important;
    }
    
    /* Table mobile improvements */
    .event-table {
        margin-top: 15px;
    }
    
    .event-table table {
        font-size: 0.75rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 400px) {
    .page-title {
        font-size: 2.2rem;
        letter-spacing: 0.05em;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .past-events-section {
        padding: 20px 10px;
    }
    
    .past-events-section > div,
    .past-events-section .event-table {
        padding: 0 5px !important;
    }
    
    .event-summary-section .stats-filter,
    .present-events-section .event-duo-grid {
        padding: 0 5px !important;
    }
    
    #active-filters {
        margin-bottom: 25px !important;
        padding: 15px 0;
    }
    
    .filter-chip {
        font-size: 0.7rem !important;
        padding: 2px 6px !important;
        margin: 1px !important;
    }
    
    .event-table th,
    .event-table td {
        padding: 6px 4px !important;
        font-size: 0.7rem !important;
    }
    
    .btn {
        padding: 2px 4px !important;
        font-size: 0.6rem !important;
    }
}

/* === SCROLL ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}



.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Hide scrollbars during animations */
.event-subsection {
    overflow: hidden;
}

.event-card-grid {
    overflow: hidden;
}

.animate-on-scroll.animate-visible.animate-fade-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-on-scroll.animate-visible.animate-fade-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-on-scroll.animate-visible.animate-fade-right {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-on-scroll.animate-visible.animate-scale {
    animation: scaleIn 0.8s ease forwards;
}

.animate-on-scroll.animate-visible.animate-slide-down {
    animation: slideInDown 0.8s ease forwards;
}

.animate-on-scroll.animate-visible.animate-rotate {
    animation: rotateIn 0.8s ease forwards;
}

.animate-on-scroll.animate-visible.animate-bounce {
    animation: bounceIn 1s ease forwards;
}

.stagger-delay-1 { animation-delay: 0.1s; }
.stagger-delay-2 { animation-delay: 0.2s; }
.stagger-delay-3 { animation-delay: 0.3s; }
.stagger-delay-4 { animation-delay: 0.4s; }
.stagger-delay-5 { animation-delay: 0.5s; }
.stagger-delay-6 { animation-delay: 0.6s; }

/* === UTILITY CLASSES === */

/* Focus view for editing */
.focus-field {
    border-bottom: 1px solid #222;
    padding-bottom: 8px;
    display: block;
}

.focus-field:last-child { border-bottom: none; }
.focus-label { display: block; font-size: 0.8rem; color: #777; margin-bottom: 2px; }
.focus-value { font-size: 1rem; }

.focus-edit-input {
    width: 100%;
    padding: 8px 10px;
    margin-top: 3px;
    background: #1c1c1c;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
}

.focus-edit-input:focus {
    outline: 1px solid var(--nh-accent);
}

/* Buttons */
.btn {
    padding: 6px 12px;
    border: 1px solid #444;
    background: #1c1c1c;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn.primary {
    background: var(--nh-accent);
    border-color: var(--nh-accent);
    color: #000;
}

/* Loading spinner + empty states */
.loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    justify-content: center;
    color: #888;
    animation: fadeInUp 0.5s ease forwards;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: #777;
    font-style: italic;
}

/* Filter controls */
.filter-icon {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: background 0.2s, color 0.2s;
}

.filter-icon:hover {
    background: #333;
    color: var(--nh-accent);
}

.filter-icon.active {
    background: var(--nh-accent);
    color: #000;
}

.filter-dropdown {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    color: #eee;
}

.filter-option {
    padding: 6px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.filter-option:hover {
    background: #333;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 3px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.filter-chip.new-chip {
    animation: slideInDown 0.3s ease forwards;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.filter-chip .remove {
    margin-left: 4px;
    font-weight: 700;
    cursor: pointer;
}

/* Tier colors with subtle glow */
.tier-glow { font-weight: 600; }
.tier-low { color: #ff6b47; text-shadow: 0 0 2px #ff6b47; }
.tier-low-mid { color: #ffa726; text-shadow: 0 0 2px #ffa726; }
.tier-mid { color: #ffd700; text-shadow: 0 0 2px #ffd700; }
.tier-mid-high { color: #66bb6a; text-shadow: 0 0 2px #66bb6a; }
.tier-high { color: #42a5f5; text-shadow: 0 0 2px #42a5f5; }
.tier-mixed { color: #ab47bc; text-shadow: 0 0 2px #ab47bc; }
.tier-internal-session { color: #ec407a; text-shadow: 0 0 2px #ec407a; }

/* Outcome colors */
.outcome-glow { font-weight: 600; }
.outcome-win { color: #2ecc71; text-shadow: 0 0 3px #2ecc71; }
.outcome-loss { color: #e74c3c; text-shadow: 0 0 3px #e74c3c; }
.outcome-tie, .outcome-draw { color: #95a5a6; text-shadow: 0 0 2px #95a5a6; }

/* Event card content styling */
.event-list-card .card-opponent { 
    font-size: 1.3rem; 
    font-weight: 600; 
    color: #fff; 
    margin-bottom: 8px;
}

.event-list-card .card-date { 
    font-size: 1.1rem; 
    color: #fff; 
    font-weight: 500;
}

.event-list-card .card-meta { 
    font-size: 0.95rem; 
    color: #aaa; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin: 8px 0; 
}

.event-list-card .card-host { 
    font-size: 0.85rem; 
    color: #888; 
    margin-top: 8px; 
}

.event-list-card .date-wrap { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-end; 
}

.event-list-card .card-countdown { 
    font-size: 1rem; 
    color: #fff; 
    margin-top: 4px; 
    font-weight: 500;
}

/* Mobile table adjustments */
.mobile-hide {
    display: table-cell;
}

@media (max-width: 900px) {
    .mobile-hide {
        display: none;
    }
    
    .event-table th,
    .event-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
}

/* === EVENT DETAILS MODAL === */
.event-modal {
    height: 0; /* 0 height - change this with JavaScript */
    width: 100%; /* Full width */
    max-width: none; /* Remove max-width constraint */
    position: fixed; /* Stay in place */
    z-index: 9999; /* Stay on top */
    bottom: 0;
    left: 0; /* Changed from 50% */
    transform: none; /* Remove translateX */
    background: #0d0d0d;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.8);
    overflow-y: hidden; /* Disable vertical scroll when collapsed */
    transition: 0.4s; /* 0.4 second transition effect to slide up the modal */
    display: flex;
    flex-direction: column;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.modal-backdrop.modal-open {
    opacity: 1;
    visibility: visible;
}

.modal-handle {
    width: 60px;
    height: 5px;
    background: #555;
    border-radius: 3px;
    margin: 12px auto 0;
    cursor: pointer;
}

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
    position: relative;
}

.modal-title {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.modal-close:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-content {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #9F9F9F #2C2C2C;
}

.details-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* Give more space to event details for notes */
    gap: 48px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start; /* Align both columns to the top */
}

.event-details-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.players-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.notes-section {
    background: transparent;
    border-radius: 0;
    padding: 20px 0 0 0;
    border: none;
    border-top: 1px solid #333;
    margin-top: 20px;
}

.notes-label {
    color: #888;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
}

.notes-content {
    color: #ccc;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .modal-container {
        width: 95%;
        height: 75vh;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .modal-container {
        width: 100%;
        height: 80vh;
        border-radius: 16px 16px 0 0;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .details-grid {
        gap: 20px;
    }
    
    .event-details-section,
    .players-section {
        padding: 20px;
    }
}

.section-heading {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333;
    padding-bottom: 12px;
}

.event-details-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.event-details-table th {
    color: #888;
    font-weight: 500;
    text-align: left;
    padding: 12px 16px 12px 0;
    width: 140px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #222;
}

.event-details-table td {
    color: #ffffff;
    font-weight: 400;
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid #222;
}

.event-details-table tr:last-child th,
.event-details-table tr:last-child td {
    border-bottom: none;
}

/* Players List - Simple column list like the event details */
.players-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
}

.player-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid #222;
    border-radius: 0;
    padding: 12px 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

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

.player-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.player-item:hover {
    color: #42a5f5;
    background: transparent;
}

.loading-players {
    color: #888;
    text-align: left;
    padding: 12px 0;
    font-style: italic;
    display: none; /* Hide by default, show via JS */
}

/* Modal Content Scrollbar - Match main page styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #2C2C2C;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #9F9F9F;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #AFAFAF;
}



/* === MOBILE RESPONSIVE OPTIMIZATIONS === */
@media (max-width: 768px) {
    
    .event-modal {
        height: 0; /* Keep height-based animation */
        width: 100%;
        border-radius: 12px 12px 0 0; /* Smaller border radius */
    }
    
    .modal-header {
        padding: 16px 20px; /* Reduce padding */
    }
    
    .modal-title {
        font-size: 1.4rem; /* Smaller title */
    }
    
    .modal-close {
        right: 20px; /* Adjust close button position */
        font-size: 24px; /* Smaller close button */
        width: 28px;
        height: 28px;
    }
    
    .modal-content {
        padding: 20px; /* Reduce padding */
    }
    
    .details-grid {
        grid-template-columns: 1fr 1fr; /* Equal columns on mobile */
        gap: 24px; /* Reduce gap */
        max-width: none; /* Remove max-width constraint */
    }
    
    .notes-section {
        padding: 16px 0 0 0;
        margin-top: 16px;
    }
    
    .notes-label {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .notes-content {
        font-size: 0.85rem;
    }
    
    /* Event Details Table - Mobile */
    .event-details-table th {
        font-size: 0.8rem; /* Smaller label text */
        padding: 8px 12px 8px 0; /* Adjust padding */
        width: 100px; /* Reduce label width */
    }
    
    .event-details-table td {
        font-size: 0.9rem; /* Smaller value text */
        padding: 8px 0; /* Adjust padding */
    }
    
    /* Players List - Mobile */
    .player-item {
        font-size: 0.9rem; /* Smaller player text */
        padding: 10px 0; /* Reduce padding */
    }
    
    .loading-players {
        font-size: 0.85rem; /* Smaller loading text */
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    
    .modal-header {
        padding: 12px 16px; /* Further reduce padding */
    }
    
    .modal-title {
        font-size: 1.2rem; /* Even smaller title */
    }
    
    .modal-close {
        right: 16px;
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    
    .modal-content {
        padding: 16px; /* Minimal padding */
    }
    
    .details-grid {
        gap: 20px; /* Minimal gap */
    }
    
    .notes-section {
        padding: 12px 0 0 0;
        margin-top: 12px;
    }
    
    .notes-label {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .notes-content {
        font-size: 0.8rem;
    }
    
    /* Very small screens - compact everything */
    .event-details-table th {
        font-size: 0.75rem;
        padding: 6px 8px 6px 0;
        width: 80px; /* Very compact labels */
    }
    
    .event-details-table td {
        font-size: 0.85rem;
        padding: 6px 0;
    }
    
    .player-item {
        font-size: 0.85rem;
        padding: 8px 0;
    }
    
    .loading-players {
        font-size: 0.8rem;
        padding: 8px 0;
    }
}

/* Landscape phones - adjust modal height */
@media (max-width: 768px) and (orientation: landscape) {
    .event-modal[style*="height: 70vh"] {
        /* On landscape phones, use more of the screen */
        height: 80vh !important;
    }
}


