/* ============================================
   中医养生时钟 - 独立样式模块
   版本: 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; }
}

/* ─────────────────────────────────────────────
   节气信息行 — 第一行节气名 + 第二行养生贴士
   ───────────────────────────────────────────── */
.m-clock-v2-jieqi {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(200,169,110,0.25);
}

/* 第一行：当前节气 + 下一节气 */
.m-clock-v2-jieqi-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    margin-bottom: 5px;
}

.m-clock-jieqi-current {
    font-size: 1rem;
    color: #666;
    white-space: nowrap;
}

.m-clock-jieqi-label {
    color: #999;
}

.m-clock-jieqi-name {
    color: #8B1A1A;
    font-weight: 700;
    font-size: 1rem;
    margin-left: 1px;
}

.m-clock-jieqi-next-tag {
    font-size: 1rem;
    color: #999;
    white-space: nowrap;
}

.m-clock-jieqi-next-tag strong {
    color: #C8A96E;
    font-weight: 600;
    font-size: 1rem;
    margin-left: 1px;
}

/* 太极图标 — 旋转动画 */
.m-clock-jieqi-taiji {
    display: inline-block;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0 2px;
    -webkit-animation: taiji-spin 8s linear infinite;
    animation: taiji-spin 8s linear infinite;
}
.m-clock-jieqi-taiji svg {
    display: block;
    width: 100%;
    height: 100%;
}

@-webkit-keyframes taiji-spin {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}
@keyframes taiji-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 第二行：养生贴士（居中） */
.m-clock-v2-jieqi-tip {
    font-size: 1rem;
    text-align: center;
    line-height: 1.5;
}

.m-clock-v2-jieqi-hint {
    font-size: 0.75rem;
    color: #bbb;
    text-align: center;
    margin-top: 2px;
}

.m-clock-jieqi-tip-link {
    text-decoration: underline;
    -webkit-text-decoration-color: rgba(200,169,110,0.5);
    text-decoration-color: rgba(200,169,110,0.5);
}

.m-clock-jieqi-tip-link:active {
    opacity: 0.7;
}

/* 无链接 — 黄灰色 */
.jieqi-nolink,
.m-clock-jieqi-tip-text.jieqi-nolink {
    color: #B8A88A;
}

/* 春 — 墨绿色 */
.jieqi-spring {
    color: #3B5E3B;
}
.jieqi-spring:active {
    color: #2D4A2D;
}

/* 夏 — 深红色 */
.jieqi-summer {
    color: #8B1A1A;
}
.jieqi-summer:active {
    color: #6B0F0F;
}

/* 秋 — 香槟金 */
.jieqi-autumn {
    color: #C8A96E;
}
.jieqi-autumn:active {
    color: #A88D50;
}

/* 冬 — 深蓝色 */
.jieqi-winter {
    color: #1B3A5C;
}
.jieqi-winter:active {
    color: #0F253C;
}

/* 小屏 */
@media (max-width: 360px) {
    .m-clock-jieqi-current { font-size: 0.9rem; }
    .m-clock-jieqi-name { font-size: 0.9rem; }
    .m-clock-jieqi-next-tag { font-size: 0.9rem; }
    .m-clock-jieqi-next-tag strong { font-size: 0.9rem; }
    .m-clock-v2-jieqi-tip { font-size: 0.9rem; }
    .m-clock-jieqi-taiji { width: 16px; height: 16px; }
}
