/* ============================================
   中医养生时钟 - 独立样式模块
   版本: 2026-04-24
   ============================================ */

/* 时钟模块容器 */
.m-clock-v2 {
    background: #FFFDF9;
    border-radius: 16px;
    padding: 20px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(139, 26, 26, 0.08);
}

/* 时钟主体 - 三栏布局 */
.m-clock-v2-body {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* 左侧：时辰信息 */
.m-clock-v2-left {
    flex-shrink: 0;
    text-align: center;
    min-width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.m-clock-v2-name {
    font-family: 'Noto Serif SC', serif, 'SimSun';
    font-size: 2.8rem;
    font-weight: 700;
    color: #8B1A1A;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.m-clock-v2-meridian {
    display: inline-block;
    background: #8B1A1A;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 中间：动态时钟 - Canvas 容器 */
.m-clock-v2-center {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    /* 确保 Canvas 正常渲染 */
    line-height: 90px;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -6px;
}

.m-clock-v2-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #8B1A1A 0%, #A52A2A 100%);
    background: -webkit-linear-gradient(top, #8B1A1A 0%, #A52A2A 100%);
    position: relative;
    box-shadow: 0 4px 15px rgba(139, 26, 26, 0.3);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.m-clock-v2-face::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76%;
    height: 76%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #FFFDF9;
}

/* 时钟指针样式 - 禁用过渡动画防止闪跳 */
.m-clock-v2-hour,
.m-clock-v2-minute,
.m-clock-v2-second {
    -webkit-transition: none !important;
    transition: none !important;
    will-change: transform;
    -webkit-will-change: -webkit-transform;
}

.m-clock-v2-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #8B1A1A;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* 右侧：养生建议 */
.m-clock-v2-right {
    flex: 1;
    min-width: 0;
    margin-left: -4px;
    padding-left: 8px;
    min-height: 90px;
    display: flex;
    align-items: center;
    position: relative;
}

.m-clock-v2-right::before {
    display: none;
}

.m-clock-v2-tip {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 底部：进度条区域 */
.m-clock-v2-bottom {
    padding-top: 12px;
}

.m-clock-v2-time-labels {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.75rem;
    margin-bottom: 6px;
}

.m-clock-v2-progress {
    height: 6px;
    background: rgba(139, 26, 26, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.m-clock-v2-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8B1A1A 0%, #C8A96E 100%);
    border-radius: 3px;
    transition: width 1s ease;
}

.m-clock-v2-progress-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #8B1A1A 0%, #333 100%);
    border-radius: 1px;
    z-index: 1;
}

.m-clock-v2-next {
    color: #666;
    font-size: 0.85rem;
    text-align: center;
}

.m-clock-v2-next-name {
    color: #8B1A1A;
    font-weight: 600;
    font-size: 1.1rem;
}

.m-clock-v2-next-time {
    color: #999;
    margin: 0 4px;
}

/* 小屏幕适配 */
@media (max-width: 360px) {
    .m-clock-v2-name { font-size: 2.2rem; }
    .m-clock-v2-center { width: 70px; height: 70px; }
    .m-clock-v2-hour { height: 18px; }
    .m-clock-v2-minute { height: 24px; }
    .m-clock-v2-second { height: 26px; }
}
