/* Prism Studios Clean Styles - Simplified and Organized */

/* Base */
#prism-studios-page {
    width: 100%;
    height: 100vh;
    background: #0e0e10;
    color: #efeff1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Container */
.studio-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.studio-sidebar {
    width: 240px;
    background: #1f1f23;
    border-right: 1px solid #2f2f35;
    transition: width 0.3s ease;
    position: relative;
}

.studio-sidebar.collapsed {
    width: 60px;
}

/* Sidebar Toggle */
.sidebar-toggle {
    position: absolute;
    right: -20px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: #1f1f23;
    border: 1px solid #2f2f35;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: #26262c;
}

/* Navigation */
.sidebar-nav {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.studio-sidebar.collapsed .sidebar-nav {
    padding: 20px 10px;
}

.nav-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    font-size: 20px;
    font-weight: 700;
}

.studio-sidebar.collapsed .logo-text {
    display: none;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    color: #adadb8;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #26262c;
    color: #efeff1;
}

.nav-item.active {
    background: #9147ff;
    color: white;
}

.nav-icon {
    font-size: 20px;
    min-width: 20px;
}

.studio-sidebar.collapsed .nav-label {
    display: none;
}

/* Main Area */
.studio-main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Panels */
.studio-panel {
    display: none;
    flex-direction: column;
    height: 100%;
}

.studio-panel.active {
    display: flex;
}

/* Panel Header */
.panel-header {
    padding: 20px 32px;
    background: #18181b;
    border-bottom: 1px solid #2f2f35;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #1f1f23;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.connection-status.connected {
    color: #00d400;
}

.connection-status.disconnected {
    color: #ff4545;
}

/* Panel Content */
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* Preview Container */
.preview-container {
    max-width: 1200px;
    margin: 0 auto;
}

.preview-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 400px;
}

.preview-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: block;
}

.preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 2;
}

.placeholder-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
}

.placeholder-content h3 {
    font-size: 24px;
    margin: 0 0 8px 0;
}

.placeholder-content p {
    margin: 0 0 24px 0;
    opacity: 0.9;
}

/* Live Indicator */
.live-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ff4545;
    color: white;
    border-radius: 6px;
    font-weight: 700;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Stream Controls */
.stream-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #18181b;
    border-radius: 8px;
    margin-bottom: 32px;
}

.control-group {
    display: flex;
    gap: 12px;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #1f1f23;
    border: 2px solid #2f2f35;
    border-radius: 8px;
    color: #adadb8;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: #26262c;
    border-color: #464649;
    color: #efeff1;
}

.control-btn.active {
    background: #9147ff;
    border-color: #9147ff;
    color: white;
}

.control-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-icon {
    font-size: 24px;
}

.control-label {
    font-size: 12px;
    font-weight: 600;
}

/* Go Live Button */
.go-live-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #9147ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.go-live-btn:hover {
    background: #7c3fc7;
}

.go-live-btn.live {
    background: #ff4545;
}

.go-live-btn.live .btn-text {
    content: 'End Stream';
}

/* Stream Settings */
.stream-settings {
    background: #18181b;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
}

.stream-settings h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
}

.settings-grid {
    display: grid;
    gap: 20px;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #adadb8;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    background: #0e0e10;
    border: 2px solid #2f2f35;
    border-radius: 6px;
    color: #efeff1;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9147ff;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #18181b;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #9147ff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #adadb8;
}

/* Buttons */
.btn-primary {
    padding: 10px 24px;
    background: #9147ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    z-index: 12;
    pointer-events: auto;
}

.btn-primary:hover {
    background: #7c3fc7;
}

/* Make setup button very clickable */
#setup-devices-btn {
    background: #ff4444;
    font-size: 16px;
    padding: 12px 32px;
    cursor: pointer;
    border: 2px solid white;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#setup-devices-btn:hover {
    background: #ff6666;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

#setup-devices-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .studio-sidebar {
        position: fixed;
        left: -240px;
        z-index: 100;
    }

    .studio-sidebar.collapsed {
        left: 0;
        width: 240px;
    }

    .sidebar-toggle {
        right: auto;
        left: 10px;
        top: 10px;
        position: fixed;
    }

    .panel-content {
        padding: 20px;
    }

    .stream-controls {
        flex-direction: column;
        gap: 16px;
    }

    .control-group {
        width: 100%;
        justify-content: space-around;
    }

    .go-live-btn {
        width: 100%;
    }
}