/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: #0f0f23;
    color: #ffffff;
    padding-bottom: 70px;
    min-height: 100vh;
}
a { color: #e94560; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.header {
    background: #1a1a2e;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2a2a4a;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-logo {
    font-size: 20px;
    font-weight: 700;
    color: #e94560;
    letter-spacing: -0.5px;
}
.header-logo span { color: #ffffff; }
.header-logo .logo-blue { color: #00d4ff; }
.hamburger {
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    background: none;
    border: none;
    padding: 4px 8px;
}
.hamburger:hover { color: #e94560; }

/* ===== TOP BAR (mobile‑friendly) ===== */
.top-bar {
    background: #14142b;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;                /* reduced from 16px */
    border-bottom: 1px solid #2a2a4a;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
}
.top-bar::-webkit-scrollbar { height: 0; }

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 3px;                /* reduced from 5px */
    color: #8888aa;
    font-size: 13px;         /* reduced from 14px */
    cursor: pointer;
    padding: 4px 4px;        /* reduced from 4px 0 */
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;          /* prevents items from shrinking */
}
.top-bar-item:hover { color: #ffffff; }
.top-bar-item.active {
    color: #ffffff;
    border-bottom-color: #e94560;
}
.top-bar-item .icon { font-size: 14px; }  /* slightly smaller */

.tz-select {
    background: #1a1a2e;
    color: #ffffff;
    border: 1px solid #2a2a4a;
    border-radius: 4px;
    padding: 2px 4px;        /* reduced padding */
    font-size: 12px;         /* smaller font */
    cursor: pointer;
    outline: none;
    max-width: 70px;         /* limits width so it doesn't push others */
}
.tz-select:hover { border-color: #e94560; }

/* ===== DATE NAVIGATION ===== */
.date-nav {
    background: #14142b;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2a2a4a;
}
.date-nav-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.date-nav-left .live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 8px;
    border-radius: 16px;
    background: rgba(233, 69, 96, 0.15);
    color: #ff4d4d;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.3s, border 0.3s;
}
.date-nav-left .live-badge.active {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid #00d4ff;
}
.date-nav-left .live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff4d4d;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}
.date-nav-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.date-nav-center .nav-arrow {
    background: none;
    border: none;
    color: #8888aa;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}
.date-nav-center .nav-arrow:hover {
    background: #2a2a4a;
    color: #ffffff;
}
.date-nav-center .date-label {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    min-width: 120px;
    text-align: center;
}
.date-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.date-nav-right .calendar-btn {
    background: none;
    border: none;
    color: #8888aa;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}
.date-nav-right .calendar-btn:hover {
    background: #2a2a4a;
    color: #ffffff;
}
#datePickerInput { display: none; }

/* ===== COMPETITION SECTION ===== */
.competition {
    margin: 12px 16px;
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #2a2a4a;
}
.competition-header {
    padding: 10px 14px;
    background: #2a2a4a;
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.competition-header .arrow {
    margin-left: auto;
    transition: transform 0.2s;
    color: #8888aa;
}
.competition-header .arrow.open { transform: rotate(180deg); }

/* ===== MATCH CARD (two-row with separator) ===== */
.match-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.match-card-link:hover .match-card {
    background: #1a1a2e;
}

.match-card {
    padding: 8px 14px;
    border-bottom: 1px solid #2a2a4a;
    transition: background 0.15s;
}
.match-card:last-child { border-bottom: none; }

.match-row {
    display: flex;
    align-items: center;
    padding: 3px 0;
    font-size: 14px;
    gap: 8px;
}

.match-col-left {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.match-col-left .status-time {
    font-size: 12px;
    color: #8888aa;
    font-weight: 500;
    white-space: nowrap;
}
.match-col-left .status-time.live {
    color: #ff4d4d;
    animation: blink 1.5s ease-in-out infinite; /* NEW: blink animation for live */
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.match-col-left .status-time.ft { color: #4ecdc4; }
.match-col-left .status-time.upcoming { color: #f0ad4e; }

.match-col-left .fav-icon {
    font-size: 14px;
    color: #8888aa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.match-col-left .fav-icon:hover { color: #ffd700; }
.match-col-left .fav-icon.faved { color: #ffd700; }

.match-col-middle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.match-col-middle .team-logo {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: contain;
    background: #0f0f23;
}
.match-col-middle .team-name {
    min-width: 0;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-col-right {
    flex: 0 0 40px;
    text-align: right;
}
.match-col-right .score {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
}
.match-col-right .score.live-score { color: #ffd700; }

.match-separator {
    height: 1px;
    background: #2a2a4a;
    opacity: 0.3;
    margin: 2px 0 2px 48px;
}

.match-card-link,
.match-card-link * {
    text-decoration: none !important;
}
.match-card-link:hover,
.match-card-link:hover * {
    text-decoration: none !important;
}

/* ===== ADS ===== */
.ad-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 16px;
    padding: 16px;
    background: #14142b;
    border: 1px dashed #2a2a4a;
    border-radius: 8px;
    min-height: 80px;
    color: #555577;
    font-size: 13px;
}
.ad-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f0f23;
    border-top: 1px solid #2a2a4a;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    min-height: 50px;
    color: #555577;
    font-size: 12px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #555577;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { color: #8888aa; margin-bottom: 4px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    body { padding: 0 40px 80px 40px; max-width: 900px; margin: 0 auto; }
    .header { padding: 16px 24px; }
    .top-bar { padding: 10px 24px; gap: 24px; }
    .date-nav { padding: 12px 24px; }
    .competition { margin: 16px 0; }
    .match-col-left { flex: 0 0 56px; }
    .match-col-middle .team-logo { width: 24px; height: 24px; }
    .match-col-right .score { font-size: 17px; }
    .match-separator { margin-left: 56px; }
    .ad-inline { margin: 20px 0; min-height: 100px; }
}
@media (min-width: 1024px) {
    body { padding: 0 60px 80px 60px; max-width: 1100px; }
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: #0f0f23; }
::-webkit-scrollbar-thumb { background: #2a2a4a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a5a; }