/* VSync Web Client Styles */

:root {
    --bg-primary: #0a0a14;
    --bg-secondary: #12121e;
    --bg-card: #1a1a2e;
    --bg-input: #0f0f1a;
    --accent: #00d4ff;
    --accent-hover: #00b8e6;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --success: #00c853;
    --error: #ff5252;
    --warning: #ffc107;
    --border: #2a2a3e;
    --stars-green: #006847;
    --stars-gold: #8F8F8C;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

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

a:hover {
    color: var(--accent-hover);
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--stars-green), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.logo-img {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: #e04848;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
}

.login-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border);
}

.login-form .btn {
    width: 100%;
    margin-top: 8px;
}

/* Main Layout with Sidebar */
.main-layout {
    display: flex;
    min-height: calc(100vh - 71px);
}

/* Navigation Sidebar */
.nav-sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    overflow-y: auto;
    position: sticky;
    top: 71px;
    height: calc(100vh - 71px);
}

.nav-sidebar-header {
    padding: 0 20px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-sidebar-links {
    display: flex;
    flex-direction: column;
}

.nav-sidebar-links .loading {
    padding: 20px;
}

.nav-sidebar-links .spinner {
    width: 24px;
    height: 24px;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-link-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-link-item.active {
    background: var(--bg-card);
    color: var(--accent);
    border-left-color: var(--accent);
}

.nav-link-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-primary);
}

.nav-link-name {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 0 24px 24px;
    min-width: 0;
}

@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }

    .nav-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px 0;
    }

    .nav-sidebar-links {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 16px;
        gap: 8px;
    }

    .nav-link-item {
        padding: 10px 16px;
        border-left: none;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .nav-link-item.active {
        border-left-color: transparent;
        background: var(--accent);
        color: #000;
    }

    .nav-link-icon {
        width: 24px;
        height: 24px;
    }
}

/* Catalog Page */
.catalog-header {
    padding: 40px 0 20px;
}

.catalog-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.catalog-header p {
    color: var(--text-secondary);
}

.join-party-bar {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
}

.join-party-bar label {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.join-party-bar input {
    flex: 0 0 180px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
}

.join-party-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

.content-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Content Card */
.content-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.content-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.content-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-primary);
    overflow: hidden;
}

.content-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-live {
    background: var(--error);
    color: #fff;
    animation: pulse 2s infinite;
}

.badge-upcoming {
    background: var(--stars-green);
    color: #fff;
}

.badge-replay {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.content-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.8);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
}

.content-info {
    padding: 16px;
}

.content-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.content-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Player Page */
.player-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto auto auto;
    gap: 24px;
    padding: 24px 0;
}

.player-container > .video-wrapper {
    grid-column: 1;
    grid-row: 1;
}

.player-container > .watch-party-sidebar {
    grid-column: 2;
    grid-row: 1 / 3;
}

.player-container > .video-info {
    grid-column: 1;
    grid-row: 2;
}

.player-container > #nhlStatsCard {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
}

.player-container > #shotChartCard {
    grid-column: 1;
    grid-row: 4;
    align-self: start;
}

.player-container > #highlightsCard {
    grid-column: 1;
    grid-row: 5;
    align-self: start;
}

.player-container > #playByPlayCard {
    grid-column: 1;
    grid-row: 6;
    align-self: start;
}

.player-container > #externalAudioCard {
    grid-column: 2;
    grid-row: 3 / 7;
    align-self: start;
}

@media (max-width: 1024px) {
    .player-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .player-container > .video-wrapper,
    .player-container > .watch-party-sidebar,
    .player-container > .video-info,
    .player-container > #nhlStatsCard,
    .player-container > #shotChartCard,
    .player-container > #highlightsCard,
    .player-container > #playByPlayCard,
    .player-container > #externalAudioCard {
        grid-column: 1;
        grid-row: auto;
    }
}

.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
}

/* Pregame Overlay */
.pregame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.pregame-content {
    text-align: center;
    padding: 40px;
}

