/* Variables (Matching News Page) */
:root {
    --card-bg: #1e293b; /* Slate 800 */
    --body-bg: #0f172a; /* Slate 900 */
    --accent: #3b82f6;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    background-color: var(--body-bg);
}

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

/* --- Main Layout --- */
.sports-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.column-chat { flex: 0 0 300px; } /* Fixed width left */
.column-matches { flex: 1; } /* Grow to fill middle */
.column-sponsors { flex: 0 0 200px; } /* Fixed width right */

/* --- Common Component Styles --- */
.section-title {
    font-family: 'Oswald', sans-serif;
    color: var(--text-white);
    font-size: 20px;
    margin-top: 0;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* --- Chat Column --- */
.chat-wrapper {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Social Buttons */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.social-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: transform 0.2s;
    background-color: #334155;
    text-decoration: none;
}

.social-btn:hover { transform: translateY(-3px); }
.social-btn.facebook { background: #1877F2; }
.social-btn.messenger { background: #00B2FF; }
.social-btn.telegram { background: #0088cc; }
.social-btn.twitter { background: #1DA1F2; }
.social-btn.discord { background: #5865F2; }

/* --- Matches Column --- */
.date-header {
    text-align: center;
    font-family: 'Oswald', sans-serif;
    color: var(--text-white);
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    padding: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    text-shadow: 1px 1px 2px black;
}

.competition-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #334155;
    padding: 8px 15px;
    border-radius: 8px 8px 0 0;
    width: fit-content;
    margin-bottom: -1px; /* Connect to card */
    position: relative;
    z-index: 1;
}

.competition-header img { width: 25px; height: 25px; }
.competition-header span { 
    font-family: 'Oswald', sans-serif; 
    font-weight: 500;
    letter-spacing: 1px;
}

/* The Match Card */
.match-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0 12px 12px 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.team img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.team-name {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.match-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.time-badge {
    background: var(--accent);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.vs {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: bold;
}

/* Stream Buttons */
.stream-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-stream {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-stream:hover {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

/* Iframe Area */
.iframe-wrapper {
    margin-top: 15px;
    display: none; /* Hidden by default */
    background: black;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.iframe-wrapper.active {
    display: block;
    animation: fadeIn 0.5s;
}

.frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close-iframe {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.close-iframe:hover { background: #ff0000; }

/* Other Sites */
.other-sites {
    text-align: center;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 40px;
}

.other-sites h3 {
    margin-top: 0;
    color: var(--text-muted);
}

.sites-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.btn-site {
    background: #334155;
    color: #cbd5e1;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.btn-site:hover {
    background: var(--text-white);
    color: var(--body-bg);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 20px;
}

/* --- Sponsors Column --- */
.sponsor-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sponsor-list img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.sponsor-list img:hover {
    transform: scale(1.03);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .sports-layout {
        flex-direction: column;
        align-items: center;
    }

    .column-chat, .column-matches, .column-sponsors {
        width: 100%;
        flex: none;
        max-width: 600px;
    }

    /* Reorder for mobile: Schedule first, then Chat, then Sponsors */
    .column-matches { order: 1; }
    .column-chat { order: 2; }
    .column-sponsors { order: 3; }
}

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

/* Alert Popup */
#popup-box {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.popup-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--accent);
}
.popup-content button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}