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

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a; color: #fff; overflow: hidden;
    user-select: none; -webkit-user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

canvas { display: block; cursor: grab; }
canvas:active { cursor: grabbing; }

.banner {
    position: fixed; top: 20px; left: 20px;
    z-index: 10; text-align: left; pointer-events: none;
}

.banner h1 {
    font-size: 2.2rem; font-weight: 700; letter-spacing: 3px;
    color: #e8c291; text-shadow: 0 0 20px rgba(232, 194, 145, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner p {
    font-size: 0.9rem; margin-top: 5px; 
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease;
}
.banner h1:hover { 
    transform: scale(1.05); 
    text-shadow: 0 0 30px rgba(232, 194, 145, 0.5); 
}

/* controls area */
.controls {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 25px; align-items: center; z-index: 10;
    background: rgba(0, 0, 0, 0.85); padding: 20px 30px;
    border-radius: 15px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.color-group, .tool-group, .size-group, .mold-group {
    display: flex; align-items: center; gap: 12px;
}

/* color buttons */
.color-btn {
    width: 50px; height: 50px; border: none; border-radius: 50%;
    cursor: pointer; position: relative; overflow: hidden;
    font-size: 11px; font-weight: 600; color: rgba(0,0,0,0.8);
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
                0 2px 8px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.color-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
                0 4px 15px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.color-btn:active { transform: translateY(-1px) scale(1.05); }

.color-btn::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}
.color-btn:hover::before { left: 100%; }

.color-btn::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 0; height: 0; background: rgba(255, 255, 255, 0.3);
    border-radius: 50%; transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}
.color-btn:active::after { width: 100px; height: 100px; }

/* tool buttons */
.tool-btn {
    padding: 12px 18px; background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px;
    color: #fff; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.tool-btn.active {
    background: rgba(232, 194, 145, 0.3);
    border-color: rgba(232, 194, 145, 0.5);
    color: #e8c291; box-shadow: 0 0 15px rgba(232, 194, 145, 0.3);
}

.tool-btn::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 0; height: 100%; background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease; z-index: -1;
}
.tool-btn:hover::before { width: 100%; }

/* size controls */
.size-label {
    font-size: 12px; color: rgba(255, 255, 255, 0.8);
    font-weight: 500; margin-right: 8px;
}

.size-slider {
    width: 100px; height: 6px; border-radius: 3px;
    background: rgba(255, 255, 255, 0.2); outline: none;
    -webkit-appearance: none; cursor: pointer;
}

.size-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px;
    border-radius: 50%; background: #e8c291;
    cursor: pointer; border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}
.size-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2); box-shadow: 0 3px 10px rgba(232, 194, 145, 0.4);
}

.size-slider::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: #e8c291; cursor: pointer; border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* other buttons */
button {
    padding: 12px 18px; background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px;
    color: #fff; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}

button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active { transform: translateY(0); }

.help-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: bold; padding: 0;
    background: rgba(232, 194, 145, 0.2);
    border-color: rgba(232, 194, 145, 0.4);
    color: #e8c291;
}
.help-btn:hover {
    transform: translateY(-2px) rotate(15deg);
    background: rgba(232, 194, 145, 0.3);
    box-shadow: 0 0 20px rgba(232, 194, 145, 0.4);
}

.theme-btn {
    background: linear-gradient(45deg, rgba(232, 194, 145, 0.2), rgba(123, 179, 211, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}
.theme-btn:hover {
    background: linear-gradient(45deg, rgba(232, 194, 145, 0.3), rgba(123, 179, 211, 0.3));
    box-shadow: 0 0 25px rgba(200, 180, 160, 0.3);
}

/* tutorial button */
#tutorial-btn {
    position: fixed; top: 20px; right: 20px; z-index: 15;
    width: 45px; height: 45px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.8); border: 1px solid rgba(255, 255, 255, 0.3);
    color: #e8c291; font-size: 18px; font-weight: bold;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}
#tutorial-btn:hover {
    background: rgba(232, 194, 145, 0.2);
    transform: scale(1.1); box-shadow: 0 0 20px rgba(232, 194, 145, 0.3);
}

/* responsive stuff */
@media (max-width: 768px) {
    .banner h1 { font-size: 1.8rem; letter-spacing: 2px; }
    
    .controls {
        bottom: 20px; padding: 15px 20px; gap: 15px;
        flex-wrap: wrap; justify-content: center;
    }
    
    .color-btn { width: 40px; height: 40px; font-size: 10px; }
    .tool-btn { padding: 10px 14px; font-size: 12px; }
    .size-slider { width: 80px; }
    
    #tutorial-btn { width: 40px; height: 40px; font-size: 16px; }
}

@media (max-width: 480px) {
    .banner h1 { font-size: 1.5rem; letter-spacing: 1px; }
    
    .controls {
        padding: 12px 15px; gap: 10px;
        max-width: 90vw;
    }
    
    .color-btn { width: 35px; height: 35px; font-size: 9px; }
    .tool-btn { padding: 8px 12px; font-size: 11px; }
    .size-slider { width: 60px; }
}

@media (max-width: 320px) {
    .banner h1 { font-size: 1.2rem; }
    .controls { gap: 8px; padding: 10px 12px; }
    .color-btn { width: 30px; height: 30px; font-size: 8px; }
}
