body {
    margin: 0;
    overflow: hidden;
    background: radial-gradient(circle, #e0f7fa 0%, #d4f4f8 100%);
    height: 100vh;
}

.container {
    width: 100vw;
    height: 100vh;
}

svg {
    width: 100%;
    height: 100%;
}

/* 基础树根样式 */
.root-path {
    fill: none;
    stroke: #4CAF50;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 3px rgba(76, 175, 80, 0.2));
    /* 线条生长动画曲线 */
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 粗细分层：深度 7 最粗（靠近中心），深度 1 最细（末梢） */
.depth-7 { stroke-width: 6px; stroke: #2E7D32; }
.depth-6 { stroke-width: 5px; stroke: #388E3C; }
.depth-5 { stroke-width: 4px; stroke: #43A047; }
.depth-4 { stroke-width: 3.5px; stroke: #4CAF50; }
.depth-3 { stroke-width: 2.5px; stroke: #66BB6A; }
.depth-2 { stroke-width: 1.5px; stroke: #81C784; }
.depth-1 { stroke-width: 1px; stroke: #A5D6A7; }

.back-home {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 35px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 30px;
    background: rgba(255,255,255,0.2);
    color: #1b5e20;
    text-decoration: none;
    backdrop-filter: blur(10px);
    font-family: sans-serif;
    transition: 0.3s;
    z-index: 100;
}

/* 基础树根样式增加过渡属性 */
.root-path {
    fill: none;
    stroke: #4CAF50;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 3px rgba(76, 175, 80, 0.2));
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                stroke 0.3s ease;
    cursor: pointer;
    /* 确保旋转中心在路径起点，这样抖动更自然 */
    transform-origin: center; 
}

/* 鼠标经过时的治愈变色 */
.root-path:hover {
    stroke: #81C784;
}

/* 震颤动画类 */
.shaking {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(2deg) scale(1.02); }
    50% { transform: rotate(-2deg) scale(0.98); }
    75% { transform: rotate(1deg) scale(1.01); }
    100% { transform: rotate(0deg) scale(1); }
}

/* ... 之前的 depth 分层样式保持不变 ... */

/* 数字刻度样式 */
.clock-number {
    fill: #2e7d32;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 24px;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: middle;
    opacity: 0; /* 初始不可见 */
    transition: opacity 1s ease, transform 0.5s ease;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.8));
}

.number-visible {
    opacity: 0.8;
}

/* 指针基础样式 */
.hand {
    stroke-linecap: round;
    transition: transform 1s cubic-bezier(0.4, 2.08, 0.55, 0.44); /* 带有轻微回弹的转动 */
    transform-origin: 400px 400px;
}

#hour-hand {
    stroke: #2e357d;
    stroke-width: 6;
    filter: drop-shadow(0 0 8px rgba(64, 140, 191, 0.5));
}

#min-hand {
    stroke: #4c6aaf;
    stroke-width: 4;
    filter: drop-shadow(0 0 12px rgba(76, 102, 175, 0.6));
}

/* 让时钟数字更有“生长”出的感觉 */
.clock-number {
    fill: #1b5e20;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 22px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.number-visible { opacity: 0.7; }