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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #0f0f0f;
    color: #e0e0e0;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    background: #181818;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 1px solid #333;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

.main-content {
    display: flex;
    gap: 20px;
    padding: 20px;
}

/* Video Container */
.video-container {
    flex: 1;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
    position: relative;
}

.offline-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    text-align: center;
    padding: 40px;
    min-height: 400px;
}

.offline-message h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.offline-message p {
    font-size: 18px;
    color: #ccc;
}

.stream-player {
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
}

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

/* Hide progress bar/scrubber for live stream */
.video-js .vjs-progress-control {
    display: none !important;
}

.video-js .vjs-seek-to-live-control {
    display: none !important;
}

/* Chat Container */
.chat-container {
    width: 400px;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    overflow: hidden;
    border: 1px solid #333;
}

.chat-header {
    background: #252525;
    color: white;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.chat-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 500px;
    min-height: 400px;
    background: #121212;
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 8px;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.message-username {
    font-weight: 600;
    color: #7289da;
}

.message-text {
    color: #e0e0e0;
}

.system-message {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 8px;
    margin-bottom: 12px;
}

.chat-input-container {
    border-top: 1px solid #333;
    padding: 15px;
    background: #1e1e1e;
}

.username-prompt {
    display: flex;
    gap: 10px;
}

.username-prompt input {
    flex: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 14px;
    background: #2a2a2a;
    color: #e0e0e0;
}

.username-prompt input::placeholder {
    color: #888;
}

.username-prompt button {
    padding: 10px 20px;
    background: #7289da;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.username-prompt button:hover {
    background: #5b6eae;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.current-username {
    font-size: 14px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 10px;
}

.small-btn {
    padding: 4px 10px;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #e0e0e0;
    transition: background 0.3s;
}

.small-btn:hover {
    background: #444;
}

.message-input-group {
    display: flex;
    gap: 10px;
}

.message-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 14px;
    background: #2a2a2a;
    color: #e0e0e0;
}

.message-input-group input::placeholder {
    color: #888;
}

.message-input-group button {
    padding: 10px 20px;
    background: #43b581;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.message-input-group button:hover {
    background: #3ca374;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 10px;
    }
    
    .chat-container {
        width: 100%;
    }
    
    .video-container {
        min-height: 250px;
    }
    
    .stream-player {
        min-height: 250px;
    }
    
    .stream-player .video-js {
        min-height: 250px;
    }
    
    .offline-message {
        min-height: 250px;
    }
    
    .offline-message h2 {
        font-size: 24px;
    }
    
    .offline-message p {
        font-size: 16px;
    }
    
    header h1 {
        font-size: 22px;
    }
    
    .chat-messages {
        max-height: 300px;
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 15px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .main-content {
        padding: 5px;
        gap: 10px;
    }
    
    .chat-header h2 {
        font-size: 18px;
    }
    
    .video-container {
        min-height: 200px;
        border-radius: 5px;
    }
    
    .stream-player {
        min-height: 200px;
    }
    
    .stream-player .video-js {
        min-height: 200px;
    }
    
    .offline-message {
        min-height: 200px;
        padding: 20px;
    }
    
    .offline-message h2 {
        font-size: 20px;
    }
    
    .offline-message p {
        font-size: 14px;
    }
    
    .chat-messages {
        padding: 10px;
        max-height: 250px;
        min-height: 200px;
    }
    
    .chat-input-container {
        padding: 10px;
    }
    
    .username-prompt,
    .message-input-group {
        flex-direction: column;
    }
    
    .username-prompt button,
    .message-input-group button {
        width: 100%;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}
