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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    color: #fff;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    gap: 0;
}

.control-panel {
    width: 300px;
    background: #2a2a2a;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #444;
}

.control-panel h1 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #4a9eff;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

button {
    flex: 1;
    min-width: 120px;
    padding: 10px 15px;
    background: #4a9eff;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

button:hover:not(:disabled) {
    background: #3a8eef;
}

button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.info-panel {
    background: #333;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.info-panel p {
    margin: 8px 0;
    line-height: 1.4;
}

.info-panel span {
    color: #4a9eff;
    font-weight: bold;
}

.settings {
    background: #333;
    padding: 15px;
    border-radius: 5px;
}

.settings label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.settings input[type="checkbox"] {
    cursor: pointer;
}

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

#cameraCanvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.content-panel {
    width: 250px;
    background: #2a2a2a;
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #444;
}

.content-panel h3 {
    color: #4a9eff;
    margin-bottom: 15px;
}

#contentInfo {
    font-size: 0.85em;
    line-height: 1.6;
}

#contentInfo p {
    margin-bottom: 10px;
    color: #ccc;
}

#contentInfo span {
    color: #4a9eff;
}

/* Error striped pattern */
.error-striped {
    background: repeating-linear-gradient(
        45deg,
        #ff4444,
        #ff4444 10px,
        #cc0000 10px,
        #cc0000 20px
    );
    animation: stripe-animation 0.5s linear infinite;
}

@keyframes stripe-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 28px 0;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .control-panel {
        width: 250px;
    }
    .content-panel {
        width: 200px;
    }
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .control-panel,
    .content-panel {
        width: 100%;
        border: none;
        border-bottom: 1px solid #444;
    }
}

