/* =========================================================================
   Pomodoro Module Styles (右侧番茄钟终端 & 微型浮动倒计时 & Apple 滚轮调时)
   ========================================================================= */

.pomo-container {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: rgba(4, 8, 6, 0.65);
  min-width: 300px;
  position: relative;
  overflow: hidden;
}

/* 表盘主视窗 与 苹果滚轮设置视窗 */
.pomo-view-timer,
.pomo-view-settings {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  animation: fadeInPomo 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInPomo {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 顶部纯图标按钮 */
.frame-btn-icon-only {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: var(--emerald-bright);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: var(--scope-cursor);
  transition: all 0.2s ease;
  outline: none;
}

.frame-btn-icon-only:hover {
  background: rgba(52, 211, 153, 0.22);
  border-color: var(--emerald-bright);
  color: #fff;
  box-shadow: 0 0 10px var(--emerald-glow);
}

.frame-btn-icon-only svg {
  width: 13px;
  height: 13px;
}

/* 模式切换器：精简图标化双模块 (CYCLE + REST) */
.pomo-modes {
  display: flex;
  gap: 6px;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px;
  border-radius: 6px;
  border: 1px solid rgba(52, 211, 153, 0.18);
}

.pomo-modes-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pomo-modes-dual .pomo-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  padding: 7px 6px;
  border-radius: 4px;
  cursor: var(--scope-cursor);
  transition: all 0.22s ease;
}

.pomo-mode-btn .mode-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.pomo-mode-btn .mode-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.pomo-mode-btn .mode-badge {
  font-size: 9px;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-muted);
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.pomo-mode-btn:hover {
  color: var(--text-muted);
  background: rgba(52, 211, 153, 0.08);
}

.pomo-mode-btn.active {
  color: #070b09;
  background: var(--emerald-bright);
  font-weight: 700;
  box-shadow: 0 0 14px var(--emerald-glow);
}

.pomo-mode-btn.active .mode-badge {
  background: rgba(0, 0, 0, 0.7);
  color: var(--emerald-pale);
  border-color: transparent;
}

/* 阶段流转 5 秒铃声提醒横幅 */
.pomo-transition-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid var(--emerald-bright);
  border-radius: 4px;
  color: var(--text-main);
  font-size: 10.5px;
  box-shadow: 0 0 16px var(--emerald-glow);
  margin-top: 6px;
  animation: bannerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.pomo-transition-banner.long-break {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.transition-bell-icon {
  font-size: 13px;
  display: inline-block;
  animation: bellShake 0.6s infinite ease-in-out;
}

@keyframes bellShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}

.transition-text {
  flex: 1;
  letter-spacing: 0.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transition-countdown {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--emerald-bright);
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.pomo-transition-banner.long-break .transition-countdown {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

/* 倒计时主视区 (圆形进度环 + 赛博数码读数) */
.timer-dial-wrapper {
  position: relative;
  width: 185px;
  height: 185px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  cursor: var(--scope-cursor);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.timer-dial-wrapper:hover {
  transform: scale(1.02);
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-track {
  fill: none;
  stroke: rgba(16, 185, 129, 0.12);
  stroke-width: 5;
}

.timer-progress {
  fill: none;
  stroke: var(--emerald-bright);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.4s linear, stroke 0.3s ease;
  filter: drop-shadow(0 0 6px var(--emerald-glow));
}

.timer-digits-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald-primary);
  color: var(--emerald-bright);
  margin-bottom: 2px;
  transition: all 0.3s ease;
}

.phase-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 4px currentColor;
  display: inline-block;
  animation: none;
}

.timer-phase-badge.phase-short-break {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

.timer-phase-badge.phase-long-break {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* 进度环在休息模式下的动态色彩 */
.timer-progress.phase-short-break {
  stroke: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.timer-progress.phase-long-break {
  stroke: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
}

.timer-digits {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 2px;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.65);
  font-variant-numeric: tabular-nums;
  position: relative;
}

.timer-edit-icon-hover {
  position: absolute;
  top: 8px;
  right: -16px;
  color: var(--emerald-bright);
  opacity: 0;
  cursor: var(--scope-cursor);
  transition: all 0.25s ease;
  pointer-events: none;
}

.timer-edit-icon-hover svg {
  width: 14px;
  height: 14px;
}

.timer-dial-wrapper:hover .timer-edit-icon-hover {
  opacity: 0.85;
  transform: rotate(45deg);
}

.timer-state-label {
  font-size: 10px;
  color: var(--emerald-primary);
  letter-spacing: 1.5px;
  margin-top: -2px;
  text-transform: uppercase;
  opacity: 0.85;
}

/* 会话统计信息 (极简图标化) */
.session-badge {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed rgba(52, 211, 153, 0.22);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.session-badge-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.session-badge-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--text-muted);
}

.session-badge-title svg {
  width: 12px;
  height: 12px;
  color: var(--emerald-bright);
}

.session-badge-counter {
  color: var(--emerald-bright);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
}

.session-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.dot-session {
  width: 13px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid var(--emerald-primary);
  background: transparent;
  transition: all 0.3s ease;
  position: relative;
}

.dot-session.filled {
  background: var(--emerald-bright);
  box-shadow: 0 0 6px var(--emerald-bright);
  border-color: var(--emerald-bright);
}

.dot-session.current {
  border-color: var(--emerald-bright);
  background: rgba(52, 211, 153, 0.25);
  box-shadow: 0 0 5px var(--emerald-glow);
  animation: none;
}

.dot-session.is-long-break {
  border-style: double;
  border-width: 2px;
  border-color: #38bdf8;
}

.dot-session.is-long-break::after {
  content: '☕';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  opacity: 0.75;
}

.session-rhythm-hint {
  font-size: 9.5px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-align: center;
}

/* 🍎 苹果风格滚轮设置面板 (Apple iOS Cupertino Wheel Picker) */
.settings-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(52, 211, 153, 0.15);
}

.settings-heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-bright);
  letter-spacing: 1px;
  display: block;
}

