:root {
    --bg-main: #0e0e10;
    --bg-card: #18181c;
    --bg-badge: #007acc;
    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    --border-color: #26262b;
    --star-gold: #ffc107;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    padding-bottom: 70px;
}

/* Sticky Top Bar */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand {
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
}

.search-box input {
    background-color: #1a1a1e;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    font-size: 13px;
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.live-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #1f222e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #2d3245;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #0095ff;
    border-radius: 50%;
    box-shadow: 0 0 6px #0095ff;
}

/* 3-Column Responsive Grid Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1400px;
    margin: 0 auto;
    gap: 16px;
    padding: 12px;
}

.sidebar-left,
.sidebar-right {
    display: none;
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .sidebar-left,
    .sidebar-right {
        display: block;
    }
}

.sidebar-box {
    background-color: var(--bg-card);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

/* League Header Block */
.league-block {
    margin-bottom: 20px;
}

.league-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
}

.league-logo-box {
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.league-logo-box img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.league-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
}

.league-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Match Card */
.match-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.match-round {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* Match Row Layout */
.match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    min-height: 64px;
}

.match-row:last-child {
    border-bottom: none;
}

/* Partition 1: Logo & Name */
.part-teams {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    flex-grow: 1;
    overflow: hidden;
}

.team-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

/* Partition 2: Scores */
.part-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.scores-box {
    background-color: var(--bg-badge);
    color: #ffffff;
    border-radius: 8px;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    font-weight: 800;
    font-size: 13px;
    width: 28px;
    height: 44px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.scores-box.finished {
    background-color: #27272a;
    color: #a0a0ab;
}

.score-divider {
    width: 12px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Partition 3: Time & Favorite */
.part-time-fav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 44px;
    height: 44px;
    padding-left: 10px;
    border-left: 1px solid var(--border-color);
    flex-shrink: 0;
}

.minute-badge {
    font-size: 12px;
    color: #0095ff;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-align: center;
    width: 100%;
    display: block;
}

.time-box {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #52525b;
    line-height: 1;
    padding: 0;
    transition: transform 0.1s ease, color 0.2s ease;
}

.fav-btn:active {
    transform: scale(1.2);
}

.fav-btn.active {
    color: var(--star-gold);
}

/* Fixed Footer Ad */
.sticky-footer-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #111113;
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 6px 0;
    z-index: 1000;
}