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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f1e8 0%, #e8dcc6 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: #6b5b47;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header p {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
}

.garden-container {
    position: relative;
    background: #8b7355;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.2),
        inset 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#canvas {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    cursor: crosshair;
    background: #f4e4bc;
    display: block;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.controls {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.control-btn {
    background: none;
    border: none;
    color: #6b5b47;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(107, 91, 71, 0.1);
    transform: scale(1.1);
}

.pattern-selector {
    display: flex;
    gap: 5px;
    padding: 0 10px;
    border-left: 1px solid rgba(107, 91, 71, 0.2);
    border-right: 1px solid rgba(107, 91, 71, 0.2);
}

.pattern-btn {
    background: none;
    border: 2px solid transparent;
    color: #6b5b47;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 40px;
}

.pattern-btn:hover,
.pattern-btn.active {
    background: rgba(107, 91, 71, 0.1);
    border-color: #6b5b47;
}

.color-selector {
    display: flex;
    gap: 5px;
    padding: 0 10px;
    border-right: 1px solid rgba(107, 91, 71, 0.2);
}

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

.color-btn:hover,
.color-btn.active {
    border-color: #6b5b47;
    transform: scale(1.1);
}

.width-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b5b47;
    font-size: 14px;
}

.width-control label {
    font-weight: 500;
}

#widthSlider {
    width: 80px;
    height: 6px;
    border-radius: 3px;
    background: #e0d4c1;
    outline: none;
    cursor: pointer;
}

#widthSlider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6b5b47;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#widthSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6b5b47;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.zen-stones {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
}

.stone {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 30%, #b8a082, #8b7355);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0.3;
}

.stone1 {
    width: 60px;
    height: 40px;
    top: 10%;
    left: 5%;
    transform: rotate(-15deg);
}

.stone2 {
    width: 80px;
    height: 50px;
    top: 20%;
    right: 8%;
    transform: rotate(25deg);
}

.stone3 {
    width: 45px;
    height: 35px;
    bottom: 15%;
    left: 10%;
    transform: rotate(45deg);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    #canvas {
        height: 400px;
    }
    
    .controls {
        flex-wrap: wrap;
        gap: 10px;
        padding: 8px 15px;
        bottom: 15px;
    }
    
    .pattern-selector,
    .color-selector {
        padding: 0 5px;
    }
    
    .width-control {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px solid rgba(107, 91, 71, 0.2);
    }
}

@media (max-width: 480px) {
    #canvas {
        height: 300px;
    }
    
    .controls {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 15px;
        justify-content: center;
    }
    
    .pattern-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }
    
    .color-btn {
        width: 25px;
        height: 25px;
    }
}

/* Fullscreen styles */
:fullscreen .garden-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    z-index: 9999;
}

:fullscreen #canvas {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
}

:fullscreen .controls {
    bottom: 20px;
    z-index: 10000;
}

/* Smooth animations */
.control-btn,
.pattern-btn,
.color-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus styles for accessibility */
.control-btn:focus,
.pattern-btn:focus,
.color-btn:focus,
#widthSlider:focus {
    outline: 2px solid #6b5b47;
    outline-offset: 2px;
}