/* ===== 深呼吸 · 一分钟平静 · 专属样式 ===== */

/* ---- 舞台 ---- */
.db-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 24px 48px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        radial-gradient(620px 420px at 50% 30%, #e8f0ff 0%, transparent 60%),
        radial-gradient(560px 360px at 12% 90%, #eaf6ff 0%, transparent 60%),
        radial-gradient(520px 320px at 88% 88%, #f3efff 0%, transparent 60%),
        linear-gradient(180deg, #f7f9ff 0%, #f3f6ff 100%);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    transition: background 0.8s ease;
}

/* 流动光晕背景 */
.db-ambient {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 480px;
    height: 480px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
    animation: db-ambient-pan 12s ease-in-out infinite alternate;
    filter: blur(8px);
}
@keyframes db-ambient-pan {
    0%   { transform: translate(-54%, -54%) scale(1); opacity: 0.7; }
    100% { transform: translate(-46%, -46%) scale(1.15); opacity: 1; }
}

/* ---- 圆环容器 ---- */
.db-ring-wrap {
    position: relative;
    width: 320px;
    height: 320px;
    margin-bottom: 28px;
    z-index: 1;
}

.db-ring {
    position: absolute;
    inset: 0;
    width: 320px;
    height: 320px;
    transform: rotate(-90deg);
}

.db-ring-track {
    fill: none;
    stroke: rgba(124, 92, 255, 0.14);
    stroke-width: 6;
}

.db-ring-bar {
    fill: none;
    stroke: url(#dbRingGrad);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 816.81; /* 2*pi*130 */
    stroke-dashoffset: 816.81;
    transition: stroke-dashoffset 0.12s linear, stroke-width 0.4s ease;
    filter: drop-shadow(0 0 10px rgba(124, 92, 255, 0.45));
}

/* ---- 中心呼吸圆 ---- */
.db-core-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.db-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 38%, rgba(255, 255, 255, 0.95) 0%, #a7c5ff 38%, #7c5cff 75%, #4a2fb0 100%);
    box-shadow:
        inset 0 12px 28px rgba(255, 255, 255, 0.55),
        inset 0 -16px 30px rgba(74, 47, 176, 0.45),
        0 24px 60px rgba(124, 92, 255, 0.35);
    transform: scale(0.62);
    transition: transform 0.1s linear, background 0.8s ease, box-shadow 0.8s ease;
    will-change: transform;
}
/* 文字层独立定位，不随 core 缩放，保持可读 */
.db-core-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84%;
    text-align: center;
    pointer-events: none;
    z-index: 2;
}
.db-text {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 12px rgba(74, 47, 176, 0.5);
    line-height: 1.2;
    transition: color 0.4s ease;
}
.db-phase-time {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

/* 阶段配色：吸气偏青蓝、屏住偏紫、呼气偏粉、放松偏绿 */
.db-hero[data-phase="inhale"]  .db-core { background: radial-gradient(circle at 40% 38%, rgba(255,255,255,0.95) 0%, #8fd9ff 38%, #00b8d4 75%, #006680 100%); box-shadow: inset 0 12px 28px rgba(255,255,255,0.6), inset 0 -16px 30px rgba(0,102,128,0.45), 0 24px 60px rgba(0,184,212,0.4); }
.db-hero[data-phase="hold"]    .db-core { background: radial-gradient(circle at 40% 38%, rgba(255,255,255,0.95) 0%, #c5b0ff 38%, #7c5cff 75%, #3a1f8a 100%); box-shadow: inset 0 12px 28px rgba(255,255,255,0.55), inset 0 -16px 30px rgba(58,31,138,0.45), 0 24px 60px rgba(124,92,255,0.4); }
.db-hero[data-phase="exhale"]  .db-core { background: radial-gradient(circle at 40% 38%, rgba(255,255,255,0.95) 0%, #ffc0d6 38%, #ff6b9d 75%, #a3245c 100%); box-shadow: inset 0 12px 28px rgba(255,255,255,0.55), inset 0 -16px 30px rgba(163,36,92,0.4), 0 24px 60px rgba(255,107,157,0.4); }
.db-hero[data-phase="rest"]    .db-core { background: radial-gradient(circle at 40% 38%, rgba(255,255,255,0.95) 0%, #b8f0d8 38%, #00c896 75%, #00735c 100%); box-shadow: inset 0 12px 28px rgba(255,255,255,0.55), inset 0 -16px 30px rgba(0,115,92,0.4), 0 24px 60px rgba(0,200,150,0.4); }

/* ---- 循环计数 ---- */
.db-cycles {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(124, 92, 255, 0.18);
    backdrop-filter: blur(8px);
    z-index: 1;
}
.db-cycles .k {
    font-size: 13px;
    color: var(--c-text-muted);
    font-weight: 600;
}
.db-cycles .v {
    font-size: 20px;
    font-weight: 800;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}
.db-cycles .unit {
    font-size: 13px;
    color: var(--c-text-muted);
    font-weight: 600;
}

/* ---- 控制栏 ---- */
.db-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 28px 24px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.db-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 760px;
}
.db-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    background: var(--c-bg-soft);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.22s ease;
    text-align: center;
}
.db-method:hover {
    border-color: rgba(124, 92, 255, 0.4);
    transform: translateY(-2px);
}
.db-method.active {
    background: #fff;
    border-color: var(--c-accent-purple);
    box-shadow: 0 8px 22px rgba(124, 92, 255, 0.18);
}
.db-m-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--c-text);
    letter-spacing: -0.01em;
}
.db-method.active .db-m-name {
    color: var(--c-accent-purple);
}
.db-m-desc {
    font-size: 12px;
    color: var(--c-text-muted);
    font-variant-numeric: tabular-nums;
}

.db-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.db-actions .btn-ghost {
    padding: 10px 16px;
    font-size: 14px;
}

.db-tip {
    font-size: 13.5px;
    color: var(--c-text-muted);
    text-align: center;
    max-width: 540px;
    line-height: 1.6;
}

/* 运行态：按钮文字切换、节奏卡淡化交互 */
.db-hero[data-running="1"] .db-method:not(.active) { opacity: 0.55; }

/* ---- 工具简介 ---- */
.db-info { margin-bottom: 32px; }
.db-info .detail-title-row { margin-bottom: 12px; }
.db-info .detail-badges { margin-bottom: 12px; }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .db-hero { padding: 44px 16px 36px; }
    .db-ring-wrap { width: 260px; height: 260px; }
    .db-ring { width: 260px; height: 260px; }
    .db-core-wrap { width: 162px; height: 162px; }
    .db-text { font-size: 22px; }
    .db-phase-time { font-size: 12px; }
    .db-methods { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 480px) {
    .db-ring-wrap { width: 220px; height: 220px; }
    .db-ring { width: 220px; height: 220px; }
    .db-core-wrap { width: 138px; height: 138px; }
    .db-text { font-size: 19px; }
    .db-actions { flex-direction: column; width: 100%; }
    .db-actions .btn { width: 100%; }
}
