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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 10px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* --- HEADER --- */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease-in-out;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 5px;
}

/* --- VIEW TOGGLE BUTTONS --- */
.view-toggles {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
}

.view-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: #e9ecef;
    color: #495057;
    font-weight: 700;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* --- FILTERS --- */
.filters {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
}

/* --- MATCH CARD & LOGO STYLING --- */
.events {
    padding: 30px;
    min-height: 400px;
}

.event-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.event-card.live-event {
    border-left: 5px solid #ff4444;
    background: #fffafa;
}

.event-card:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

/* Image Containers */
.match-info-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.league-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid #eee;
}

.teams-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 700;
    color: #2d3436;
    flex-wrap: wrap;
}

.team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.vs-text {
    color: #b2bec3;
    font-size: 0.8em;
    margin: 0 5px;
}

.tournament-name {
    color: #636e72;
    font-size: 0.9em;
    margin-top: 4px;
}

/* --- BADGES --- */
.live-badge {
    padding: 4px 10px;
    background: #ff4444;
    color: white;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 800;
    animation: pulse 1.5s infinite;
}

.sport-badge {
    padding: 6px 14px;
    background: #667eea;
    color: white;
    border-radius: 50px;
    font-size: 0.8em;
    font-weight: 600;
}

.time-badge {
    padding: 6px 14px;
    background: #28a745;
    color: white;
    border-radius: 50px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 5px;
}

/* --- CHANNELS GRID --- */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.channel-big {
    height: 80px;
    font-weight: 700;
    font-size: 1.1em !important;
    text-align: center;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.channel-big:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

/* --- PLAYER SECTION --- */
.player-section {
    background: #000;
}

.player-header {
    background: #212529;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.close-player-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.player-wrapper {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.main-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- BUTTONS IN CARDS --- */
.channel-link {
    display: inline-block;
    padding: 10px 18px;
    background: #f1f3f5;
    border: 1px solid #ced4da;
    border-radius: 6px;
    color: #212529;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
    margin-top: 8px;
}

.channel-link:hover, .channel-link.active {
    background: #764ba2;
    color: white;
    border-color: #764ba2;
}

/* --- STATS BAR --- */
.stats {
    background: #f8f9fa;
    padding: 20px;
    display: flex;
    justify-content: center;
    border-top: 1px solid #dee2e6;
}

.stat-item {
    text-align: center;
    padding: 0 40px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #764ba2;
}

/* --- ANIMATIONS --- */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .filters { padding: 15px; }
    .filter-group { min-width: 100%; }
    .view-toggles { flex-direction: column; }
    .header h1 { font-size: 1.5em; }
    .teams-display { font-size: 1em; }
    .league-logo { width: 30px; height: 30px; }
    .team-logo { width: 22px; height: 22px; }
}


/* --- SOCIAL BUTTONS --- */
.social-buttons-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
}

.social-button {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-align: center;
    min-width: 120px;
}

.social-button.telegram-button {
    background: #26a5de;
}

.social-button.telegram-button:hover {
    background: #1b7fae;
}

.social-button.whatsapp-button {
    background: #25d366;
}

.social-button.whatsapp-button:hover {
    background: #1da851;
}

/* --- CHAT IFRAME --- */
.chat-container {
    margin-top: 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
}

.chat-iframe {
    width: 100%;
    height: 250px; /* slightly taller for better visibility */
    border: none;
}
