/* ==========================================================================
   OSEA IMAGE HOST - 3D CYLINDRICAL SEMICIRCLE GALLERY (立体半圆形正视图画卷)
   ========================================================================== */

:root {
  --home-bg: #050505;
  --card-w: 210px;
  --card-h: 132px;
}

body {
  margin: 0;
  padding: 0;
  background-color: #050505 !important;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Plus Jakarta Sans", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 消除全局 main.css text-shadow 与强行白色穿透 */
.osea-home,
.osea-home *,
.osea-lightbox,
.osea-lightbox * {
  text-shadow: none !important;
}

/* 1. 首页主舞台 */
.osea-home {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 100vh;
  background: var(--home-bg, #050505);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  -webkit-user-select: none;
}

/* 2. 极简 Header */
.osea-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  pointer-events: none;
}

.osea-brand {
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.osea-brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffffff !important;
  transition: opacity 0.2s ease;
}

.osea-brand-text:hover {
  opacity: 0.8;
}

.osea-header-right {
  pointer-events: auto;
  display: flex;
  align-items: center;
}

/* 右上角登录按钮 (SVG 按钮，点 11) */
.osea-login-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff !important;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.osea-login-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.06);
}

.osea-login-btn:active {
  transform: scale(0.96);
}

.osea-login-btn svg {
  stroke: #ffffff;
}

/* 3. 中央 3D 立体半圆柱面舞台 (点 9) */
.gallery-section {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gallery-viewport {
  position: relative;
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  cursor: grab;
  touch-action: pan-y;
  overflow: visible;
  contain: layout style paint;
}

.gallery-viewport.is-dragging {
  cursor: grabbing !important;
}

.gallery-track-3d {
  position: relative;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  will-change: transform;
}

/* 4. 单张图片卡片 (横向长方形卡片，无缝隙，轻量倒影，极致 60FPS 流畅) */
.gallery-item {
  position: absolute;
  width: var(--card-w);
  height: var(--card-h);
  left: calc(var(--card-w) / -2);
  top: calc(var(--card-h) / -2);
  border-radius: 12px;
  overflow: hidden;
  background: #141517;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  
  /* 轻量化倒影效果 */
  -webkit-box-reflect: below 5px linear-gradient(to bottom, transparent 60%, rgba(255, 255, 255, 0.16) 100%);
  
  transition: box-shadow 0.25s ease;
}

.gallery-item:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
}

/* 图片主体 (消除黑色遮罩，横向长方形完美填充与硬件加速) */
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  opacity: 1;
  border-radius: 12px;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 5. 极简全屏大图 Lightbox (点击查看图片内容，点 5) */
.osea-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: lightboxFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 92vh;
}

.lightbox-media-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 80vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-toolbar {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.lightbox-filename {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

/* 6. 照片墙选取模式专用样式 (管理后台，点 3) */
.card-btn#btn-photowall-select.active {
  background: rgba(56, 189, 248, 0.35) !important;
  border-color: #38bdf8 !important;
}

.card-btn#btn-photowall-select.active svg {
  stroke: #38bdf8;
}

.dim-card {
  opacity: 0.45;
  filter: grayscale(80%);
}

/* 7. 移动端响应式尺寸 (始终保持横向长方形且等比例缩小) */
@media (max-width: 900px) {
  :root {
    --card-w: 170px;
    --card-h: 106px;
  }
  .osea-header {
    padding: 0 24px;
    height: 60px;
  }
}

@media (max-width: 600px) {
  :root {
    --card-w: 135px;
    --card-h: 84px;
  }
  .osea-header {
    padding: 0 16px;
  }
  .gallery-item {
    border-radius: 8px;
    -webkit-box-reflect: below 4px linear-gradient(to bottom, transparent 65%, rgba(255, 255, 255, 0.14) 100%);
  }
  .gallery-img {
    border-radius: 8px;
  }
}
