/* --- General Reset & Defaults --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    background-color: #f0f2f5; /* Light grey background */
    color: #333;
    font-size: 16px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #1a73e8; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #0c5ab3; text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin-bottom: 0.75em; line-height: 1.3; color: #1c1e21; /* Darker text for headings */ }
h1 { font-size: 2.2em; }
h2 { font-size: 1.8em; border-bottom: 1px solid #ddd; padding-bottom: 0.3em; }
h3 { font-size: 1.4em; }
p { margin-bottom: 1em; }

/* --- Utility Classes --- */
.text-center { text-align: center; }
.icon-star { color: #fbbc05; } /* Gold star */
.sr-only { /* Screen reader only */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* --- Header --- */
.site-header {
    background: #3b5998; /* Facebook blue-like */
    color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-header .logo h1 { margin-bottom: 0; font-size: 1.6em; }
.site-header .logo h1 a { color: #fff; text-decoration: none; font-weight: bold; }
.site-header .tagline { font-size: 0.8em; opacity: 0.8; margin-bottom: 0; margin-top: -5px;}
.main-nav ul { list-style: none; display: flex; gap: 20px; }
.main-nav ul li a { color: #fff; text-decoration: none; font-weight: 500; padding: 5px 0; transition: opacity 0.2s ease; }
.main-nav ul li a:hover, .main-nav ul li a.active { opacity: 0.8; border-bottom: 2px solid #fff; }
#mobile-menu-toggle { display: none; background: none; border: none; color: white; font-size: 1.8em; cursor: pointer; }

.site-header.simple { text-align: center; background: #444; padding: 15px 0; }
.site-header.simple .logo-simple a { color: #fff; font-size: 1.5em; text-decoration: none; font-weight: bold;}
.match-header-title { font-size: 1em; opacity: 0.9; margin-top: 5px; }


/* --- Main Content --- */
.main-content { padding-top: 20px; }
.section-title { margin-bottom: 20px; font-weight: 600; display: flex; align-items: center; gap: 8px;}

/* --- Ad Containers --- */
.ad-container {
    margin: 25px auto;
    padding: 10px;
    text-align: center;
    min-height: 50px;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevent ad overflow */
}
.ad-placeholder {
    border: 1px dashed #ccc;
    padding: 15px 20px;
    color: #999;
    font-style: italic;
    font-size: 0.9em;
    display: inline-block;
}
/* Ensure Adsense resizes correctly */
.ad-container ins.adsbygoogle { background: transparent !important; }


/* --- Match Lists (Homepage) --- */
.match-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.match-item {
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative; /* For overlay link */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    overflow: hidden; /* Prevent content bleed */
}
.match-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.match-link-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1; /* Below other interactive elements if needed */
    /* No background needed, just covers the area */
}

.match-item .match-time {
    text-align: center;
    flex: 0 0 100px; /* Fixed width */
    font-size: 0.95em;
    color: #555;
    padding-right: 15px;
    border-right: 1px solid #eee;
}
.match-item .match-time .time { font-weight: bold; display: block; font-size: 1.2em; color: #333; margin-bottom: 2px; }
.match-item .match-time .timezone { font-size: 0.8em; color: #777; display: block; margin-bottom: 4px;}
.match-item .match-time .status {
    font-size: 0.8em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block; /* Fit content */
}
.match-item .match-time .status.scheduled { color: #606770; background-color: #e4e6eb; }
.match-item .match-time .status.live { color: #fff; background-color: #fa383e; /* Bright Red */ animation: blink 1.5s infinite alternate; }
.match-item .match-time .status.finished { color: #fff; background-color: #6c757d; /* Grey */ }
.match-item .match-time .status.postponed,
.match-item .match-time .status.cancelled { color: #fff; background-color: #ffc107; /* Warning Yellow */ }


.match-item .match-details { flex-grow: 1; }
.match-item .match-details .league { display: block; font-size: 0.85em; color: #666; margin-bottom: 4px; font-weight: 500;}
.match-item .match-details .title {
    font-weight: 600;
    display: block;
    font-size: 1.1em;
    margin-bottom: 3px;
    color: #050505;
}
.match-item .match-details .teams { font-size: 0.9em; color: #444; }


.match-item .watch-cta {
    font-size: 1.3em;
    color: #1a73e8;
    margin-left: auto; /* Pushes it to the right */
    padding-left: 15px;
     z-index: 2; /* Ensure clickable over overlay */
    position: relative;
}
.match-item .watch-cta .watch-icon { font-weight: bold; }


@keyframes blink {
  0% { opacity: 1; }
  100% { opacity: 0.6; }
}


/* Featured Matches Specific Styles */
.featured-matches-section {
    background: linear-gradient(135deg, #fffaf0, #fff5e6); /* Soft gradient */
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #ffe8cc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.featured-matches-section .section-title { color: #c46c00; border-bottom-color: #f5e4cb; }
.match-list.featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; } /* Grid layout */
.featured-item {
    flex-direction: column; /* Stack items vertically inside */
    align-items: center; /* Center align content */
    text-align: center;
    gap: 10px;
    padding: 20px 15px;
}
.featured-item .match-time { border-right: none; padding-right: 0; flex-basis: auto; margin-bottom: 5px; font-size: 0.9em;}
.featured-item .match-details { margin-bottom: 10px; }
.featured-item .watch-cta { display: none; } /* Hide default icon */
.featured-item .watch-now-btn {
    background: #e67e22; /* Orange */
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    display: inline-block;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.2s ease;
     z-index: 2; /* Ensure clickable */
     position: relative;
}
.featured-item:hover .watch-now-btn { background: #d35400; }

/* Notices */
.no-matches-notice, .info-notice {
    background-color: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    color: #555;
}
.no-matches-notice p { margin-bottom: 10px; }

/* --- Match Player Page --- */
.match-page { padding-top: 20px; }
.match-main-info { text-align: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee;}
h1.match-title-main { font-size: 2em; color: #2c3e50; margin-bottom: 8px;}
.match-page p.match-time-details { font-size: 0.95em; color: #555; }
.match-page p.match-time-details .league { font-weight: bold; color: #333;}
.match-page p.match-time-details .status { text-transform: uppercase; font-weight: bold; padding: 2px 5px; border-radius: 3px; display: inline-block; }
.match-page p.match-time-details .status.live { color: #fff; background-color: #fa383e; animation: blink 1.5s infinite alternate; }
.match-page p.match-time-details .status.scheduled { color: #606770; background-color: #e4e6eb; }
.match-page p.match-time-details .status.finished { color: #fff; background-color: #6c757d; }
.match-page p.match-time-details .status.postponed,
.match-page p.match-time-details .status.cancelled { color: #fff; background-color: #ffc107; }

/* Stream Actions (Buttons below title) */
.stream-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
.stream-actions .button {
    display: inline-flex; /* Align icon and text */
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 25px; /* Pill shape */
    color: white !important; /* Force white text */
    text-decoration: none;
    font-size: 0.95em;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: 500;
}
.stream-actions .button:hover { transform: scale(1.05); }
.stream-actions .button i { /* Assuming FontAwesome or similar icon font */ line-height: 1; font-size: 1.1em; }

.telegram-button { background-color: #0088cc; }
.telegram-button:hover { background-color: #007ab8; }
.whatsapp-button { background-color: #25D366; }
.whatsapp-button:hover { background-color: #1ebe58; }
.share-button { background-color: #6c757d; } /* Grey */
.share-button:hover { background-color: #5a6268; }
.fullscreen-button { background-color: #343a40; } /* Dark */
.fullscreen-button:hover { background-color: #23272b; }


/* Player Section */
.player-section {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0; /* Collapses height, padding gives it dimension */
    background: #000;
    margin-bottom: 20px;
    overflow: hidden; /* Crucial for aspect ratio padding */
    border-radius: 8px;
}
.player-section.is-fullscreen { /* Style when native fullscreen */
    padding-bottom: 0 !important; /* Reset padding */
    height: 100% !important;
    width: 100% !important;
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    border-radius: 0; /* Remove border radius in fullscreen */
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* Remove border from iframe/player */
}
.player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ccc;
    background-color: rgba(10, 10, 10, 0.9);
    font-size: 1.1em;
    padding: 20px;
    text-align: center;
    line-height: 1.5;
}
.player-placeholder p { margin-bottom: 10px;}
.player-error { /* Style for error messages inside player area */
     position: absolute; top: 0; left: 0; width: 100%; height: 100%;
     display: flex; justify-content: center; align-items: center;
     background: #220000; color: #ffaaaa; padding: 20px; text-align: center; font-size: 1.1em;
}

/* Channel Selection */
.channel-selection {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}
.channel-selection h2 { margin-bottom: 10px; font-size: 1.3em; text-align: center; }
.channel-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center; /* Center buttons */
}
.channel-instruction { font-size: 0.9em; color: #666; text-align: center; margin-bottom: 15px; }
.channel-button {
    background-color: #f0f2f5;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-size: 0.95em;
    font-weight: 500;
    color: #333;
}
.channel-button:hover { background-color: #e9ecef; border-color: #adb5bd; }
.channel-button.active {
    background-color: #1a73e8;
    color: white;
    border-color: #0c5ab3;
    font-weight: bold;
}

.stream-status-message { /* Status message below player/channels */
    text-align: center;
    margin: 10px 0;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #e9ecef;
    color: #495057;
}
.stream-status-message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.no-channels-notice {
    background-color: #fff3cd; /* Light yellow */
    border: 1px solid #ffeeba;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #856404; /* Dark yellow/brown text */
}
.no-channels-notice p { margin-bottom: 10px; }
.back-home-button { margin-top: 15px; display: inline-block; background: #6c757d; color: white; padding: 8px 15px; border-radius: 5px; text-decoration: none;}


/* Match Extra Info Section */
.match-extra-info {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-top: 25px;
    font-size: 0.95em;
    color: #444;
}
.match-extra-info h3 { margin-bottom: 10px; font-size: 1.2em; }


/* --- Footer --- */
.site-footer {
    background: #333;
    color: #ccc;
    text-align: center;
    padding: 25px 0;
    margin-top: 30px;
    font-size: 0.9em;
}
.site-footer p { margin-bottom: 8px; }
.footer-nav ul { list-style: none; padding: 0; margin-bottom: 15px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.footer-nav ul li a { color: #bbb; text-decoration: none; }
.footer-nav ul li a:hover { color: #fff; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .container { max-width: 960px; }
    .match-list.featured { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media (max-width: 768px) {
    .container { padding: 0 10px; }
    .site-header .container { flex-wrap: wrap; } /* Allow wrapping */
    .main-nav { order: 3; width: 100%; display: none; /* Initially hide */ }
    .main-nav.is-active { display: block; /* Show when active */ margin-top: 10px; }
    .main-nav ul { flex-direction: column; gap: 5px; text-align: center; }
    .main-nav ul li a { display: block; padding: 10px; border-bottom: 1px solid #4a69ad; }
    .main-nav ul li a:hover, .main-nav ul li a.active { border-bottom: 1px solid #fff; background: rgba(255,255,255,0.1); }
    #mobile-menu-toggle { display: block; margin-left: auto; /* Push to right */ }

    .match-item { flex-direction: column; align-items: flex-start; text-align: left; gap: 10px; }
    .match-item .match-time { border-right: none; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 10px; text-align: left; flex-basis: auto; width: 100%;}
    .match-item .match-details { width: 100%; }
    .match-item .watch-cta { align-self: flex-end; /* Bottom right corner */ margin-top: -35px; /* Adjust position */ }
    .featured-item .watch-cta { display: none; }
    .featured-item .watch-now-btn { margin-top: 15px; }

    h1 { font-size: 1.8em; }
    h1.match-title-main { font-size: 1.6em; }
    h2 { font-size: 1.5em; }

    .stream-actions { gap: 8px; }
    .stream-actions .button { padding: 8px 15px; font-size: 0.9em; }
}

@media (max-width: 480px) {
    body { font-size: 15px; }
    .site-header .logo h1 a { font-size: 1.3em; }
    .site-header .tagline { font-size: 0.7em; }

    .match-item .match-details .title { font-size: 1em; }
    .featured-item .watch-now-btn { font-size: 0.85em; padding: 7px 15px; }
    .match-list.featured { grid-template-columns: 1fr; } /* Single column */

    h1.match-title-main { font-size: 1.4em; }
    .stream-actions .button { padding: 7px 12px; font-size: 0.85em; gap: 4px;}
    .stream-actions .button i { font-size: 1em;}

    .player-placeholder { font-size: 1em; }
    .channel-button { font-size: 0.9em; padding: 8px 12px; }
    .footer-nav ul { gap: 10px; }
}