/* デジタル禅ガーデン - スタイルシート */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
    background: #2b2b2b;
    color: #333;
    overflow: hidden;
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, #e8dcc4 0%, #d4a574 100%);
}

header {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #333;
}

.subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tool-group, .pattern-group, .action-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tool-btn, .pattern-btn, .action-btn {
    padding: 0.75rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tool-btn:hover, .pattern-btn:hover, .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tool-btn.active, .pattern-btn.active {
    background: #333;
    color: white;
    border-color: #333;
}

.tool-btn svg, .action-btn svg {
    fill: currentColor;
    width: 24px;
    height: 24px;
}

.pattern-btn {
    min-width: 3rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.garden-container {
    flex: 1;
    position: relative;
    margin: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#zenCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.stones-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stone {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, #999, #333);
    border-radius: 50%;
    box-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.4),
        inset -2px -2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.zen-quotes {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-style: italic;
    font-size: 1.1rem;
    color: #444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease;
}

.zen-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.zen-mode-overlay.active {
    display: block;
}

.exit-zen-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 2px solid white;
    color: white;
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exit-zen-btn:hover {
    background: white;
    color: black;
    transform: rotate(90deg);
}

body.zen-mode .container {
    filter: brightness(0.8) contrast(1.1);
}

body.zen-mode .controls,
body.zen-mode header {
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .tool-group, .pattern-group, .action-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .zen-quotes {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
        bottom: 1rem;
        max-width: 90%;
    }
}

/* アニメーション */
@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 石を配置した時のエフェクト */
.stone-ripple {
    position: absolute;
    border: 2px solid #d4a574;
    border-radius: 50%;
    animation: ripple 1s ease-out;
    pointer-events: none;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}