/* Brassbanned Live - Streaming Halls */
/* Kick-inspired dark theme with retro touches */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES - Easy to customize!
   ============================================ */
:root {
    /* Colors */
    --bg-primary: #0b0e0f;
    --bg-secondary: #141717;
    --bg-tertiary: #1a1f1f;
    --bg-card: #1e2424;
    
    --green-primary: #00a651;      /* Brassbanned green */
    --green-bright: #53fc18;       /* Kick green */
    --green-glow: rgba(83, 252, 24, 0.3);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    
    --border-color: #2a2f2f;
    --border-glow: var(--green-primary);
    
    /* Sizing */
    --header-height: 60px;
    --chat-width: 340px;
    --border-radius: 8px;
    
    /* Retro border style */
    --retro-border: 3px solid var(--green-primary);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    
    /* Subtle texture background like handsometim.com */
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        );
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

/* Header */
.header {
    height: var(--header-height);
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: var(--green-primary);
    text-shadow: 0 0 10px var(--green-glow);
}

.hall-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: var(--green-bright);
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: var(--retro-border);
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

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

.nav-link.active {
    color: var(--green-primary);
    background: rgba(0, 166, 81, 0.1);
}

/* Main content area */
.main-content {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

/* ============================================
   VIDEO PLAYER
   ============================================ */
.video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-primary);
}

.video-wrapper {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#video-player {
    width: 100%;
    height: 100%;
    background: #000;
}

/* YouTube iframe */
.youtube-embed {
    width: 100%;
    height: 100%;
    border: none;
}

/* Offline state */
.offline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    z-index: 10;
}

.offline-overlay.hidden {
    display: none;
}

.offline-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.offline-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.offline-subtext {
    font-size: 14px;
    color: var(--text-muted);
}

/* Stream info bar */
.stream-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.stream-title {
    font-weight: 600;
    font-size: 15px;
}

.stream-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.live {
    background: #ff4444;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

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

/* ============================================
   CHAT SECTION
   ============================================ */
.chat-section {
    width: var(--chat-width);
    min-width: var(--chat-width);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.chat-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: var(--green-primary);
    letter-spacing: 1px;
}

.chat-container {
    flex: 1;
    min-height: 0;
}

.chat-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.landing-header {
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-secondary);
    border-bottom: var(--retro-border);
}

.landing-logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    color: var(--green-primary);
    text-shadow: 0 0 20px var(--green-glow);
    margin-bottom: 8px;
}

.landing-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.halls-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 40px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hall-card {
    background: var(--bg-card);
    border: var(--retro-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.hall-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 30px var(--green-glow);
    border-color: var(--green-bright);
}

.hall-card-image {
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hall-card-image svg {
    width: 64px;
    height: 64px;
    opacity: 0.3;
}

.hall-card-live {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ff4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.hall-card-content {
    padding: 16px;
}

.hall-card-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: var(--green-primary);
    margin-bottom: 8px;
}

.hall-card-description {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }
    
    .video-section {
        flex: none;
        height: 56.25vw; /* 16:9 aspect ratio */
        max-height: 50vh;
    }
    
    .chat-section {
        width: 100%;
        min-width: 100%;
        flex: 1;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-links {
        display: none;
    }
    
    .logo-text {
        font-size: 11px;
    }
    
    .hall-name {
        font-size: 10px;
        padding: 4px 8px;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 0 12px;
    }
    
    .stream-info {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .landing-logo {
        font-size: 20px;
    }
    
    .halls-grid {
        padding: 20px 16px;
    }
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   INFO SECTION (Description & Schedule)
   ============================================ */
.info-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
    max-height: 300px;
}

.info-description {
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 14px;
}

.info-description p {
    margin: 0;
    white-space: pre-line;
}

.info-schedule {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.schedule-table th,
.schedule-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.schedule-table th {
    background: var(--bg-tertiary);
    color: var(--green-primary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

.schedule-table td {
    color: var(--text-primary);
}

.schedule-table tr:hover td {
    background: rgba(0, 166, 81, 0.05);
}

.schedule-table td:first-child {
    color: var(--green-bright);
    font-weight: 500;
    white-space: nowrap;
}

.schedule-table td:nth-child(2) {
    font-weight: 600;
}

/* Responsive table on mobile */
@media (max-width: 900px) {
    .info-section {
        max-height: none;
        padding: 16px;
    }
    
    .schedule-table {
        font-size: 12px;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 8px 6px;
    }
    
    /* Hide less important columns on small screens */
    .schedule-table th:nth-child(5),
    .schedule-table td:nth-child(5),
    .schedule-table th:nth-child(6),
    .schedule-table td:nth-child(6) {
        display: none;
    }
}
