* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    flex-wrap: wrap;
}

#toolbar h1 {
    font-size: 1.5rem;
    background: linear-gradient(45deg, #e74c3c, #f39c12, #2ecc71, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tool-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s;
    background: #ecf0f1;
    color: #2c3e50;
}

.tool-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tool-btn.primary {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: white;
    padding: 12px 25px;
    font-size: 1rem;
    animation: pulse 2s infinite;
}

.tool-btn.primary:hover {
    background: linear-gradient(135deg, #c0392b, #e67e22);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
}

#currentColor {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: block;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#brushSize {
    width: 100px;
    accent-color: #e74c3c;
}

#colorPalette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.color:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.color.selected {
    border-color: #2c3e50;
    transform: scale(1.15);
}

#drawingCanvas {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    cursor: crosshair;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.1);
}

#threeContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: #87ceeb;
}

#instructions {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 20px;
    z-index: 100;
    text-align: center;
}

#instructions p {
    margin: 5px 0;
    font-size: 0.9rem;
}

#placementMarker {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px 25px;
    border-radius: 20px;
    z-index: 100;
    text-align: center;
    font-weight: bold;
    display: none;
    animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
    from { transform: translateX(-50%) translateY(0); }
    to { transform: translateX(-50%) translateY(-5px); }
}
