
/* =============================================
   天幕 TianMu - 观测指南页面补充样式
   ============================================= */

/* ===== 滚动显现动画 ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* ===== 页面标题区 ===== */
.page-hero { position: relative; padding: var(--space-3xl) 0 var(--space-2xl); text-align: center; }
.page-hero-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin-bottom: var(--space-md); }
.page-hero-desc { color: var(--text-secondary); font-size: 1.1rem; max-width: 700px; margin: 0 auto; }

/* ===== 观测指南布局增强 ===== */
.obs-guide-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-2xl); padding: var(--space-2xl) 0; }
.obs-main { min-width: 0; }
.obs-sidebar { position: sticky; top: calc(var(--header-height) + var(--space-xl)); height: fit-content; max-height: calc(100vh - var(--header-height) - var(--space-xl)); overflow-y: auto; padding-right: 6px; }
.obs-sidebar-card { background: var(--color-bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-lg); margin-bottom: var(--space-lg); }
.obs-sidebar-title { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-subtle); }
.obs-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.obs-sidebar-link { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); color: var(--text-secondary); font-size: 0.9rem; border-radius: var(--radius-sm); transition: all var(--transition-fast); }
.obs-sidebar-link:hover, .obs-sidebar-link.active { background: rgba(79, 195, 247, 0.08); color: var(--color-primary); }
.obs-sidebar-link .link-icon { width: 18px; height: 18px; opacity: 0.6; }

/* ===== 内容区块 ===== */
.obs-section { margin-bottom: var(--space-3xl); }
.obs-section-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin-bottom: var(--space-lg); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: var(--space-sm); }
.obs-section-title .section-num { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(79,195,247,0.1); border-radius: 50%; font-size: 0.85rem; color: var(--color-primary); font-family: var(--font-mono); }

/* ===== 目标卡片网格 ===== */
.target-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.target-card { background: var(--color-bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition-normal); }
.target-card:hover { border-color: var(--border-medium); transform: translateY(-4px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.target-header { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-lg); border-bottom: 1px solid var(--border-subtle); }
.target-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: rgba(79,195,247,0.1); border-radius: var(--radius-md); color: var(--color-primary); flex-shrink: 0; }
.target-info { flex: 1; }
.target-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 2px; }
.target-type { font-size: 0.8rem; color: var(--text-muted); }
.target-body { padding: var(--space-lg); }
.target-data { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); margin-bottom: var(--space-md); }
.target-data-item { display: flex; flex-direction: column; gap: 2px; }
.target-data-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.target-data-value { font-size: 0.95rem; color: var(--text-primary); font-weight: 500; }
.target-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.target-footer { display: flex; gap: var(--space-xs); padding: 0 var(--space-lg) var(--space-lg); flex-wrap: wrap; }
.target-tag { padding: 2px 10px; background: rgba(79,195,247,0.08); border-radius: 100px; font-size: 0.75rem; color: var(--color-primary); }

/* ===== 筛选按钮 ===== */
.filter-bar { display: flex; gap: var(--space-sm); margin-bottom: var(--space-xl); flex-wrap: wrap; }
.filter-btn { padding: var(--space-xs) var(--space-md); background: var(--color-bg-card); border: 1px solid var(--border-subtle); border-radius: 100px; color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: all var(--transition-fast); }
.filter-btn:hover, .filter-btn.active { background: rgba(79,195,247,0.1); border-color: var(--color-primary); color: var(--color-primary); }

/* ===== 星图容器 ===== */
.skymap-container { background: var(--color-bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-xl); }
.skymap-header { display: flex; justify-content: space-between; align-items: center; padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; gap: var(--space-sm); }
.skymap-title { font-weight: 600; font-size: 1rem; }
.skymap-controls { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.skymap-control-btn { padding: var(--space-xs) var(--space-md); background: var(--color-bg-dark); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.8rem; cursor: pointer; transition: all var(--transition-fast); }
.skymap-control-btn:hover, .skymap-control-btn.active { border-color: var(--color-primary); color: var(--color-primary); background: rgba(79,195,247,0.08); }
.skymap-canvas { width: 100%; aspect-ratio: 16 / 9; background: var(--color-bg-deep); display: block; }
.skymap-legend { display: flex; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--border-subtle); font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.skymap-legend-item { display: flex; align-items: center; gap: var(--space-xs); }
.skymap-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ===== 观测条件评估 ===== */
.condition-card { background: var(--color-bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-xl); margin-bottom: var(--space-lg); }
.condition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.condition-item { text-align: center; }
.condition-gauge { width: 80px; height: 80px; margin: 0 auto var(--space-sm); position: relative; }
.condition-gauge svg { transform: rotate(-90deg); }
.condition-gauge-bg { fill: none; stroke: var(--border-subtle); stroke-width: 6; }
.condition-gauge-fill { fill: none; stroke: var(--color-primary); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset 1.5s ease; }
.condition-gauge-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--color-primary); }
.condition-label { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 2px; }
.condition-status { font-size: 0.75rem; color: var(--text-muted); }

/* ===== 望远镜对比表 ===== */
.telescope-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); }
.telescope-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 700px; table-layout: auto; }
.telescope-table th, .telescope-table td { padding: var(--space-md); border: 1px solid var(--border-subtle); text-align: left; }
.telescope-table th { background: var(--color-bg-dark); font-weight: 600; color: var(--text-primary); position: sticky; top: 0; cursor: pointer; user-select: none; white-space: nowrap; }
.telescope-table th:hover { background: rgba(79,195,247,0.05); }
.telescope-table th.asc::after { content: " ↑"; color: var(--color-primary); }
.telescope-table th.desc::after { content: " ↓"; color: var(--color-primary); }
.telescope-table td { color: var(--text-secondary); }
.telescope-table tr:hover td { background: rgba(79,195,247,0.03); }
.telescope-type { display: flex; align-items: center; gap: var(--space-sm); }
.telescope-type-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(79,195,247,0.1); border-radius: var(--radius-sm); color: var(--color-primary); flex-shrink: 0; }

