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

body {
    font-family: 'Comic Neue', 'Architects Daughter', cursive, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

#canvas {
    display: block;
    margin: 20px auto;
    background: #f8f8f8;
    border: 3px solid #FF1493;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    cursor: crosshair;
    touch-action: none;
}

#controls {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.toolbar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.tool-section {
    margin-bottom: 20px;
}

.tool-section:last-child {
    margin-bottom: 0;
}

.tool-section label {
    display: block;
    font-weight: bold;
    color: #9B30FF;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    border: 2px solid #FF1493;
    background: white;
    color: #FF1493;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

button:hover {
    background: #FF1493;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.4);
}

button.active {
    background: #FF1493;
    color: white;
}

button.primary {
    background: linear-gradient(135deg, #FF1493, #9B30FF);
    color: white;
    border: none;
    font-size: 1.2em;
    padding: 15px 30px;
}

button.primary:hover {
    background: linear-gradient(135deg, #9B30FF, #FF1493);
    transform: translateY(-3px) scale(1.05);
}

button.secondary {
    background: #9B30FF;
    color: white;
    border: none;
}

button.secondary:hover {
    background: #FF00FF;
}

.color-palette {
    display: flex;
    gap: 10px;
}

.color-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.color-btn.active {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.counter {
    font-size: 1.5em;
    font-weight: bold;
    color: #FF1493;
    margin-bottom: 10px;
}

.motivational {
    font-size: 1.1em;
    color: #9B30FF;
    font-style: italic;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

.footer a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
}

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

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: fall 4s linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.achievement, .message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #FF1493, #9B30FF);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.achievement.show, .message.show {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .button-group {
        justify-content: center;
    }
    
    button {
        font-size: 0.9em;
        padding: 8px 16px;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .achievement, .message {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}