:root {
    --bg-color: #0f1016;
    --text-primary: #ffffff;
    --text-secondary: #a1a1b5;
    --accent: #ff476e;
    --panel-bg: rgba(20, 21, 30, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* Loading Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass {
    background: rgba(15, 16, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.loader-container {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 0 auto 20px auto;
}

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

.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.loading-progress {
    font-size: 1.8rem;
    color: var(--accent);
    font-weight: 700;
    margin: 0;
}

/* UI Panel */
#ui-container {
    position: absolute;
    top: 40px;
    left: 40px;
    padding: 28px;
    border-radius: 20px;
    z-index: 10;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(-20px);
    opacity: 0;
    animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
    min-width: 260px;
}

@keyframes slideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#ui-container h2 {
    margin: 0 0 6px 0;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #b0b0c0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

#ui-container p {
    margin: 0 0 24px 0;
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 500;
}

.controls-hint {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.controls-hint span {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.02);
}

.button {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: calc(100% - 48px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.button:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 71, 110, 0.25);
}
