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

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #fff;
    overflow: hidden;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    max-width: 400px;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.4;
}

#scene-container {
    width: 100%;
    height: 100%;
}

.control-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    z-index: 100;
}

.panel-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h3 {
    color: #00ffff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.control-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #ccc;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #00ffff;
}

.control-group select {
    width: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: #fff;
    font-family: inherit;
}

.control-group select option {
    background: #1a1a1a;
    color: #fff;
}

.metrics {
    background: rgba(0, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.metrics div {
    margin-bottom: 5px;
}

.reset-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(45deg, #ff4444, #ff8800);
    border: none;
    border-radius: 5px;
    color: white;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
}

.info-section {
    margin-top: 20px;
}

.info-section details {
    background: rgba(0, 255, 255, 0.1);
    border-radius: 5px;
    padding: 10px;
}

.info-section summary {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
    color: #00ffff;
}

.info-section p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #ccc;
}

.footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.footer a {
    color: #00ffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ff00ff;
}

#share-btn {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

#share-btn:hover {
    background: rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.achievement-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}

.achievement-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Scrollbar styling */
.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 3px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .header {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        padding: 10px 15px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .header p {
        font-size: 0.8rem;
    }
    
    .control-panel {
        top: auto;
        bottom: 80px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 50vh;
    }
    
    .footer {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation keyframes */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.6); }
}

.control-panel {
    animation: glow 3s ease-in-out infinite;
}