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

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    overflow: hidden;
    background: #0a0a15;
    color: white;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 20px;
}

.loading-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #ffeb3b, #ff6f00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffeb3b, #ff6f00);
    transition: width 0.3s ease;
}

.loading-message {
    font-size: 1rem;
    color: white;
    opacity: 0.9;
}

/* Start Screen */
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

#preview-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.start-content {
    position: relative;
    text-align: center;
    z-index: 1;
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff1493, #9370db, #00bfff, #ffff00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.primary-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.2s;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.controls-hint {
    margin-top: 30px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.controls-hint p {
    margin: 5px 0;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.hud-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
}

.hud-top-right {
    position: absolute;
    top: 20px;
    right: 20px;
    pointer-events: auto;
}

.hud-bottom-center {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.hud-meter {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    min-width: 150px;
}

.hud-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.hud-value {
    display: inline-block;
    font-family: 'Fira Mono', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: 10px;
}

.meter-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 5px 0;
}

.meter-arc {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 5px 0;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000);
    transition: width 0.1s ease, height 0.1s ease;
}

.hud-counter {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 15px;
    border-radius: 10px;
}

.stamina-container {
    width: 200px;
    height: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.stamina-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.1s ease;
}

.icon-button {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    font-size: 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.settings-panel.show {
    right: 0;
}

.settings-content {
    padding: 30px;
}

.settings-content h2 {
    margin-bottom: 30px;
    font-size: 2rem;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.setting-group select,
.setting-group input[type="range"] {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.setting-group input[type="checkbox"] {
    margin-right: 10px;
}

/* Achievement Toast */
.achievement-toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: top 0.3s ease;
    z-index: 1000;
}

.achievement-toast.show {
    top: 30px;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
    z-index: 5;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

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

/* Mobile Adjustments */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .start-content {
        padding: 20px;
    }
    
    .settings-panel {
        max-width: 100%;
    }
    
    .hud-top-left,
    .hud-top-right {
        top: 10px;
    }
    
    .hud-top-left {
        left: 10px;
    }
    
    .hud-top-right {
        right: 10px;
    }
}