/* --- GLOBAL & TYPOGRAPHY --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff; /* White background */
    color: #111827; /* Near black text */
    min-height: 100vh;
    margin: 0;
    padding: 6rem 0;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* --- RESPONSIVE TYPOGRAPHY --- */
html {
    font-size: 100%; /* 16px by default */
}

/* Base font size for mobile - made smaller */
body {
    font-size: 0.8125rem; /* 13px (reduced from 14px) */
    line-height: 1.5;
}

/* Small mobile devices */
@media (max-width: 359px) {
    body {
        font-size: 0.75rem; /* 12px for very small devices */
    }
}

/* Tablet and larger */
@media (min-width: 640px) {
    body {
        font-size: 0.875rem; /* 14px (reduced from 15px) */
    }
}

/* Desktop */
@media (min-width: 1024px) {
    body {
        font-size: 0.9375rem; /* 15px (reduced from 16px) */
    }
}

/* Larger screens */
@media (min-width: 1280px) {
    body {
        font-size: 1rem; /* 16px (reduced from 17px) */
    }
}

/* Adjust heading sizes for better mobile readability */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

/* Smaller heading sizes for mobile */
h1 { font-size: 1.5rem; }   /* 24px (reduced from 28px) */
h2 { font-size: 1.25rem; }  /* 20px (reduced from 24px) */
h3 { font-size: 1.125rem; } /* 18px (reduced from 20px) */
h4 { font-size: 1rem; }     /* 16px (reduced from 18px) */

/* Tablet and up */
@media (min-width: 640px) {
    h1 { font-size: 1.75rem; }  /* 28px */
    h2 { font-size: 1.5rem; }   /* 24px */
    h3 { font-size: 1.25rem; }  /* 20px */
    h4 { font-size: 1.125rem; } /* 18px */
}

/* Desktop */
@media (min-width: 1024px) {
    h1 { font-size: 2rem; }     /* 32px */
    h2 { font-size: 1.75rem; }  /* 28px */
    h3 { font-size: 1.5rem; }   /* 24px */
    h4 { font-size: 1.25rem; }  /* 20px */
}

/* --- MODERN MATCH CARD STYLES --- */
.match-card {
    background: #ffffff;
    border: 1px solid #e5e7eb; /* Light gray border */
    border-radius: 0.75rem; /* Slightly smaller radius */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}
.match-card:hover {
    border-color: #111827; /* Black border on hover */
    box-shadow: 0 4px 12px -3px rgba(0,0,0,0.07);
}
.match-card-header {
    border-bottom: 1px solid #f3f4f6; /* Very light gray separator */
}
.match-card-body {
    padding: 1.5rem;
}
.team-indicator {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    flex-shrink: 0;
}
.live-badge {
    background-color: #111827; /* Black background */
    color: #ffffff; /* White text */
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* --- SERVER BUTTONS & CONTAINER --- */
.servers-container {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-in-out;
}
.servers-container > div {
    overflow: hidden;
}
.servers-container.show {
    grid-template-rows: 1fr;
}
.stream-button {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    font-weight: 500;
    transition: all 0.2s ease;
}
.stream-button:hover {
    background-color: #111827;
    border-color: #111827;
    color: #ffffff;
}
.no-streams {
    color: #6b7280;
    font-style: italic;
}
.copy-button {
    background: transparent;
    color: #9ca3af; /* Lighter gray icon */
    border-radius: 6px;
    padding: 0.35rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.copy-button:hover {
    color: #111827; /* Black icon on hover */
}

/* --- SKELETON LOADER STYLES --- */
@keyframes skeleton-pulse { 50% { opacity: 0.6; } }
.skeleton-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    animation: skeleton-pulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.skeleton-line {
    background-color: #f3f4f6; /* Lighter skeleton color */
    border-radius: 6px;
}

/* --- NAVBAR STYLES --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 40;
    min-height: 5rem;
    display: flex;
    align-items: center;
}
.navbar .container {
    padding-top: 0;
    padding-bottom: 0;
}
.nav-tab {
    display: inline-block;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    background: transparent;
    text-decoration: none;
    color: #6b7280; /* Gray for inactive tabs */
}
.nav-tab.active {
    background: #111827; /* Black */
    color: #ffffff; /* White */
}
.nav-tab:not(.active):hover {
    color: #111827; /* Black */
}
.nav-icon-button {
    padding: 0.5rem;
    border-radius: 9999px;
    color: #6b7280;
    transition: all 0.2s ease;
}
.nav-icon-button:hover {
    color: #111827;
    background-color: #f3f4f6;
}


/* --- SEARCH & OTHER STYLES --- */
.search-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    z-index: 38;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
.search-container.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.search-input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #ffffff;
    font-size: 1rem;
}
.search-input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); /* Darker backdrop */
    z-index: 50;
    justify-content: center;
    align-items: center;
}
.modal.show { display: flex; }
.modal-content {
    background: #111827; /* Black modal content area */
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    padding: 0.5rem; /* Padding to frame the iframe */
    position: relative;
}
.modal-iframe { width: 100%; height: 450px; border: none; border-radius: 6px; }
.close-button {
    position: absolute;
    top: -1.25rem;
    right: -1.25rem;
    background: #ffffff;
    color: #1f2937;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 1.25rem;
}
.close-button:hover {
    transform: scale(1.1);
}
.scroll-top-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: none;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.scroll-top-button.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}
.scroll-top-button:hover {
    background: #374151;
    transform: scale(1.05);
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.hamburger-menu { display: none; z-index: 41; }
.hamburger-menu.open .hamburger-icon { display: none; }
.hamburger-menu.open .close-icon { display: block; }
.hamburger-menu .close-icon { display: none; }

@media (max-width: 768px) {
    body { padding-top: 5rem; }
    .nav-items { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: #ffffff; border-top: 1px solid #e5e7eb; flex-direction: column; align-items: stretch; padding: 1rem; gap: 0.5rem; opacity: 0; transform: translateY(-10px); transition: opacity 0.3s ease, transform 0.3s ease; }
    .nav-items.show { display: flex; opacity: 1; transform: translateY(0); }
    .hamburger-menu { display: block; z-index: 41; }
}
