﻿/*
 * Photo viewer
 */

    /* 照片查看器 */
    .photo-viewer {
      position: fixed; top:0; left:0; width:100%; height:100%;
      background: rgba(11, 14, 13, 0.94);
      display: flex; align-items: center; justify-content: center;
      z-index: 1600; visibility: hidden; opacity: 0; transition: 0.24s ease; padding: 24px;
    }
    .photo-viewer.show { visibility: visible; opacity: 1; }
    body.photo-viewer-open {
      overflow: hidden;
    }
    .viewer-content {
      width: min(94vw, 1240px);
      height: min(92vh, 940px);
      padding: 18px 18px 20px;
      box-sizing: border-box;
      position: relative;
      display: grid;
      grid-template-rows: minmax(0, 1fr) auto;
      gap: 1rem;
      border-radius: 20px;
      background: rgba(20, 24, 23, 0.82);
      box-shadow: 0 20px 60px rgba(0,0,0,0.28);
    }
    .viewer-stage {
      position: relative;
      min-height: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 16px;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.03);
    }
    .viewer-content img {
      width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 16px;
      box-shadow: 0 24px 48px rgba(0,0,0,0.24);
      cursor: default;
    }
    .viewer-close {
      position: absolute; top: 12px; right: 12px; width: 42px; height: 42px;
      display: inline-flex; align-items: center; justify-content: center;
      border: 1px solid rgba(255,255,255,0.1);
      padding: 0;
      font-size: 1rem; line-height: 1; color: white; cursor: pointer;
      border-radius: 999px; background: rgba(255,255,255,0.06);
      z-index: 2;
      transition: background 0.2s ease, transform 0.2s ease;
    }
    .viewer-close:hover {
      background: rgba(255,255,255,0.12);
      transform: translateY(-1px);
    }
    .viewer-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 46px;
      height: 46px;
      border: none;
      border-radius: 999px;
      background: rgba(8, 10, 10, 0.44);
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 1;
      transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    }
    .viewer-nav:hover {
      background: rgba(8, 10, 10, 0.6);
      transform: translateY(-50%) scale(1.02);
    }
    .viewer-nav:disabled {
      opacity: 0.34;
      cursor: default;
    }
    .viewer-nav--prev {
      left: 16px;
    }
    .viewer-nav--next {
      right: 16px;
    }
    .photo-viewer.is-single .viewer-nav {
      opacity: 0;
      pointer-events: none;
    }
    .viewer-footer {
      display: grid;
      gap: 0.75rem;
    }
    .viewer-counter {
      color: rgba(255,255,255,0.72);
      font-size: 0.84rem;
      font-weight: 600;
      text-align: center;
      letter-spacing: 0.02em;
    }
    .viewer-thumbs {
      display: flex;
      gap: 0.55rem;
      overflow-x: auto;
      padding-bottom: 0.15rem;
      justify-content: center;
    }
    .viewer-thumbs::-webkit-scrollbar {
      height: 6px;
    }
    .viewer-thumb {
      flex: 0 0 64px;
      width: 64px;
      padding: 0;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      overflow: hidden;
      background: rgba(255,255,255,0.06);
      cursor: pointer;
      opacity: 0.56;
      transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    }
    .viewer-thumb:hover {
      opacity: 0.9;
      transform: translateY(-1px);
    }
    .viewer-thumb.is-active {
      opacity: 1;
      border-color: rgba(255,255,255,0.3);
    }
    .viewer-thumb img {
      width: 100%;
      display: block;
      aspect-ratio: 1 / 1;
      object-fit: cover;
      border-radius: 0;
      box-shadow: none;
    }
    @media (max-width: 720px) {
      .photo-viewer {
        padding: 10px;
      }
      .viewer-content {
        width: 100%;
        height: min(calc(100vh - 20px), 100%);
        padding: 12px 12px 14px;
        border-radius: 16px;
        gap: 0.75rem;
      }
      .viewer-stage {
        border-radius: 14px;
      }
      .viewer-nav,
      .viewer-close {
        width: 40px;
        height: 40px;
      }
      .viewer-nav--prev {
        left: 10px;
      }
      .viewer-nav--next {
        right: 10px;
      }
      .viewer-thumb {
        flex-basis: 54px;
        width: 54px;
      }
      .viewer-counter {
        font-size: 0.78rem;
      }
    }

