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

body {
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

#ui-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    transition: opacity 0.3s;
}

#ui-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

#ui-panel h1 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

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

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.weather-buttons,
.scene-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.weather-btn,
.scene-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.weather-btn:hover,
.scene-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.weather-btn.active,
.scene-btn.active {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.sound-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    background: #2196F3;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.sound-btn:hover {
    background: #1976D2;
}

#volume-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 4px;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
}

#volume-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.timer-display {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    color: #333;
    padding: 10px 0;
}

.timer-buttons {
    display: flex;
    gap: 10px;
}

.timer-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #9C27B0;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.timer-buttons button:hover {
    background: #7B1FA2;
}

.breath-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #FF9800;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.breath-btn:hover {
    background: #F57C00;
}

.breath-btn.active {
    background: #E65100;
}

.hint {
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
}

#breath-circle {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    pointer-events: none;
}

#breath-circle.hidden {
    display: none;
}

.breath-ring {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid rgba(76, 175, 80, 0.3);
    background: radial-gradient(circle, rgba(76, 175, 80, 0.1), transparent);
    animation: breathe 8s ease-in-out infinite;
}

.breath-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    font-weight: 600;
    color: #4CAF50;
    text-align: center;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* 加载动画 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s;
}

#loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 隐藏UI按钮 */
#hide-ui {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 30px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s;
}

#hide-ui:hover {
    background: white;
    transform: translateX(-50%) translateY(-3px);
}
