:root {
    --bg-color: #0f172a;
    --panel-bg: #1e293b;
    --accent-day: #f59e0b;
    --accent-night: #6366f1;
    --text-color: #f8fafc;
}

body {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#game-container {
    width: 90%;
    max-width: 1000px;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px dashed #475569;
    padding-bottom: 10px;
}

h1 {
    margin: 0;
    letter-spacing: 4px;
    color: #e2e8f0;
}

.subtitle {
    color: #94a3b8;
    margin: 5px 0 0 0;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--panel-bg);
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

h3 {
    margin-top: 0;
    border-bottom: 1px solid #334155;
    padding-bottom: 8px;
    color: #cbd5e1;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

#webcam {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

#solstice-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 20px;
    font-size: 0.9rem;
}

.day-mode {
    background-color: var(--accent-day);
    color: #000;
    box-shadow: 0 0 15px var(--accent-day);
}

.night-mode {
    background-color: var(--accent-night);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-night);
}

.stats {
    background: #0f172a;
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 0.9rem;
}

.stats p {
    margin: 5px 0;
}

.binary-stream {
    background: #020617;
    padding: 15px;
    border-radius: 4px;
    color: #10b981;
    font-size: 1.1rem;
    word-break: break-all;
    letter-spacing: 1px;
    border: 1px solid #059669;
}

.rotor-container {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.rotor-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rotor-slot label {
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: #94a3b8;
}

.rotor-slot input {
    background: #0f172a;
    border: 1px solid #475569;
    color: #fff;
    padding: 10px;
    font-size: 1.5rem;
    text-align: center;
    border-radius: 4px;
    font-family: inherit;
}

button {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

button:hover {
    background: #2563eb;
}

.output-box {
    margin-top: 20px;
    background: #0f172a;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #3b82f6;
}

.hidden {
    display: none !important;
}

#victory-card {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #334155;
}

#next-level-btn {
    background: #10b981;
    margin-top: 10px;
}

#next-level-btn:hover {
    background: #059669;
}