/* ===== 行星卡片 ===== */
.planet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.planet-card { background: var(--color-bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-lg); cursor: pointer; transition: all var(--transition-normal); position: relative; overflow: hidden; }
.planet-card:hover { border-color: var(--border-medium); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.planet-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--color-primary), var(--color-accent)); opacity: 0; transition: opacity var(--transition-normal); }
.planet-card:hover::before { opacity: 1; }
.planet-header { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); }
.planet-visual { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; position: relative; }
.planet-visual::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(79,195,247,0.2); }
.planet-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.planet-ename { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.planet-brief { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; }
.planet-detail { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease; border-top: 1px solid var(--border-subtle); margin-top: var(--space-md); padding-top: 0; padding-bottom: 0; }
.planet-detail.open { max-height: 500px; opacity: 1; padding-top: var(--space-md); padding-bottom: var(--space-md); }
.planet-data-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.planet-data-row { display: flex; justify-content: space-between; padding: var(--space-xs) 0; border-bottom: 1px solid var(--border-subtle); font-size: 0.85rem; }
.planet-data-row:last-child { border-bottom: none; }
.planet-data-label { color: var(--text-muted); }
.planet-data-value { color: var(--text-primary); font-weight: 500; }

/* ===== 月相计算器 ===== */
.moon-phase-box { background: var(--color-bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-xl); text-align: center; }
.moon-phase-display { width: 160px; height: 160px; margin: 0 auto var(--space-md); }
.moon-phase-label { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--color-primary); margin-bottom: var(--space-xs); }
.moon-phase-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-lg); }
.moon-phase-controls { display: flex; justify-content: center; gap: var(--space-md); }
.moon-phase-btn { padding: var(--space-sm) var(--space-lg); background: var(--color-bg-dark); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: all var(--transition-fast); }
.moon-phase-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ===== 光污染等级 ===== */
.bortle-scale { display: flex; gap: 4px; margin-bottom: var(--space-lg); }
.bortle-zone { flex: 1; height: 40px; border-radius: var(--radius-sm); cursor: pointer; transition: transform 0.2s ease; position: relative; }
.bortle-zone:hover { transform: scaleY(1.15); z-index: 2; }
.bortle-zone[data-level="1"] { background: #0a1628; }
.bortle-zone[data-level="2"] { background: #1a2a4a; }
.bortle-zone[data-level="3"] { background: #2a3a5a; }
.bortle-zone[data-level="4"] { background: #4a5a6a; }
.bortle-zone[data-level="5"] { background: #6a7a8a; }
.bortle-zone[data-level="6"] { background: #8a9aaa; }
.bortle-zone[data-level="7"] { background: #aabaca; }
.bortle-zone[data-level="8"] { background: #caceda; }
.bortle-zone[data-level="9"] { background: #e8eaf6; }
.bortle-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); margin-bottom: var(--space-md); }
.bortle-info { background: rgba(79,195,247,0.05); border-radius: var(--radius-sm); padding: var(--space-md); font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; min-height: 60px; }

/* ===== 时间线增强 ===== */
.timeline-note { background: var(--color-bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-md); margin-top: var(--space-md); font-size: 0.85rem; color: var(--text-secondary); }
.timeline-note strong { color: var(--color-primary); }

/* ===== 信息框变体 ===== */
.danger-box { padding: var(--space-lg); background: rgba(255,138,128,0.05); border-left: 3px solid var(--color-danger); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: var(--space-lg) 0; }
.danger-box-title { font-weight: 600; color: var(--color-danger); margin-bottom: var(--space-sm); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .obs-guide-layout { grid-template-columns: 1fr; }
  .obs-main { min-width: 0; overflow-x: hidden; }
  .obs-sidebar { position: static; order: -1; }
  .obs-sidebar-card { margin-bottom: var(--space-md); }
  .obs-sidebar-nav { flex-direction: row; flex-wrap: wrap; }
  .target-grid { grid-template-columns: 1fr; }
  .condition-grid { grid-template-columns: repeat(2, 1fr); }
  .planet-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .skymap-canvas { aspect-ratio: 4 / 3; }
  .obs-main { min-width: 0; overflow-x: hidden; }
  .telescope-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; max-width: 100vw; }
  .telescope-table { min-width: unset; width: 100%; table-layout: auto; }
  .telescope-table th { white-space: nowrap; padding: var(--space-sm); font-size: 0.8rem; }
  .telescope-table td { white-space: normal; padding: var(--space-sm); font-size: 0.8rem; }
  .telescope-type { flex-wrap: wrap; }
  .condition-grid { grid-template-columns: 1fr; }
  .planet-grid { grid-template-columns: 1fr; }
  .bortle-scale { flex-wrap: wrap; }
  .bortle-zone { flex: 1 1 18%; height: 32px; }
}

@media (max-width: 480px) {
  .obs-section-title { font-size: 1.3rem; }
  .target-grid { gap: var(--space-md); }
  .moon-phase-display { width: 120px; height: 120px; }
}


/* ===== 侧边栏滚动条样式 ===== */
.obs-sidebar::-webkit-scrollbar { width: 4px; }
.obs-sidebar::-webkit-scrollbar-track { background: transparent; }
.obs-sidebar::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 2px; }
.obs-sidebar::-webkit-scrollbar-thumb:hover { background: var(--border-medium); }
.obs-sidebar { scrollbar-width: thin; scrollbar-color: var(--border-subtle) transparent; }
