/**
 * Sports Bar - Futuristic Minimal Design
 */

:root {
    --sports-bar-bg: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    --sports-bar-card-bg: rgba(255, 255, 255, 0.05);
    --sports-bar-card-hover: rgba(255, 255, 255, 0.08);
    --sports-bar-border: rgba(255, 255, 255, 0.1);
    --sports-bar-text: #ffffff;
    --sports-bar-text-muted: rgba(255, 255, 255, 0.6);
    --sports-bar-accent: #00d4ff;
    --sports-bar-accent-glow: rgba(0, 212, 255, 0.3);
    --sports-bar-live: #ff4757;
    --sports-bar-scheduled: #ffa502;
    --sports-bar-final: #2ed573;
    --sports-bar-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Fix */
body > .sports-bar{
    display: none;
}

/* Main Container */
.sports-bar {
    position: relative;
    width: 100%;
    max-width: 1020px;
    margin: auto;
    background: #000;
    border-bottom: 1px solid var(--sports-bar-border);
    backdrop-filter: blur(10px);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.sports-bar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Sport Selector */
.sports-bar-selector {
    flex-shrink: 0;
    position: relative;
}

.custom-select {
    position: relative;
    min-width: 70px;
    cursor: pointer;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--sports-bar-card-bg);
    color: var(--sports-bar-text);
    border: 1px solid var(--sports-bar-border);
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.custom-select-trigger svg {
    width: 10px;
    height: 6px;
    stroke: var(--sports-bar-accent);
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-trigger svg {
    transform: rotate(180deg);
}

.custom-select-trigger:hover {
    border-color: var(--sports-bar-accent);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid var(--sports-bar-accent);
    border-radius: 3px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sports-bar-text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.custom-select-option:hover {
    background: var(--sports-bar-card-hover);
    color: var(--sports-bar-accent);
}

.custom-select-option.selected {
    background: var(--sports-bar-card-bg);
    color: var(--sports-bar-accent);
}

/* Old select styles - keep for fallback */
.sport-select {
    background: var(--sports-bar-card-bg);
    color: var(--sports-bar-text);
    border: 1px solid var(--sports-bar-border);
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2300d4ff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 26px;
}

.sport-select:hover {
    border-color: var(--sports-bar-accent);
}

.sport-select:focus {
    border-color: var(--sports-bar-accent);
    background: var(--sports-bar-card-bg);
}

.sport-select option {
    background: #1a1a2e;
    color: var(--sports-bar-text);
    padding: 10px;
}

/* Force dark mode for select dropdown */
.sport-select,
.sport-select:focus,
.sport-select:active {
    background-color: #1a1a2e !important;
    color: var(--sports-bar-text) !important;
}

/* Scroll Wrapper */
.sports-bar-scroll-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Scroll Fade Effects */
.scroll-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-fade-left {
    left: 0;
    background: linear-gradient(to right, #000000 0%, rgba(0, 0, 0, 0.8) 30%, transparent 100%);
}

.scroll-fade-right {
    right: 0;
    background: linear-gradient(to left, #000000 0%, rgba(0, 0, 0, 0.8) 30%, transparent 100%);
}

.scroll-fade.show {
    opacity: 1;
}

/* Navigation Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    padding: 0;
}

.scroll-btn svg {
    width: 18px;
    height: 18px;
}

.scroll-btn:hover {
    background: rgba(26, 26, 46, 1);
    border-color: var(--sports-bar-accent);
    color: var(--sports-bar-accent);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-left {
    left: 8px;
}

.scroll-right {
    right: 8px;
}

.scroll-btn.show {
    display: flex;
}

/* Cards Container */
.sports-bar-cards {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 0;
    cursor: grab;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.sports-bar-cards:active {
    cursor: grabbing;
}

.sports-bar-cards.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.sports-bar-cards::-webkit-scrollbar {
    display: none;
}

/* Skeleton Loading State */
.sports-bar-loading {
    display: flex;
    gap: 10px;
}

.skeleton-card {
    flex: 0 0 180px;
    background: var(--sports-bar-card-bg);
    border: 1px solid var(--sports-bar-border);
    border-radius: 4px;
    padding: 8px;
    overflow: hidden;
    height: 98px;
}

.skeleton-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid transparent;
}

.skeleton-status {
    width: 50px;
    height: 9px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: shimmer 1.5s infinite;
}

.skeleton-time {
    width: 40px;
    height: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: shimmer 1.5s infinite;
    animation-delay: 0.1s;
}

.skeleton-team {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    padding: 0px 6px;
}

.skeleton-logo {
    width: 20px;
    height: 20px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 50%;
    animation: shimmer 1.5s infinite;
    animation-delay: 0.2s;
    flex-shrink: 0;
}

.skeleton-name {
    flex: 1;
    height: 11px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: shimmer 1.5s infinite;
    animation-delay: 0.3s;
}

.skeleton-score {
    width: 28px;
    height: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: shimmer 1.5s infinite;
    animation-delay: 0.4s;
    flex-shrink: 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Game Card */
.game-card {
    flex: 0 0 180px;
    background: var(--sports-bar-card-bg);
    border: 1px solid var(--sports-bar-border);
    border-radius: 4px;
    padding: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
    height: 98px;
}

.game-card:hover {
    border-color: var(--sports-bar-accent);
    transform: translateY(-1px);
}

/* Card Header */
.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding-bottom: 6px;
    padding-left: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--sports-bar-border);
}

.game-status {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.game-status.live {
    color: var(--sports-bar-live);
    background: transparent;
}

.game-status.live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--sports-bar-live);
    border-radius: 50%;
    animation: live-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
}

.game-status.scheduled {
    color: var(--sports-bar-scheduled);
    background: transparent;
}

.game-status.final {
    color: var(--sports-bar-final);
    background: transparent;
}

@keyframes live-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(255, 71, 87, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

.game-time {
    font-size: 10px;
    color: var(--sports-bar-text-muted);
    font-weight: 500;
}

/* Card Body */
.game-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 6px;
    border-radius: 2px;
    background: transparent;
    transition: all 0.2s ease;
    gap: 8px;
    min-height: 20px;
}

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

.team-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--sports-bar-text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--sports-bar-accent);
    flex-shrink: 0;
}

.game-divider {
    text-align: center;
    font-size: 8px;
    font-weight: 600;
    color: var(--sports-bar-text-muted);
    letter-spacing: 0.5px;
    padding: 2px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sports-bar-container {
        padding: 6px 10px;
        gap: 10px;
    }
    
    .sport-select {
        padding: 6px 24px 6px 10px;
        font-size: 11px;
    }
    
    .game-card {
        flex: 0 0 160px;
        padding: 6px;
        height: 95px;
    }
    
    .skeleton-card {
        flex: 0 0 160px;
        padding: 6px;
        height: 95px;
    }
    
    .team-logo {
        width: 18px;
        height: 18px;
    }
    
    .team-name {
        font-size: 10px;
    }
    
    .team-score {
        font-size: 13px;
    }
    
    .game-status {
        font-size: 8px;
    }
    
    .game-time {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .sports-bar-container {
        padding: 5px 8px;
        gap: 8px;
    }
    
    .sport-select {
        padding: 5px 22px 5px 8px;
        font-size: 10px;
        min-width: 60px;
    }
    
    .game-card {
        flex: 0 0 140px;
        padding: 6px;
        height: 95px;
    }
    
    .skeleton-card {
        flex: 0 0 140px;
        padding: 6px;
        height: 95px;
    }
    
    .game-card-header {
        margin-bottom: 3px;
        padding-bottom: 4px;
        padding-left: 4px;
    }
    
    .team {
        padding: 0 4px;
        gap: 6px;
    }
    
    .team-logo {
        width: 16px;
        height: 16px;
    }
    
    .team-name {
        font-size: 9px;
    }
    
    .team-score {
        font-size: 12px;
    }
    
    .game-status {
        font-size: 7px;
    }
    
    .game-time {
        font-size: 8px;
    }
    
    .skeleton-logo {
        width: 16px;
        height: 16px;
    }
    
    .skeleton-name {
        height: 12px;
    }
    
    .skeleton-score {
        width: 22px;
        height: 14px;
    }
    
    .skeleton-status {
        width: 40px;
        height: 10px;
    }
    
    .skeleton-time {
        width: 30px;
        height: 10px;
    }
}

@media (max-width: 360px) {
    .sports-bar-container {
        padding: 4px 6px;
        gap: 6px;
    }
    
    .game-card {
        flex: 0 0 125px;
        padding: 5px;
        height: 85px;
    }
    
    .skeleton-card {
        flex: 0 0 125px;
        height: 85px;
    }
    
    .team-name {
        font-size: 8px;
    }
    
    .team-score {
        font-size: 11px;
    }
}

/* No Games State */
.sports-bar-no-games {
    padding: 30px;
    text-align: center;
    color: var(--sports-bar-text-muted);
}

.sports-bar-no-games svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.sports-bar-no-games p {
    margin: 0;
    font-size: 14px;
}

/* Clickable Cards */
.game-card.clickable {
    cursor: pointer;
}

.game-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

/* ================================
   Sports Details Page Styles
   ================================ */

.sports-details {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sports-details-error {
    text-align: center;
    padding: 40px;
    color: #ff4757;
}

.sports-details-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.sports-details .game-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.sports-details .status-live {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.sports-details .status-final {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

.sports-details .status-scheduled {
    background: rgba(255, 165, 2, 0.15);
    color: #ffa502;
}

.sports-details .game-time {
    font-size: 18px;
    color: #666;
}

.sports-details-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.sports-details .team {
    text-align: center;
    flex: 1;
    max-width: 250px;
}

.sports-details .team-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
}

.sports-details .team-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.sports-details .team-score {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a2e;
}

.sports-details .vs-separator {
    font-size: 24px;
    font-weight: 600;
    color: #999;
}

.sports-details-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    line-height: 1.7;
    color: #444;
}

@media (max-width: 600px) {
    .sports-details-matchup {
        gap: 20px;
    }
    
    .sports-details .team-logo {
        width: 60px;
        height: 60px;
    }
    
    .sports-details .team-name {
        font-size: 16px;
    }
    
    .sports-details .team-score {
        font-size: 32px;
    }
}

