:root {
    --bg-color: #f0f0f5;
    --accent-color: #ff0055;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(0, 0, 0, 0.05);
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    /* 淡灰色到淡蓝色的优雅过渡 */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    /* Dark text for visibility */
}

#container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

#ui-overlay {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 10;
    pointer-events: none;
}

.glass-panel {
    padding: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    transition: transform 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
}

h1 {
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, #333, var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

button,
.upload-btn {
    padding: 10px 20px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
}

button:hover,
.upload-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
}

#record-btn:not(:disabled) {
    border-color: #ff0055;
    color: #ff0055;
}

#record-btn.recording {
    background: #ff0055;
    color: white;
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 85, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 85, 0);
    }
}

#waveform-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 450px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: flex;
    align-items: center;
    /* Center for symmetric growth */
    justify-content: center;
    pointer-events: none;
}

#waveform {
    width: 100%;
    height: 100%;
}

#audio-upload {
    display: none;
}

#status {
    font-size: 0.8rem;
    opacity: 0.6;
    letter-spacing: 1px;
    color: #ff4d4d;
    /* High-visibility red */
}