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

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
}


/* Camera Container */
.camera-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #111;
    overflow: hidden;
}

#cameraFeed {
    display: none;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

#effectCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

/* Effect Overlays */
.effect-overlays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}

.camera-container canvas {
    position: relative;
    z-index: 5;
}

.blink-overlay,
.tunnel-vision,
.microsleep-overlay,
.double-vision {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blink-overlay {
    background: #000;
    transition: opacity 0.1s ease;
}

.blink-overlay.active {
    opacity: 0.9;
}

.tunnel-vision {
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.8) 70%);
}

.tunnel-vision.active {
    opacity: 1;
}

.microsleep-overlay {
    background: #000;
}

.microsleep-overlay.active {
    opacity: 1;
}

.double-vision.active {
    opacity: 0.5;
    background: linear-gradient(45deg, rgba(255,0,0,0.1) 50%, transparent 50%),
                linear-gradient(-45deg, rgba(0,255,0,0.1) 50%, transparent 50%);
}

/* Description Overlay */
.description-overlay {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 107, 53, 0.5);
    text-align: center;
    z-index: 20;
    display: none;
    max-width: 90%;
    font-family: 'Arial', sans-serif;
}

.description-overlay.active {
    display: block;
}

.experience-description {
    font-size: 1rem;
    color: #ccc;
    margin: 0;
    line-height: 1.4;
    max-width: 400px;
}

/* Tech Stats Overlay */
.tech-stats {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 8px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    z-index: 20;
    display: none;
    flex-direction: row;
    gap: 15px;
    font-family: 'Courier New', monospace;
}

.tech-stats.active {
    display: flex;
}

.tech-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
}

.tech-label {
    color: #ccc;
}

.tech-value {
    color: #ff6b35;
    font-weight: bold;
}

/* Slider Overlay */
.slider-overlay {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 107, 53, 0.5);
    z-index: 20;
    display: none;
}

.slider-overlay.active {
    display: block;
}

.fatigue-slider-overlay {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #4CAF50 0%, #FFC107 20%, #FF9800 40%, #FF5722 60%, #F44336 80%, #9C27B0 100%);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
}

.fatigue-slider-overlay::-webkit-slider-thumb {
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 3px solid #ff6b35;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.fatigue-slider-overlay::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 3px solid #ff6b35;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    color: #ccc;
    font-size: 0.9rem;
}

/* Camera Controls */
.camera-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 20;
    align-items: center;
}

/* Landing Content */
.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    max-width: 400px;
    margin-bottom: 30px;
}

.optix-logo {
    width: 120px;
    height: auto;
    margin-bottom: 10px;
}

.landing-title {
    font-size: 2.2rem;
    color: #ff6b35;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}

.landing-description {
    font-size: 1.1rem;
    color: #ccc;
    margin: 0;
    line-height: 1.4;
    max-width: 350px;
}

.camera-controls.active {
    top: auto;
    bottom: 20px;
    right: 20px;
    left: auto;
    transform: none;
    flex-direction: row;
    gap: 10px;
}

.camera-controls.active .landing-content {
    display: none;
}

.btn-overlay {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.camera-controls.active .btn-overlay {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-width: auto;
}

.btn-overlay.primary {
    background: rgba(255, 107, 53, 0.9);
    color: #fff;
}

.btn-overlay.primary:hover {
    background: rgba(255, 107, 53, 1);
}

.btn-overlay.secondary {
    background: rgba(51, 51, 51, 0.9);
    color: #fff;
    border: 1px solid #666;
}

.btn-overlay.secondary:hover {
    background: rgba(68, 68, 68, 0.9);
}

.status-display div {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    min-width: 160px;
}

#fatiguePercent, #reactionTime, #currentFPS, #lagDelay {
    color: #ff6b35;
    font-weight: bold;
}

/* Controls */
.controls-container {
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
}

.slider-container {
    max-width: 800px;
    margin: 0 auto;
}

.slider-label {
    display: block;
    font-size: 1.2rem;
    color: #ff6b35;
    margin-bottom: 15px;
    text-align: center;
}

.fatigue-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #4CAF50 0%, #FFC107 20%, #FF9800 40%, #FF5722 60%, #F44336 80%, #9C27B0 100%);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 20px;
}

