/* Root Variables */
:root {
    --primary-red: #8B0000;
    --primary-red-dark: #660000;
    --primary-red-light: #B71C1C;
    --secondary-gold: #FFD700;
    --dark-bg: #0D1117;
    --dark-surface: #161B22;
    --dark-border: #30363D;
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --text-muted: #656D76;
    --success: #238636;
    --warning: #D29922;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    background: #f8f9fa;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Header Styles */
.bg-dark-custom {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    border-bottom: 2px solid var(--secondary-gold);
    box-shadow: var(--shadow-lg);
}

.logo {
    width: 120px;
    height: 60px;
    object-fit: contain;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-red);
    line-height: 1;
}

.brand-tagline {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1;
}

.navbar-nav .nav-link {
    color: var(--primary-red) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin: 0 0.1rem;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--secondary-gold) !important;
    transform: translateY(-1px);
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-red-light) 0%, var(--primary-red) 100%);
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.welcome-banner h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.welcome-banner p {
    margin: 0.5rem 0 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Stream Tabs */
.stream-tabs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    border: 1px solid #e9ecef;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-btn:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    box-shadow: var(--shadow);
}

.share-btn {
    background: var(--success);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-left: auto;
}

.share-btn:hover {
    background: #2ea043;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Video Container */
.video-container {
    position: relative;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e9ecef;
}

.player-wrapper {
    position: relative;
}

.video-js {
    width: 100%;
    height: auto;
    min-height: 400px;
}

.video-js .vjs-tech {
    border-radius: var(--border-radius-lg);
}

/* Custom Controls Overlay */
.custom-controls-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

.brightness-control {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.brightness-control i {
    color: var(--secondary-gold);
    font-size: 0.9rem;
}

.brightness-control input[type="range"] {
    width: 80px;
    height: 4px;
    background: var(--dark-border);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.brightness-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--secondary-gold);
    border-radius: 50%;
    cursor: pointer;
}

.pip-control button {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: var(--secondary-gold);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.pip-control button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* Radio Container */
.radio-container {
    background: var(--dark-surface);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--dark-border);
    box-shadow: var(--shadow-lg);
}

.radio-info h3 {
    color: var(--primary-red-light);
    margin-bottom: 0.5rem;
}

.radio-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.radio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-radio {
    background: var(--primary-red);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-radio:hover {
    background: var(--primary-red-light);
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-control i {
    color: var(--text-secondary);
}

.volume-control input[type="range"] {
    width: 100px;
    height: 4px;
    background: var(--dark-border);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-red);
    border-radius: 50%;
    cursor: pointer;
}

/* Song Request */
.song-request {
    background: var(--dark-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--dark-border);
}

.song-request h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
}

/* Stream Status */
.stream-status {
    background: var(--dark-surface);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.status-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.status-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Reactions Panel */
.reactions-panel {
    background: white;
    border-radius: var(--border-radius-lg);
    border: 1px solid #e9ecef;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.panel-header {
    background: var(--primary-red);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.live-indicator {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: pulse 2s infinite;
}

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

.reactions-stats {
    padding: 1.5rem;
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.reaction-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.reaction-item:hover {
    transform: scale(1.1);
}

.reaction-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto 0.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.2);
}

.reaction-count {
    display: block;
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.reactions-summary {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    text-align: center;
}

/* Chat Panel */
.chat-panel {
    background: white;
    border-radius: var(--border-radius-lg);
    border: 1px solid #e9ecef;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-welcome {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-red);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.chat-message-name {
    font-weight: bold;
    color: var(--primary-red-light);
    font-size: 0.9rem;
}

.chat-message-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chat-message-text {
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-input {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e9ecef;
}

/* Floating Reactions */
#floatingReactions {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.floating-reaction {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 3s ease-out forwards;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-200px) scale(1.5);
    }
}

/* Form Controls */
.form-control {
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    color: var(--text-primary);
    border-radius: var(--border-radius);
}

.form-control:focus {
    background: var(--dark-bg);
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(139, 0, 0, 0.25);
    color: var(--text-primary);
}

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

.btn-primary {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.btn-primary:hover {
    background: var(--primary-red-light);
    border-color: var(--primary-red-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand .brand-name {
        font-size: 1.1rem;
    }
    
    .navbar-brand .brand-tagline {
        font-size: 0.7rem;
    }
    
    .welcome-banner h1 {
        font-size: 1.2rem;
    }
    
    .welcome-banner p {
        font-size: 0.8rem;
    }
    
    .stream-tabs {
        justify-content: center;
    }
    
    .share-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .reactions-stats {
        padding: 1rem;
        gap: 0.3rem;
    }
    
    .reaction-btn {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    
    .stream-status {
        flex-direction: column;
        text-align: center;
    }
    
    .custom-controls-overlay {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .brightness-control input[type="range"],
    .volume-control input[type="range"] {
        width: 60px;
    }
    
    .chat-panel {
        height: 300px;
    }
    
    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .welcome-banner {
        padding: 1rem 0;
    }
    
    .video-js {
        min-height: 250px;
    }
    
    .reactions-panel, .chat-panel {
        margin-bottom: 1rem;
    }
    
    .stream-status {
        font-size: 0.8rem;
    }
    
    .tab-btn, .share-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Custom scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-red);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
