:root {
    --bg-gradient: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    --accent-color: #f0f9ff;
    --text-color: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 900px;
    height: 100vh;
    padding: 1rem;
}

header {
    text-align: center;
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -1px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

header p {
    font-size: clamp(0.75rem, 2vw, 1rem);
    color: #f0f9ff;
    font-weight: 300;
}

.canvas-container {
    position: relative;
    width: min(80vw, 80vh, 500px);
    height: min(80vw, 80vh, 500px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    cursor: crosshair;
    flex-shrink: 0;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    touch-action: none;
}

.controls-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 100%;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
}

input[type="range"] {
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
    width: 120px;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

input[type="color"] {
    appearance: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch {
    border-radius: 50%;
    border: 2px solid var(--glass-border);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.85rem;
}

.btn.primary {
    background: var(--accent-color);
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Rotation class */
.rotating {
    animation: rotate-snowflake 20s linear infinite;
}

@keyframes rotate-snowflake {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Snowflake animation */
.snowflake {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
    }

    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}