.fatigue-slider::-webkit-slider-thumb {
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 3px solid #ff6b35;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.fatigue-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 3px solid #ff6b35;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.slider-markers {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.marker {
    font-size: 0.8rem;
    color: #ccc;
    text-align: center;
}

.marker.alert { color: #4CAF50; }
.marker.mild { color: #FFC107; }
.marker.moderate { color: #FF9800; }
.marker.significant { color: #FF5722; }
.marker.severe { color: #F44336; }
.marker.critical { color: #9C27B0; }

.controls-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary {
    background: #ff6b35;
    color: #fff;
}

.btn.primary:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

.btn.secondary {
    background: #333;
    color: #fff;
    border: 1px solid #666;
}

.btn.secondary:hover {
    background: #444;
    transform: translateY(-2px);
}

/* Info Panel */
.info-panel {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
}

.current-state {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

#stateTitle {
    font-size: 1.5rem;
    color: #ff6b35;
    margin-bottom: 10px;
}

#stateDescription {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 15px;
}

.danger-indicator {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.danger-indicator.safe {
    background: #4CAF50;
    color: #fff;
}

.danger-indicator.mild {
    background: #FFC107;
    color: #000;
}

.danger-indicator.moderate {
    background: #FF9800;
    color: #fff;
}

.danger-indicator.significant {
    background: #FF5722;
    color: #fff;
}

.danger-indicator.severe {
    background: #F44336;
    color: #fff;
}

.danger-indicator.critical {
    background: #9C27B0;
    color: #fff;
    animation: pulse 1s infinite;
}

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

/* Error Display */
.error-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff4444;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
}

.error-display h3 {
    color: #ff4444;
    margin-bottom: 10px;
}

.error-display p {
    margin-bottom: 20px;
    color: #ccc;
}

/* Progressive Blur Classes */
.blur-0 { filter: blur(0px); }
.blur-1 { filter: blur(0.5px); }
.blur-2 { filter: blur(1.5px); }
.blur-3 { filter: blur(3px) contrast(0.9); }
.blur-4 { filter: blur(5px) contrast(0.8); }
.blur-5 { filter: blur(8px) contrast(0.7); }

/* Motion blur simulation */
.motion-blur-light { filter: blur(0.5px) brightness(0.95); }
.motion-blur-heavy { filter: blur(2px) brightness(0.9); }
.motion-blur-extreme { filter: blur(4px) brightness(0.85); }

/* Head nod simulation */
.head-nod {
    animation: headNod 3s ease-in-out infinite;
}

@keyframes headNod {
    0%, 100% { transform: rotate(0deg) translateY(0px); }
    25% { transform: rotate(-1deg) translateY(2px); }
    75% { transform: rotate(1deg) translateY(-2px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .description-overlay {
        top: 20px;
        padding: 12px 20px;
        border-radius: 12px;
        max-width: 95%;
    }
    
    .experience-description {
        font-size: 0.9rem;
        max-width: 320px;
    }
    
    .tech-stats {
        top: 75px;
        padding: 6px 12px;
        border-radius: 10px;
        gap: 12px;
    }
    
    .tech-stat {
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .slider-overlay {
        bottom: 40px;
        width: 90%;
        padding: 15px;
        border-radius: 12px;
    }
    
    .slider-labels {
        font-size: 0.8rem;
    }
    
    .camera-controls.active {
        bottom: 15px;
        right: 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .camera-controls.active .btn-overlay {
        padding: 8px 16px;
        font-size: 0.8rem;
        border-radius: 15px;
    }
    
    .landing-content {
        max-width: 320px;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .optix-logo {
        width: 100px;
        margin-bottom: 5px;
    }
    
    .landing-title {
        font-size: 1.8rem;
    }
    
    .landing-description {
        font-size: 1rem;
        max-width: 300px;
    }
}