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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.container {
    width: 100%;
    height: 100vh;
    background: #1a1a1a;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

header {
    background: #0055BF;
    color: white;
    padding: 15px 30px;
    text-align: center;
    flex-shrink: 0;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    min-width: 0;
}

.video-container {
    position: relative;
    flex: 1;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    pointer-events: none;
    transition: opacity 0.3s;
}

.status.hidden {
    opacity: 0;
}

.status.error {
    background: rgba(220, 38, 38, 0.9);
}

.status.success {
    background: rgba(34, 197, 94, 0.9);
}

.info {
    padding: 8px 15px;
    text-align: center;
    background: #0a0a0a;
    color: #9ca3af;
    flex-shrink: 0;
}

#stream-info {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    font-family: 'Monaco', 'Courier New', monospace;
    line-height: 1.4;
}

/* Control Panel Styles */
.controls-section {
    width: 380px;
    padding: 20px;
    background: #f9fafb;
    border-left: 2px solid #0055BF;
    overflow-y: auto;
    flex-shrink: 0;
}

.controls-section h2 {
    color: #0055BF;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.control-group {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.control-group h3 {
    color: #1f2937;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Button Styles */
.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.control-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.control-btn:active {
    transform: translateY(0);
}

.stop-btn {
    background: #ef4444;
    color: white;
}

.stop-btn:hover {
    background: #dc2626;
}

.go-btn {
    background: #10b981;
    color: white;
}

.go-btn:hover {
    background: #059669;
}

/* Slider Styles */
.slider-container {
    padding: 10px 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #d1d5db;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0055BF;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0055BF;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6b7280;
}

.slider-labels span:nth-child(2) {
    font-weight: 600;
    color: #0055BF;
}

/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Select Dropdown Styles */
.select-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.select-control:hover {
    border-color: #0055BF;
}

.select-control:focus {
    outline: none;
    border-color: #0055BF;
    box-shadow: 0 0 0 3px rgba(0, 85, 191, 0.1);
}

/* Status Indicators */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 0.95rem;
}

.status-label {
    color: #6b7280;
    font-weight: 500;
}

.status-value {
    color: #1f2937;
    font-weight: 600;
}

/* Connection Status */
.connection-status {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #6b7280;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #10b981;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .video-section {
        height: 60vh;
    }
    
    .controls-section {
        width: 100%;
        border-left: none;
        border-top: 2px solid #0055BF;
        max-height: 40vh;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.3rem;
    }
    
    header {
        padding: 12px 20px;
    }
    
    .controls-section {
        padding: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .control-btn {
        width: 100%;
    }
}