.settings-subheading {
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  display: block;
}

.btn-close-settings {
  background: transparent;
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: var(--scope-cursor);
  transition: all 0.2s ease;
  outline: none;
}

.btn-close-settings:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

/* iOS 分段控制器 (Segmented Control) */
.settings-tabs {
  display: flex;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px;
  border-radius: 6px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  margin: 6px 0;
  gap: 3px;
}

.settings-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 6px 2px;
  border-radius: 4px;
  cursor: var(--scope-cursor);
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.settings-tab-btn .tab-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.settings-tab-btn:hover {
  color: var(--text-muted);
}

.settings-tab-btn.active {
  background: rgba(16, 185, 129, 0.22);
  color: var(--emerald-bright);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

/* 🍎 iOS 滚轮视口 (Wheel Picker Viewport) */
.ios-picker-box {
  position: relative;
  width: 100%;
  height: 180px;
  background: radial-gradient(circle at center, rgba(6, 20, 14, 0.85) 0%, rgba(3, 7, 5, 0.95) 100%);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.85);
  /* 苹果核心上下渐变隐退透镜遮罩 */
  mask-image: linear-gradient(to bottom, transparent 0%, black 28%, black 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 28%, black 72%, transparent 100%);
}

/* 苹果中央透镜指示槽 (Center Lens Indicator) */
.ios-picker-lens {
  position: absolute;
  top: 72px; /* 180 / 2 - 36 / 2 = 72px */
  left: 6px;
  right: 6px;
  height: 36px;
  background: rgba(52, 211, 153, 0.08);
  border-top: 1px solid rgba(52, 211, 153, 0.45);
  border-bottom: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.15);
  z-index: 2;
}

/* 滚轮列并排容器 */
.picker-columns-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
}

.picker-col {
  flex: 1;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 滚轮滚动主体：带 snap 吸附和隐藏滚动条 */
.picker-wheel {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  padding: 72px 0; /* 72px 刚好使得头尾都能滑入中心高亮槽 */
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;
  touch-action: pan-y;
  user-select: none;
}

.picker-wheel::-webkit-scrollbar {
  display: none;
}

/* 滚轮单元项 (严格单行、防止任何撑高变形) */
.picker-item {
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text-dim);
  scroll-snap-align: center;
  cursor: var(--scope-cursor);
  transition: color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  user-select: none;
  opacity: 0.35;
  transform: scale(0.85);
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.picker-item:hover {
  color: var(--text-muted);
  opacity: 0.65;
}

.picker-item.active {
  color: var(--text-main);
  font-size: 22px;
  font-weight: 700;
  opacity: 1;
  transform: scale(1.05);
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.75);
}

/* 冒号与斜杠分隔符 */
.picker-col-colon {
  font-size: 20px;
  font-weight: 700;
  color: var(--emerald-primary);
  margin: 0 4px;
  user-select: none;
  z-index: 3;
}

/* 单位小标签 (MIN / SEC / 轮) */
.picker-unit-tag {
  position: absolute;
  right: 12px;
  top: calc(50% - 6px);
  font-size: 9px;
  color: var(--emerald-primary);
  opacity: 0.7;
  pointer-events: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 3;
}

/* 说明与按键 */
.settings-note {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--emerald-primary);
  width: 100%;
  line-height: 1.4;
  margin: 4px 0;
}

.settings-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

/* 控制按键组 */
.timer-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.btn-timer {
  flex: 1;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  border: 1px solid var(--border-dim);
  background: rgba(16, 185, 129, 0.08);
  color: var(--emerald-bright);
  cursor: var(--scope-cursor);
  transition: all 0.2s ease;
  outline: none;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-timer svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-timer:hover {
  background: rgba(52, 211, 153, 0.22);
  border-color: var(--emerald-bright);
  box-shadow: 0 0 14px var(--emerald-glow);
  color: #fff;
}

.btn-timer:active {
  transform: scale(0.98);
}

.btn-timer.primary {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-primary);
}

.btn-timer.primary.running {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.btn-timer.primary.running:hover {
  background: rgba(239, 68, 68, 0.28);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

/* 右侧收起浮动气泡样式已统一收敛至 css/layout.css (.cyber-floating-pill) */
