:root {
    --bg: #050505;
    --text: #ffffff;
    --accent: #00ff88;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

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

.ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.header {
    text-align: center;
    pointer-events: auto;
    mix-blend-mode: difference;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 10px;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
}

.controls p {
    position: relative;
}

.controls p::before {
    content: '•';
    position: absolute;
    left: -15px;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.controls p:first-child::before {
    display: none;
}

.palette-selector {
    pointer-events: auto;
    display: flex;
    gap: 15px;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 30px;
    width: fit-content;
    margin: 0 auto;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
    box-shadow: 0 0 10px currentColor;
}

.color-dot:hover {
    transform: scale(1.2);
}

.color-dot.active::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 10px white;
}

/* Themes */
.color-dot[data-theme="neon"] { background: linear-gradient(45deg, #ff00cc, #3333ff); color: #ff00cc; }
.color-dot[data-theme="ocean"] { background: linear-gradient(45deg, #00ffff, #0000ff); color: #00ffff; }
.color-dot[data-theme="sunset"] { background: linear-gradient(45deg, #ff9900, #ff0000); color: #ff9900; }
.color-dot[data-theme="matrix"] { background: linear-gradient(45deg, #00ff00, #003300); color: #00ff00; }

.theme-toggle {
    position: absolute;
    top: 40px;
    right: 40px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.5rem;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* Light Mode Overrides */
body.light-mode {
    --bg: #f0f0f0;
    --text: #111111;
}

body.light-mode .header h1 {
    background: linear-gradient(to right, #333, #000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

body.light-mode .controls {
    color: rgba(0,0,0,0.7);
}

body.light-mode .theme-toggle {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: #333;
}

body.light-mode .theme-toggle:hover {
    background: rgba(0,0,0,0.1);
}

body.light-mode .palette-selector {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; letter-spacing: 5px; }
    .controls { flex-direction: column; gap: 10px; align-items: center; }
    .controls p::before { display: none; }
}