/* ==========================================================================
   LIVE STAGE - Pop Art Style (matching main page)
   ========================================================================== */

/* Stage App Container */
.stage-app {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background var(--transition-theme);
}

/* Empty Stage Message */
.empty-stage {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px;
}

.empty-stage-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid var(--primary);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    transition: border-color var(--transition-theme);
}

.empty-stage-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-stage-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 12px;
    transition: color var(--transition-theme);
}

.empty-stage-text {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
    transition: color var(--transition-theme);
}

.empty-stage-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px var(--disk-shadow);
}

.empty-stage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--disk-shadow);
}

/* DJ Name Display */
.dj-name {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary);
    border-radius: 50px;
    padding: 12px 32px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.25rem;
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 4;
    transition: all var(--transition-theme);
}

/* Back Button (when viewing live) */
.stage-back-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 15;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stage-back-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stage-back-btn svg {
    width: 24px;
    height: 24px;
}

/* Halftone overlay matching main page */
.stage-halftone {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: radial-gradient(var(--halftone-color) 1px, transparent 1px);
    background-size: 8px 8px;
    transition: background-image var(--transition-theme);
}

/* Camera Feed */
.camera-feed {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.camera-feed.active {
    opacity: 1;
}

/* Stage Overlay (for visualizer and status) */
.stage-overlay {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* Audio Visualizer */
.stage-equalizer {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 100px;
    z-index: 3;
}

.stage-eq-bar {
    width: 16px;
    height: 30px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 15px var(--disk-shadow);
    animation: eq-idle 1.5s ease-in-out infinite;
    transition: height 0.1s ease, background var(--transition-theme), box-shadow var(--transition-theme);
}

.stage-eq-bar:nth-child(1) { animation-delay: 0s; }
.stage-eq-bar:nth-child(2) { animation-delay: 0.1s; }
.stage-eq-bar:nth-child(3) { animation-delay: 0.2s; }
.stage-eq-bar:nth-child(4) { animation-delay: 0.3s; }
.stage-eq-bar:nth-child(5) { animation-delay: 0.3s; }
.stage-eq-bar:nth-child(6) { animation-delay: 0.2s; }
.stage-eq-bar:nth-child(7) { animation-delay: 0.1s; }
.stage-eq-bar:nth-child(8) { animation-delay: 0s; }

@keyframes eq-idle {
    0%, 100% { height: 30px; }
    50% { height: 50px; }
}

/* Status Badge */
.stage-status {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary);
    border-radius: 50px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: var(--text);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-theme);
}

.stage-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
}

.stage-status.live {
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--disk-shadow);
    animation: status-pulse 2s ease-in-out infinite;
}

.stage-status.live .stage-status-dot {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: dot-pulse 1.5s ease-in-out infinite;
}

.stage-status.live .stage-status-text {
    color: var(--primary);
}

@keyframes status-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px var(--disk-shadow);
    }
    50% { 
        box-shadow: 0 0 40px var(--disk-shadow);
    }
}

@keyframes dot-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 10px var(--primary);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 0 0 20px var(--primary);
    }
}

/* Controls Panel */
.stage-controls {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.98);
    border: 3px solid var(--primary);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color var(--transition-theme);
}

.stage-controls.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.stage-controls-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Title */
.stage-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 4px;
    transition: color var(--transition-theme);
}

.stage-subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    transition: color var(--transition-theme);
}

/* Input Group */
.stage-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stage-label {
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--transition-theme);
}

.stage-input {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--text-muted);
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    color: var(--text);
    outline: none;
    transition: all var(--transition-fast);
}

.stage-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 0, 110, 0.1);
}

/* Buttons */
.stage-btn {
    width: 100%;
    padding: 16px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stage-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.stage-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.stage-btn--camera {
    background: var(--secondary);
    color: var(--text);
}

.stage-btn--primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px var(--disk-shadow);
}

.stage-btn--primary:hover:not(:disabled) {
    box-shadow: 0 8px 24px var(--disk-shadow);
}

.stage-btn--danger {
    background: #E63946;
    color: white;
}

/* Divider */
.stage-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-muted), transparent);
    opacity: 0.3;
    margin: 8px 0;
}

/* Links */
.stage-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.stage-link {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--text-muted);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.stage-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Error Message */
.stage-error {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background: #E63946;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 90%;
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.4);
    animation: error-slide-in 0.3s ease-out;
}

@keyframes error-slide-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.stage-error-icon {
    font-size: 1.5rem;
}

.stage-error-text {
    flex: 1;
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
}

.stage-error-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.stage-error-close:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stage-equalizer {
        bottom: 40px;
        gap: 8px;
        height: 80px;
    }
    
    .stage-eq-bar {
        width: 12px;
    }
    
    .stage-status {
        top: 20px;
        right: 20px;
        padding: 10px 18px;
        font-size: 0.75rem;
    }
    
    .stage-status-dot {
        width: 8px;
        height: 8px;
    }
    
    .stage-controls {
        padding: 28px;
    }
    
    .stage-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stage-controls {
        width: 95%;
        padding: 20px;
    }
    
    .stage-title {
        font-size: 1.25rem;
    }
    
    .stage-btn {
        padding: 14px;
        font-size: 0.875rem;
    }
    
    .stage-links {
        flex-direction: column;
    }
    
    .stage-link {
        text-align: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
