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

body {
    font-family: 'IBM Plex Mono', monospace;
    background: linear-gradient(135deg, #0a0a15 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 15px;
    border: 2px solid rgba(0, 217, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.2);
}

.title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3em;
    background: linear-gradient(45deg, #00d9ff, #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.subtitle {
    font-size: 1.2em;
    color: #c0c0c0;
    margin-bottom: 5px;
}

.tagline {
    font-size: 0.9em;
    color: #ff9500;
    font-style: italic;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a15;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 217, 255, 0.2);
    border-top: 4px solid #00d9ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #00d9ff;
    margin: 10px 0;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Main Content */
.main-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Info Panel */
.info-panel {
    flex: 0 0 250px;
    background: rgba(26, 26, 46, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(0, 217, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.1);
}

.stats-display h3 {
    color: #00d9ff;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.stat-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(0, 217, 255, 0.05);
    border-radius: 5px;
}

.stat-label {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 1.1em;
    color: #00d9ff;
    font-weight: bold;
}

/* How It Works */
.how-it-works {
    margin-top: 20px;
}

.accordion-btn {
    width: 100%;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: #00d9ff;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    transition: all 0.3s;
}

.accordion-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.accordion-content {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    font-size: 0.85em;
    line-height: 1.6;
}

.accordion-content ol {
    margin-left: 20px;
}

.accordion-content li {
    margin: 8px 0;
}

.highlight-blue { color: #00d9ff; }
.highlight-amber { color: #ff9500; }
.highlight-silver { color: #c0c0c0; }

.fun-fact {
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 149, 0, 0.1);
    border-left: 3px solid #ff9500;
    font-size: 0.9em;
}

.x-ray-toggle {
    margin-top: 20px;
}

/* Canvas Area */
.canvas-area {
    flex: 1;
    position: relative;
}

#canvas {
    width: 100%;
    max-width: 800px;
    height: auto;
    border: 3px solid rgba(0, 217, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.3);
    background: #0a0a15;
    cursor: crosshair;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.maintenance-alert {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 149, 0, 0.9);
    color: #000;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.5);
    z-index: 10;
}

.maintenance-alert button {
    background: #000;
    color: #ff9500;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Control Panel */
.control-panel {
    flex: 0 0 250px;
    background: rgba(26, 26, 46, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 149, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.1);
}

.control-panel h3 {
    color: #ff9500;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #c0c0c0;
    font-size: 0.9em;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: 5px;
    color: #e0e0e0;
    font-family: 'IBM Plex Mono', monospace;
}

.control-group input[type="range"] {
    cursor: pointer;
}

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

.control-btn {
    flex: 1;
    padding: 10px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: #00d9ff;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

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

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff9500, #00d9ff);
    color: #000;
    padding: 30px 50px;
    border-radius: 15px;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 0 50px rgba(255, 149, 0, 0.8);
    z-index: 1000;
    animation: popIn 0.5s ease-out;
}

@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Footer */
footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 10px;
    border: 2px solid rgba(192, 192, 192, 0.2);
}

footer p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #888;
}

footer a {
    color: #00d9ff;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #ff9500;
}

.fun-fact-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    color: #ff9500;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    transition: all 0.3s;
}

.fun-fact-btn:hover {
    background: rgba(255, 149, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }

    .info-panel,
    .control-panel {
        flex: 1;
        max-width: 100%;
    }

    .title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 1em;
    }

    .tagline {
        font-size: 0.8em;
    }

    .info-panel,
    .control-panel {
        padding: 15px;
    }
}