/* Apple Minimalist Design System for GamePulse - Responsive Mobile & Desktop */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #000000;
    --bg-card: #1C1C1E;
    --bg-card-secondary: #2C2C2E;
    --bg-navbar: rgba(28, 28, 30, 0.88);
    
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --text-muted: #636366;
    
    --accent-blue: #0A84FF;
    --accent-green: #30D158;
    --accent-red: #FF453A;
    --accent-yellow: #FFD60A;
    --accent-orange: #FF9F0A;
    
    --border-color: rgba(255, 255, 255, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.06);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 60px;
    overflow-x: hidden;
}

/* Translucent Glass Navbar - Fully Responsive */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    min-height: 38px;
}

.nav-btn:hover, .nav-btn:active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.14);
}

/* Main Containers */
.container, .detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Section Header & Titles */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.1rem, 4vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Live Badge with Pulsing Red Dot */
.badge-live {
    background: rgba(255, 69, 58, 0.15);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent-red);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255, 69, 58, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 69, 58, 0); }
}

/* Match Hero & Scoreboard Banner */
.match-hero {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.match-score-board {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    margin-top: 16px;
    gap: 16px;
}

.match-team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 180px;
    text-align: center;
}

.match-team-block img {
    width: 76px;
    height: 76px;
    max-width: 76px;
    max-height: 76px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.match-team-name {
    font-size: clamp(0.95rem, 3.5vw, 1.15rem);
    font-weight: 700;
    color: var(--text-primary);
}

.match-score-big {
    font-size: clamp(2rem, 7vw, 2.8rem);
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-blue);
    letter-spacing: -0.03em;
}

.match-vs {
    color: var(--text-muted);
    font-size: clamp(1.2rem, 5vw, 1.8rem);
}

/* Responsive Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.2);
}

.game-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.game-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.game-team-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-team-info img {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
}

.game-team-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.game-team-score {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-secondary);
}

.winner-score {
    color: var(--text-primary);
}

.game-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--accent-blue);
    font-weight: 600;
}

/* Responsive News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.2);
}

.news-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.news-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.news-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Info Cards / Detail Views */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.info-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Touch-Optimized Scrollable Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
    margin-bottom: 24px;
}

/* Play-by-Play Timeline Container - Complete Game Timeline */
.play-timeline {
    max-height: 550px;
    overflow-y: auto;
    padding-right: 8px;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.play-timeline::-webkit-scrollbar {
    width: 6px;
}

.play-timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.play-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent-blue);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.4;
}

/* Media Queries for Mobile Screens (< 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 14px;
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-brand img {
        height: 44px !important;
    }
    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }
    .container, .detail-container {
        padding: 14px 12px;
    }
    .games-grid {
        grid-template-columns: 1fr;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .match-score-board {
        gap: 8px;
    }
    .match-team-block img {
        width: 56px;
        height: 56px;
        max-width: 56px;
        max-height: 56px;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 36px 16px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    margin-top: 40px;
}

footer a {
    color: var(--accent-blue);
    text-decoration: none;
}
