/* =============================================
   天幕 TianMu - 天文摄影页面样式
   ============================================= */

/* ===== 摄影画廊 Masonry ===== */
.photo-gallery {
  column-count: 3;
  column-gap: var(--space-md);
}

.photo-item {
  break-inside: avoid;
  margin-bottom: var(--space-md);
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  display: block;
  transition: transform var(--transition-slow);
}

.photo-item:hover img {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 11, 20, 0.95) 0%, rgba(7, 11, 20, 0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.photo-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.photo-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.photo-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 教程卡片 ===== */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.tutorial-card {
  background: var(--color-bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.tutorial-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.tutorial-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.tutorial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.tutorial-card:hover .tutorial-image img {
  transform: scale(1.05);
}

.tutorial-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 11, 20, 0.4);
}

.tutorial-play-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 195, 247, 0.9);
  border-radius: 50%;
  color: var(--text-inverse);
  transition: all var(--transition-normal);
}

.tutorial-card:hover .tutorial-play-icon {
  transform: scale(1.1);
  background: var(--color-primary);
}

.tutorial-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tutorial-level {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  margin-bottom: var(--space-sm);
}

.tutorial-level-beginner { background: rgba(105, 240, 174, 0.15); color: var(--color-success); }
.tutorial-level-intermediate { background: rgba(255, 213, 79, 0.15); color: var(--color-warning); }
.tutorial-level-advanced { background: rgba(255, 138, 128, 0.15); color: var(--color-danger); }

.tutorial-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.tutorial-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}

.tutorial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== 设备参数卡片 ===== */
.gear-card {
  background: var(--color-bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.gear-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-glow);
}

.gear-image {
  aspect-ratio: 16 / 10;
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.gear-body {
  padding: var(--space-lg);
}

.gear-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.gear-brand {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.gear-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.gear-spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gear-spec-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gear-spec-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== 后期处理步骤 ===== */
.process-steps {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-md);
}

.process-step {
  min-width: 200px;
  flex: 1;
  background: var(--color-bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  position: relative;
}

.process-step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -20px;
  width: 20px;
  height: 2px;
  background: var(--border-medium);
}

.process-step:last-child::after {
  display: none;
}

.process-step-num {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 195, 247, 0.1);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.process-step-title {
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.process-step-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== 参数对比表 ===== */
.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.param-table th,
.param-table td {
  padding: var(--space-md);
  border: 1px solid var(--border-subtle);
}

.param-table th {
  background: var(--color-bg-dark);
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}

.param-table td {
  color: var(--text-secondary);
}

.param-table tr:nth-child(even) td {
  background: rgba(79, 195, 247, 0.02);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .photo-gallery { column-count: 2; }
  .tutorial-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .photo-gallery { column-count: 1; }
  .process-steps { flex-direction: column; }
  .process-step::after { display: none; }
  .process-step { min-width: auto; }
  .param-table { font-size: 0.8rem; }
  .param-table th, .param-table td { padding: var(--space-sm); }
}


/* ===== 作品详情模态框 ===== */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.photo-modal.active {
  opacity: 1;
  visibility: visible;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.photo-modal-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 90%;
  max-height: 90vh;
  background: var(--color-bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.photo-modal.active .photo-modal-content {
  transform: scale(1);
}

.photo-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  color: var(--text-primary);
  z-index: 10;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.photo-modal-close:hover {
  background: var(--color-primary);
  color: var(--text-inverse);
  border-color: var(--color-primary);
}

.photo-modal-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  max-height: 90vh;
}

.photo-modal-image {
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 80vh;
}

.photo-modal-info {
  padding: var(--space-2xl);
  overflow-y: auto;
  max-height: 90vh;
}

.photo-modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.photo-modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
}

.photo-modal-specs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.photo-modal-spec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.photo-modal-spec-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.photo-modal-spec-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

/* ===== 响应式模态框 ===== */
@media (max-width: 768px) {
  .photo-modal-content {
    width: 95%;
    max-height: 95vh;
  }
  .photo-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .photo-modal-image {
    max-height: 40vh;
  }
  .photo-modal-info {
    padding: var(--space-lg);
    max-height: 50vh;
  }
  .photo-modal-title {
    font-size: 1.2rem;
  }
}

/* ===== 过程步骤增强 ===== */
.process-step {
  transition: all var(--transition-normal);
}

.process-step:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

/* ===== 标签按钮增强 ===== */
.tag {
  cursor: pointer;
  user-select: none;
}

/* ===== 教程播放按钮 ===== */
.tutorial-play {
  cursor: pointer;
}

/* ===== 信息框颜色变体 ===== */
.tip-box {
  padding: var(--space-lg);
  background: rgba(179, 136, 255, 0.05);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-lg) 0;
}

.warning-box {
  padding: var(--space-lg);
  background: rgba(255, 213, 79, 0.05);
  border-left: 3px solid var(--color-warning);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-lg) 0;
}
