/* Zen Garden Styles - Peaceful, minimal, Japanese-inspired */

:root {
    --sand-light: #e8dcc4;
    --sand-dark: #c4b89a;
    --sand-line: #a89870;
    --stone-dark: #4a4a4a;
    --stone-mid: #6b6b6b;
    --stone-light: #8a8a8a;
    --accent-green: #5d7a5d;
    --accent-gold: #b8860b;
    --bg-cream: #f5f0e6;
    --bg-dark: #2d2d2d;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #d4c4a8;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', 'Hiragino Sans', sans-serif;
    background: var(--bg-cream);
    color: var(--text-dark);
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--accent-green), #4a6b4a);
    border-radius: 12px;
    color: white;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.tool-btn:hover {
    border-color: var(--accent-green);
    background: #f8f6f0;
}

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

.tool-btn .icon {
    font-size: 1.5rem;
}

.tool-btn .label {
    font-size: 0.75rem;
    margin-top: 2px;
}

.size-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.size-slider {
    width: 100px;
    accent-color: var(--accent-green);
}

#size-value {
    font-size: 0.85rem;
    min-width: 25px;
}

.stone-options {
    padding-left: 15px;
    border-left: 1px solid var(--border-color);
}

.stone-size-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.stone-size-btn:hover {
    background: #f0ede6;
}

.stone-size-btn.active {
    background: var(--stone-dark);
    color: white;
    border-color: var(--stone-dark);
}

.action-btn {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f0ede6;
    border-color: var(--accent-gold);
}

/* Canvas Container */
.canvas-container {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

#zen-canvas {
    display: block;
    width: 100%;
    height: 500px;
    border-radius: 8px;
    cursor: crosshair;
    background: var(--sand-light);
}

.garden-frame {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid var(--accent-green);
    border-radius: 8px;
    pointer-events: none;
    opacity: 0.3;
}

/* Side Panel */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-section {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.panel-section h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--accent-green);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Save/Load Controls */
.save-load-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.name-input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    width: 100%;
}

.name-input:focus {
    outline: none;
    border-color: var(--accent-green);
}

.primary-btn {
    padding: 10px 16px;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.primary-btn:hover {
    background: #4a6b4a;
}

.secondary-btn {
    padding: 10px 16px;
    background: #e0ddd5;
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: #d4d0c6;
}

/* Gardens List */
.gardens-list {
    max-height: 200px;
    overflow-y: auto;
}

.garden-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    background: #faf8f4;
    cursor: pointer;
    transition: all 0.2s;
}

.garden-item:hover {
    background: #f0ede6;
    border-color: var(--accent-green);
}

.garden-item .garden-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.garden-item .garden-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.garden-item .delete-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: color 0.2s;
}

.garden-item .delete-btn:hover {
    color: #d44;
}

.empty-message {
    color: var(--text-light);
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
}

/* Tips */
.tips-list {
    list-style: none;
    font-size: 0.85rem;
}

.tips-list li {
    padding: 6px 0;
    padding-left: 15px;
    position: relative;
    color: var(--text-light);
}

.tips-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-green);
}

/* Zen Quote */
.zen-quote {
    background: linear-gradient(135deg, #f8f6f0, #f0ede6);
    text-align: center;
}

.zen-quote #quote-text {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.zen-quote .quote-author {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 350px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: var(--accent-green);
}

.modal-content .warning {
    color: var(--accent-gold);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

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

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .side-panel {
        order: -1;
    }
    
    #zen-canvas {
        height: 400px;
    }
}

@media (max-width: 600px) {
    .toolbar {
        justify-content: center;
    }
    
    .tool-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #zen-canvas {
        height: 300px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
}