.pregame-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.pregame-content h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.countdown {
    font-family: monospace;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 4px;
    margin-bottom: 24px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.pregame-message {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Stream Statistics */
.stream-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

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

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stat-value {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: monospace;
    text-align: right;
}

.video-info {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.video-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.video-meta .meta-separator {
    color: var(--text-muted);
    margin: 0 4px;
}

.video-meta .meta-series {
    color: var(--accent);
    font-weight: 600;
}

.video-meta .meta-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.video-meta .meta-badge.badge-live {
    background: var(--error);
    color: #fff;
    animation: pulse 2s infinite;
}

.video-meta .meta-badge.badge-upcoming {
    background: var(--stars-green);
    color: #fff;
}

.video-meta .meta-badge.badge-replay {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.video-meta .meta-date {
    color: var(--text-primary);
}

.video-meta .meta-time {
    color: var(--text-secondary);
}

.video-meta .meta-duration {
    color: var(--text-muted);
}

.video-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Watch Party Sidebar */
.watch-party-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.party-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.party-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.party-code {
    font-family: monospace;
    font-size: 2rem;
    letter-spacing: 4px;
    color: var(--accent);
    background: var(--bg-input);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 16px;
    user-select: all;
}

.party-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 16px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
}

.status-dot.disconnected {
    background: var(--error);
}

.participant-list {
    list-style: none;
    margin-top: 12px;
}

.participant-list li {
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.participant-list .host-badge {
    font-size: 0.7rem;
    background: var(--accent);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Playback Controls */
.playback-controls {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.playback-controls .btn {
    flex: 1;
}

/* Sync Status */
.sync-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .join-party-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .join-party-bar input {
        flex: 1;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

/* External Audio Styles */
.external-audio-content {
    margin-top: 16px;
}

.audio-player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 16px;
}

.audio-player-controls .audio-label {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-player-controls input[type="range"] {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
}

.audio-player-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.audio-player-controls input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.sync-controls {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 16px;
}

.sync-status {
    font-size: 0.9rem;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid var(--text-muted);
}

.sync-status.synced {
    border-left-color: var(--success);
}

.sync-buttons {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.sync-buttons .btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.85rem;
}

.fine-tune-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

#currentOffsetDisplay {
    font-family: monospace;
    font-size: 1.1rem;
    min-width: 60px;
    text-align: center;
    color: var(--accent);
}

/* Mark button states */
.btn.marked {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.btn.marked:hover {
    background: #00b048;
}

.text-small {
    font-size: 0.85rem;
}

/* NHL Live Stats Card */
.nhl-stats-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.nhl-stats-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

/* Collapsible headers should have no bottom margin - content provides spacing */
.nhl-stats-card h3.collapsible-header {
    margin-bottom: 0;
}

.nhl-stats-card h3.collapsible-header + div {
    margin-top: 16px;
}

#nhlStatsContent {
    margin-top: 12px;
}

.nhl-stats-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.nhl-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nhl-badge.live {
    background: var(--error);
    color: #fff;
    animation: pulse 2s infinite;
}

.nhl-badge.final {
    background: var(--text-muted);
    color: #fff;
}

.nhl-badge.intermission {
    background: var(--warning);
    color: #000;
}

.nhl-badge.pregame {
    background: var(--stars-green);
    color: #fff;
}

.nhl-period {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.nhl-clock {
    color: var(--text-primary);
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    margin-left: auto;
}

.nhl-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px 0;
    margin-bottom: 16px;
}

.nhl-team {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nhl-team.away {
    flex-direction: row;
}

.nhl-team.home {
    flex-direction: row;
}

.nhl-team-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: none;
}

.nhl-team-abbrev {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 48px;
    text-align: center;
}

.nhl-team-score {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    min-width: 48px;
    text-align: center;
}

.nhl-vs {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nhl-stats-details {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 12px 16px;
}

.nhl-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.nhl-stat-label {
    flex: 1;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.nhl-stat-away,
.nhl-stat-home {
    min-width: 60px;
    text-align: center;
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nhl-pregame {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.nhl-pregame p {
    font-size: 1rem;
}

#nhlStartTime {
    color: var(--accent);
    font-weight: 600;
}

/* Responsive NHL Stats */
@media (max-width: 768px) {
    .nhl-scoreboard {
        gap: 16px;
    }

    .nhl-team-logo {
        width: 36px;
        height: 36px;
    }

    .nhl-team-score {
        font-size: 2rem;
    }

    .nhl-team-abbrev {
        font-size: 1rem;
    }
}

/* Play-by-Play Styles */
.play-by-play-list {
    max-height: 350px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
    font-size: 0.85rem;
}

.play-event {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.play-event:last-child {
    border-bottom: none;
}

.play-event:hover {
    background: rgba(255, 255, 255, 0.03);
}

.play-event.goal {
    background: rgba(0, 212, 255, 0.08);
    border-left: 3px solid var(--accent);
}

.play-event.penalty {
    background: rgba(255, 82, 82, 0.08);
    border-left: 3px solid var(--error);
}

.play-event.loading,
.play-event.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
}

.play-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.play-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.play-type {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.play-event.goal .play-type {
    color: var(--accent);
}

.play-event.penalty .play-type {
    color: var(--error);
}

.play-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: monospace;
}

.play-details {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-left: 32px;
    line-height: 1.4;
}

.play-assists {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Scrollbar for play-by-play */
.play-by-play-list::-webkit-scrollbar {
    width: 6px;
}

.play-by-play-list::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 3px;
}

.play-by-play-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.play-by-play-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Shot Chart Styles */
.shot-chart-container {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.shot-chart-container svg {
    width: 100%;
    height: auto;
    display: block;
}

.shot-chart-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.shot-filter-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.shot-filter-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.shot-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.shot-marker {
    transition: r 0.2s ease;
    cursor: pointer;
}

.shot-marker:hover {
    r: 3;
}

.shot-marker.goal {
    fill: var(--accent);
    stroke: #fff;
    stroke-width: 0.5;
}

.shot-marker.shot {
    fill: #666;
    stroke: #999;
    stroke-width: 0.3;
}

.shot-marker.missed {
    fill: #333;
    stroke: #555;
    stroke-width: 0.3;
}

.shot-chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.goal {
    background: var(--accent);
}

.legend-dot.shot {
    background: #666;
}

.legend-dot.missed {
    background: #333;
}

.shot-chart-stats {
    text-align: center;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Highlights Styles */
.highlights-list {
    max-height: 400px;
    overflow-y: auto;
}

.highlight-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.highlight-item:last-child {
    border-bottom: none;
}

.highlight-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.highlight-item.loading,
.highlight-item.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
}

.highlight-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.highlight-team {
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.highlight-item.home-goal .highlight-team {
    background: var(--stars-green);
}

.highlight-item.away-goal .highlight-team {
    background: #444;
}

.highlight-scorer {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.highlight-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: monospace;
}

.highlight-assists {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-left: 52px;
    margin-bottom: 8px;
}

.highlight-link {
    display: inline-block;
    margin-left: 52px;
    padding: 4px 12px;
    background: var(--accent);
    color: #000;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}

.highlight-link:hover {
    background: var(--accent-hover);
    color: #000;
}

/* Scrollbar for highlights */
.highlights-list::-webkit-scrollbar {
    width: 6px;
}

.highlights-list::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 3px;
}

.highlights-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.highlights-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
