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

body {
    font-family: 'Georgia', serif;
    overflow: hidden;
    background: #1a0f0a;
    color: #f5e6d3;
}

#scene-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(30, 15, 10, 0.85);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #b87333;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    color: #ffb300;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.subtitle {
    color: #f5e6d3;
    font-size: 1rem;
    font-style: italic;
}

.control-panel {
    position: fixed;
    right: 1rem;
    top: 120px;
    width: 320px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    background: rgba(62, 39, 35, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid #b87333;
    border-radius: 8px;
    padding: 1.5rem;
    z-index: 10;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.controls-header {
    margin-bottom: 1rem;
}

.toggle-btn {
    width: 100%;
    padding: 0.5rem;
    background: #8d4004;
    color: #f5e6d3;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.3s;
}

.toggle-btn:hover {
    background: #b87333;
}

.control-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(184, 115, 51, 0.3);
}

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

.control-section h3 {
    color: #ffb300;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.control-section label {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.control-section input[type="range"] {
    width: 100%;
    margin-top: 0.3rem;
    accent-color: #b87333;
}

.control-section select {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.3rem;
    background: rgba(30, 15, 10, 0.8);
    color: #f5e6d3;
    border: 1px solid #b87333;
    border-radius: 4px;
    font-size: 0.9rem;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.6rem;
    background: linear-gradient(135deg, #8d4004, #b87333);
    color: #f5e6d3;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.3);
}

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

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.6rem;
    background: #5a3825;
    color: #f5e6d3;
    border: 1px solid #b87333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.action-btn:hover {
    background: #8d4004;
}

.action-btn.small {
    padding: 0.4rem;
    font-size: 0.8rem;
}

.vibe-score {
    margin-top: 1rem;
}

.vibe-score h3 {
    color: #ffb300;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.vibe-meter {
    position: relative;
    width: 100%;
    height: 30px;
    background: rgba(30, 15, 10, 0.8);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #b87333;
}

.vibe-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #8d4004, #ffb300);
    transition: width 0.5s ease;
    border-radius: 15px;
}

#vibe-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    z-index: 1;
}

.info-panel {
    position: fixed;
    bottom: 80px;
    left: 1rem;
    width: 320px;
    background: rgba(62, 39, 35, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid #b87333;
    border-radius: 8px;
    padding: 1rem;
    z-index: 10;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.info-panel h3 {
    color: #ffb300;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.info-panel p {
    color: #f5e6d3;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-style: italic;
}

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(30, 15, 10, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem;
    text-align: center;
    border-top: 2px solid #b87333;
    font-size: 0.85rem;
}

.app-footer a {
    color: #ffb300;
    text-decoration: none;
    font-weight: bold;
}

.app-footer a:hover {
    text-decoration: underline;
}

.tooltip {
    position: fixed;
    background: rgba(30, 15, 10, 0.95);
    color: #f5e6d3;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #b87333;
    pointer-events: none;
    z-index: 100;
    display: none;
    font-size: 0.85rem;
}

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

.control-panel::-webkit-scrollbar-track {
    background: rgba(30, 15, 10, 0.5);
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb {
    background: #b87333;
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: #ffb300;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .control-panel {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        top: 100px;
        max-height: calc(100vh - 200px);
    }
    
    .info-panel {
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        bottom: 70px;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
}