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

:root {
    --bg-color: white;
    --toolbar-bg: rgba(255, 255, 255, 0.95);
    --toolbar-border: rgba(0, 0, 0, 0.1);
    --button-bg: white;
    --button-hover-bg: #f5f5f5;
    --button-border: rgba(0, 0, 0, 0.15);
    --text-color: #333;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0a0a0a;
        --toolbar-bg: rgba(20, 20, 20, 0.95);
        --toolbar-border: rgba(255, 255, 255, 0.1);
        --button-bg: #1a1a1a;
        --button-hover-bg: #2a2a2a;
        --button-border: rgba(255, 255, 255, 0.15);
        --text-color: #e0e0e0;
    }
}

[data-theme="dark"] {
    --bg-color: #0a0a0a;
    --toolbar-bg: rgba(20, 20, 20, 0.95);
    --toolbar-border: rgba(255, 255, 255, 0.1);
    --button-bg: #1a1a1a;
    --button-hover-bg: #2a2a2a;
    --button-border: rgba(255, 255, 255, 0.15);
    --text-color: #e0e0e0;
}

[data-theme="dark"] .color-btn {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .color-btn.active {
    border-color: white;
}

[data-theme="dark"] .icon-btn {
    background: rgba(30, 30, 30, 0.9);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .icon-btn:hover {
    background: rgba(50, 50, 50, 0.95);
}

[data-theme="dark"] .start-button {
    background: rgba(30, 30, 30, 0.9);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .start-button:hover {
    background: rgba(50, 50, 50, 0.95);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--bg-color);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Toolbar */
.toolbar {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    z-index: 100;
    pointer-events: none;
}

/* Color Palette */
.color-palette {
    display: contents;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    pointer-events: all;
}

.color-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-btn.active {
    border-color: white;
    border-width: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
    .color-btn {
        border-color: rgba(255, 255, 255, 0.3);
    }

    .color-btn.active {
        border-color: white;
    }
}

/* Spacer */
.spacer {
    flex: 1;
    pointer-events: none;
}

/* Icon Buttons - Now round like color buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    pointer-events: all;
}

@media (prefers-color-scheme: dark) {
    .icon-btn {
        background: rgba(30, 30, 30, 0.9);
        color: #e0e0e0;
        border-color: rgba(255, 255, 255, 0.3);
    }
}

.icon-btn:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    .icon-btn:hover {
        background: rgba(50, 50, 50, 0.95);
    }
}

.icon-btn:active {
    transform: scale(0.95);
}

.icon-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.icon-btn:disabled:hover {
    transform: none;
}

/* Canvas */
#drawingCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    cursor: crosshair;
    touch-action: none;
    background: var(--bg-color);
}

/* Start Overlay - alleen tonen indien nodig */
.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* Standaard verborgen, JS toont indien nodig */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.start-overlay.hidden {
    display: none !important;
}

.start-content {
    text-align: center;
}

.start-content h1 {
    display: none; /* Verberg titel, alleen knop tonen */
}

.start-content p {
    display: none; /* Verberg tekst, alleen knop tonen */
}

.start-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

@media (prefers-color-scheme: dark) {
    .start-button {
        background: rgba(30, 30, 30, 0.9);
        color: #e0e0e0;
        border-color: rgba(255, 255, 255, 0.3);
    }
}

.start-button:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
    .start-button:hover {
        background: rgba(50, 50, 50, 0.95);
    }
}

.start-button:active {
    transform: scale(0.95);
}

.start-button:disabled {
    opacity: 0.5;
}

/* Mobile */
@media (max-width: 768px) {
    .toolbar {
        top: 12px;
        left: 12px;
        right: 12px;
        gap: 8px;
        justify-content: center;
    }

    .spacer {
        display: none;
    }

    .color-btn {
        width: 36px;
        height: 36px;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .start-button {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .toolbar {
        top: 8px;
        left: 8px;
        right: 8px;
        gap: 6px;
        justify-content: center;
    }

    .spacer {
        display: none;
    }

    .color-btn {
        width: 32px;
        height: 32px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .start-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}
