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

body {
    background-color: #050505;
    color: #ffffff;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.bottom-space { flex-grow: 1; width: 100%; margin-top: 20px; }

.floating-telegram {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #29a9eb;
    color: white;
    border-radius: 30px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}
.floating-telegram:hover {
    transform: scale(1.05);
    color: white;
}
.floating-telegram img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
}

.telegram-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.telegram-popup-overlay.show {
    visibility: visible;
    opacity: 1;
}
.telegram-popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    font-family: 'Poppins', sans-serif;
}
.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    transition: color 0.3s ease;
}
.close-popup:hover {
    color: #ff0000;
}
.popup-telegram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #29a9eb;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}
.popup-telegram-btn img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}
.popup-telegram-btn:hover {
    background-color: #208bc2;
    color: white;
}

#ad_layer_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
}

.container { width: 95%; user-select: none; overflow: hidden; max-width: 1000px; border-radius: 12px; background: #000; aspect-ratio: 16 / 9; position: relative; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7); }
.container iframe { width: 100%; height: 100%; border: none; outline: none; }

.main-wrapper {
    max-width: 1000px;
    width: 100%;
    padding: 0 20px;
}

.top-banner {
    border: 2px solid #ff0022;
    border-radius: 8px;
    color: #ff0022;
    text-align: center;
    padding: 10px 30px;
    font-weight: bold;
    letter-spacing: 5px;
    width: max-content;
    margin: 0 auto 30px auto;
    font-size: 14px;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.live-now {
    color: #ff0022;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.live-now .dot {
    width: 8px;
    height: 8px;
    background-color: #ff0022;
    border-radius: 50%;
    animation: liveBlink 1.5s infinite;
}

@keyframes liveBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-family: 'Impact', sans-serif;
    font-size: 90px;
    margin: 0;
    letter-spacing: 2px;
    color: #f5f5f5;
    line-height: 1;
}

.hero p {
    color: #ccc;
    font-size: 18px;
    margin-top: 10px;
}

.hero .underline {
    width: 60px;
    height: 3px;
    background-color: #ff0022;
    margin: 15px auto 0 auto;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background-color: #ff0022;
    flex-shrink: 0;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.match-card {
    background-color: #0a0a0a;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: border-color 0.3s ease;
}

.match-card:hover {
    border-color: #444;
}

.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.badge.live {
    background-color: #ff0022;
    color: white;
}

.badge.upcoming {
    border: 1px solid #888;
    color: #888;
}

.teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}

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

.team .flag {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #333;
    border: 2px solid #444;
}

.team-name {
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    color: #fff;
}

.vs {
    font-weight: bold;
    font-size: 16px;
    color: #888;
}

.match-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: #ff0022;
    font-size: 13px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #222;
}

.match-info span {
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.match-info i {
    color: #ff0022;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 50px;
}

.channel-card {
    background-color: #0a0a0a;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.channel-card:hover {
    border-color: #555;
}

.channel-card.active {
    border-color: #ff0022;
    box-shadow: 0 0 15px rgba(255, 0, 34, 0.2);
}

.channel-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
}

.channel-name {
    font-size: 12px;
    color: #888;
    text-align: center;
    line-height: 1.3;
}

.show-more-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 10px 0 30px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ff0022;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.show-more-btn:hover {
    border-color: #ff0022;
    background: rgba(255, 0, 34, 0.08);
}

/* Scoreboard wrapper (kept for backward compat, repurposed) */
.scoreboard-wrapper {
    width: 100%;
    margin: 25px 0;
}

@media screen and (max-width: 768px) {
    .hero h1 { font-size: 50px; }
    .top-banner { font-size: 11px; padding: 8px 20px; }
    .matches-grid { grid-template-columns: 1fr; }
    .channels-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
    .channel-card img { width: 40px; height: 40px; }
    .main-wrapper { padding: 0 12px; }
}

@media screen and (max-width: 540px) {
    .hero h1 { font-size: 36px; }
    .team .flag { width: 45px; height: 45px; }
    .match-card { padding: 15px; }
}
