/* Digital Coloring Game Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #F472B6;
    --background: #FDF2F8;
    --surface: #FFFFFF;
    --text: #1E293B;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, #A855F7 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#game-container {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--background);
}

.game-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}

.header-right {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--surface);
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
}

#color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    justify-content: center;
    background: var(--background);
}

.color-btn {
    width: 36px;
    height: 36px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-btn:hover {
    transform: scale(1.15);
}

.color-btn.active {
    border-color: #1E293B;
    transform: scale(1.2);
}

#canvas-container {
    padding: 16px;
    display: flex;
    justify-content: center;
    background: #F8FAFC;
}

#drawing-canvas {
    background: white;
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
    touch-action: none;
}

#brush-sizes {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px;
}

.size-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #E2E8F0;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    font-size: 12px;
    color: #64748B;
    transition: all 0.2s;
}

.size-btn:nth-child(1) {
    font-size: 8px;
}

.size-btn:nth-child(2) {
    font-size: 12px;
}

.size-btn:nth-child(3) {
    font-size: 18px;
}

.size-btn:nth-child(4) {
    font-size: 26px;
}

.size-btn:hover {
    border-color: var(--primary);
}

.size-btn.active {
    border-color: var(--primary);
    background: var(--background);
    color: var(--primary);
}

#tools {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--background);
}

.tool-btn {
    padding: 10px 20px;
    border: 2px solid #E2E8F0;
    border-radius: 50px;
    background: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-btn:hover {
    border-color: var(--primary);
}

.tool-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

#complete-section {
    padding: 16px;
    text-align: center;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--surface);
    padding: 32px;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: pop-in 0.4s ease;
}

@keyframes pop-in {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.stars {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-content h2 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-content p {
    color: #64748B;
    margin-bottom: 16px;
}

.artwork-preview {
    margin-bottom: 24px;
}

#preview-canvas {
    max-width: 200px;
    max-height: 150px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #A855F7 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(244, 114, 182, 0.4);
}

.btn-secondary {
    background: var(--background);
    color: var(--text);
    border: 2px solid #FBCFE8;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}