/* css/main.css */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #1a1a1a;
    color: #fff;
    line-height: 1.6;
    padding: 20px;
}

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

header {
    margin-bottom: 30px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Controls Section */
.controls {
    background: #2a2a2a;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ir-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ir-controls label {
    font-weight: 500;
}

/* Buttons */
.btn {
    background: #0066ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

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

.btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: #0066ff;
}

.btn-success {
    background: #00a854;
}

.btn-success:hover {
    background: #008844;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* Select */
.select {
    background: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.select:focus {
    outline: none;
    border-color: #0066ff;
}

/* Status */
.status {
    font-size: 14px;
    color: #00ff00;
    font-weight: 500;
}

/* Main Area */
.main-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

/* Video Section */
.video-section {
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-container {
    position: relative;
}

#videoCanvas {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Effect Zones */
.effect-zones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    display: flex;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5);
}

.zone {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.zone:last-child {
    border-right: none;
}

.zone.active {
    background: rgba(0, 102, 255, 0.3);
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 102, 255, 0.5);
}

/* Cue Indicator */
.cue-indicator {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff0000;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
    display: none;
}

.cue-indicator.active {
    display: block;
    animation: pulse 0.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: translateX(-50%) scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: translateX(-50%) scale(1.05);
    }
}

/* Parameters Section */
.params-section {
    background: #2a2a2a;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.params-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 500;
}

.params-section h3 span {
    color: #0066ff;
    font-weight: 600;
}

/* Parameter Visualizer */
.param-visualizer {
    margin-bottom: 24px;
}

.param-bar {
    width: 100%;
    height: 200px;
    background: #1a1a1a;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.param-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, #0066ff, #00aaff);
    border-radius: 8px 8px 0 0;
    transition: height 0.1s ease;
    height: 50%;
}

.param-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Info Boxes */
.info-box {
    background: #333;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.info-box:last-child {
    margin-bottom: 0;
}

.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
}

.info-list dt {
    font-weight: 600;
    color: #999;
}

.info-list dd {
    color: #fff;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* Instructions */
.instructions h4 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 500;
}

.instructions ol {
    list-style: none;
    counter-reset: step-counter;
}

.instructions li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 32px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.instructions li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: #0066ff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 968px) {
    .main-area {
        grid-template-columns: 1fr;
    }
    
    .params-section {
        order: -1;
    }
    
    .control-group {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .controls {
        padding: 16px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}