/* ── gallery.css — STELLARA Constellation Gallery (s1 design) ── */

/* Body */
.gl-body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #06060f;
  color: #fff;
  overflow-x: hidden;
  min-height: 900px;
  position: relative;
}

/* Background gradient */
.gl-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 180% 160% at 30% 40%, #1a0e40 0%, #06060f 100%);
  pointer-events: none;
}

/* Background stars */
.gl-star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  z-index: 0;
  pointer-events: none;
}

/* Nebula blurs */
.gl-nebula1 {
  position: absolute;
  width: 320px;
  height: 200px;
  border-radius: 50%;
  background: #643cdc12;
  filter: blur(60px);
  top: -40px;
  left: 560px;
  pointer-events: none;
  z-index: 0;
}
.gl-nebula2 {
  position: absolute;
  width: 280px;
  height: 180px;
  border-radius: 50%;
  background: #3c28b40f;
  filter: blur(50px);
  top: 100px;
  left: 900px;
  pointer-events: none;
  z-index: 0;
}

/* Top glow line */
.gl-top-glow {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, #7c5cfc00, #7c5cfc, #7c5cfc00);
  z-index: 99;
  pointer-events: none;
}

/* ── Navbar ── */
.gl-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: #0a0a1eF2;
  backdrop-filter: blur(12px);
}

.gl-logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #fff;
  text-decoration: none;
}

.gl-nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.gl-nav-links a {
  font-size: 13px;
  text-decoration: none;
  color: #5a5a8a;
  transition: color 0.2s;
}
.gl-nav-links a.active {
  color: #c4b0ff;
}
.gl-nav-links a:hover {
  color: #a090e0;
}

.gl-upload-btn {
  background: #7c5cfc;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}
.gl-upload-btn:hover {
  background: #9d80ff;
  transform: translateY(-1px);
}

/* ── Hero ── */
.gl-hero {
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.gl-hero-tag {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 5px;
  color: #7c5cfc;
  text-transform: uppercase;
}

.gl-hero-title {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.gl-hero-sub {
  margin: 0;
  font-size: 14px;
  color: #6a6a9a;
}

/* ── Stats Bar ── */
.gl-stats {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.gl-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gl-stat-num {
  color: #c4b0ff;
  font-size: 13px;
  font-weight: 700;
}

.gl-stat-lbl {
  color: #3a3a60;
  font-size: 12px;
}

.gl-stat-div {
  width: 1px;
  height: 12px;
  background: #1e1e38;
}

.gl-stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

/* ── Filter Row ── */
.gl-filter-row {
  display: flex;
  align-items: center;
  padding: 12px 60px;
  gap: 8px;
  position: relative;
  z-index: 1;
  margin-top: 8px;
}

.gl-filter-tab {
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.gl-filter-tab.active {
  background: #7c5cfc;
  color: #fff;
  font-weight: 600;
}

.gl-filter-tab:not(.active) {
  background: #ffffff0f;
  color: #9090c0;
  border: 1px solid #ffffff1f;
}

.gl-filter-tab:not(.active):hover {
  background: #ffffff18;
  color: #c4b0ff;
}

/* View toggle */
.gl-view-toggle {
  position: absolute;
  right: 60px;
  display: flex;
  gap: 2px;
  background: #0d0d20;
  border: 1px solid #1e1e38;
  border-radius: 8px;
  padding: 4px;
  height: 36px;
  align-items: center;
}

.gl-vt-btn {
  width: 44px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: transparent;
  color: #3a3a60;
  font-family: inherit;
  transition: all 0.2s;
}

.gl-vt-btn.active {
  background: #7c5cfc;
  color: #fff;
}

/* ── Grid ── */
.gl-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 8px 60px 60px;
  position: relative;
  z-index: 1;
  align-items: flex-start;
}

.gl-card {
  flex: 0 0 calc(25% - 12px);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

.gl-card:not(.gl-card-add):hover {
  transform: scale(1.02);
}

/* 사진 위 하단 그라디언트 — 텍스트 가독성 보장 */
.gl-card:not(.gl-card-add)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 35%, #00000088 100%);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* ── 드래그 상태 ── */
.ds-holding {
  transform: scale(0.97) !important;
  box-shadow: 0 0 0 2px #7c5cfc, 0 12px 40px #7c5cfc40 !important;
  cursor: grab !important;
  transition: transform 0.18s, box-shadow 0.18s !important;
}

.ds-dragging {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Card badges */
.gl-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #0000008c;
  border: 1px solid #ffffff14;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 10px;
  color: #a0a0c0;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
  z-index: 2;
}

/* Card bottom info */
.gl-card-info {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  z-index: 2;
}

.gl-card-name {
  color: #e0d0ff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.gl-card-sub {
  color: #7c5cfc;
  font-size: 11px;
}

.gl-card-date {
  color: #5a5a8a;
  font-size: 11px;
}

/* Empty card */
.gl-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border-style: dashed !important;
}

.gl-empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gl-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #2a2a48;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a2a48;
  font-size: 20px;
}

.gl-empty-lbl {
  color: #2a2a48;
  font-size: 12px;
}

/* ── 필터 숨김 ── */
.gl-card.hidden {
  display: none;
}

/* ── + 추가 카드 ── */
.gl-card-add {
  border: 1.5px dashed #2a2a4a !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 200px;
  transition: border-color 0.2s, background 0.2s !important;
}

.gl-card-add:hover {
  border-color: #7c5cfc !important;
  background: #7c5cfc08 !important;
  transform: none !important;
}

.gl-add-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
}

.gl-add-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid #2a2a4a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.gl-card-add:hover .gl-add-ring {
  border-color: #7c5cfc;
  background: #7c5cfc18;
}

.gl-add-plus {
  color: #2a2a4a;
  font-size: 26px;
  line-height: 1;
  transition: color 0.2s;
}
.gl-card-add:hover .gl-add-plus { color: #7c5cfc; }

.gl-add-lbl {
  color: #3a3a60;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  transition: color 0.2s;
}
.gl-card-add:hover .gl-add-lbl { color: #c4b0ff; }

.gl-add-sub {
  color: #2a2a48;
  font-size: 11px;
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

/* ── 목록 뷰 ── */
.gl-grid.gl--list {
  gap: 12px;
}
.gl-grid.gl--list .gl-card {
  flex: 0 0 calc(50% - 6px);
  height: 120px !important;
}

/* ── 카드 사진 이미지 ── */
.gl-card img.gl-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  opacity: 1;
  transition: transform 0.4s ease, opacity 0.3s;
  z-index: 0;
}

.gl-card:not(.gl-card-add):hover img.gl-card-photo {
  transform: scale(1.07);
  opacity: 0.92;
}

/* Individual cards */
.gl-c1p1 {
  height: 260px;
  background: linear-gradient(135deg, #2a1560, #0f0a28);
  border: 2.5px solid #a78bff;
  box-shadow: 0 8px 32px #7c5cfc50;
}
.gl-c1p1:hover {
  box-shadow: 0 16px 48px #7c5cfc80;
}

.gl-c1p2 {
  height: 190px;
  background: linear-gradient(200deg, #0d1a3d, #1e2d5a);
  border: 1px solid #6478ff33;
}
.gl-c1p2:hover {
  box-shadow: 0 8px 24px #6478ff30;
}

.gl-c2p1 {
  height: 180px;
  background: linear-gradient(90deg, #1a0d3d, #2d1569);
  border: 1px solid #7c5cfc40;
}
.gl-c2p1:hover {
  box-shadow: 0 8px 24px #7c5cfc30;
}

.gl-c2p2 {
  height: 270px;
  background: linear-gradient(160deg, #0a1228, #18243c);
  border: 1px solid #648cff33;
}
.gl-c2p2:hover {
  box-shadow: 0 8px 24px #648cff20;
}

.gl-c3p1 {
  height: 320px;
  background: linear-gradient(45deg, #160c38, #2a1555);
  border: 1px solid #b4a0ff33;
}
.gl-c3p1:hover {
  box-shadow: 0 8px 24px #b4a0ff25;
}

.gl-c3p2 {
  height: 140px;
  border: 1px dashed #648cff26;
}

.gl-c4p1 {
  height: 210px;
  background: linear-gradient(120deg, #1e0a3c, #380f6a);
  border: 1px solid #a064ff40;
}
.gl-c4p1:hover {
  box-shadow: 0 8px 24px #a064ff30;
}

.gl-c4p2 {
  height: 250px;
  border: 1px dashed #64a0ff26;
}

/* ── 업로드 모달 ── */
.gl-modal-backdrop {
  position: fixed;
  inset: 0;
  background: #00000094;
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.gl-modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.gl-modal {
  background: #0d0d22;
  border: 1px solid #2a2a48;
  border-radius: 20px;
  width: 480px;
  padding: 32px;
  position: relative;
}
.gl-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #5a5a8a;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.gl-modal-close:hover { color: #fff; }
.gl-modal-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  color: #7c5cfc;
  margin: 0 0 6px;
}
.gl-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px;
}
.gl-modal-field { margin-bottom: 16px; }
.gl-modal-label {
  display: block;
  font-size: 11px;
  color: #5a5a8a;
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.gl-modal-select {
  width: 100%;
  background: #0a0a1e;
  border: 1px solid #2a2a48;
  border-radius: 8px;
  color: #c4b0ff;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.gl-drop-zone {
  border: 1.5px dashed #2a2a48;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 16px;
}
.gl-drop-zone:hover, .gl-drop-zone.drag-over {
  border-color: #7c5cfc;
  background: #7c5cfc0a;
}
.gl-drop-icon { font-size: 28px; color: #3a3a60; margin-bottom: 8px; }
.gl-drop-text { color: #9090c0; font-size: 13px; margin: 0 0 4px; }
.gl-drop-sub { color: #3a3a60; font-size: 11px; margin: 0; }
.gl-modal-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.gl-modal-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.gl-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #0000008c;
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.gl-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}
.gl-modal-cancel {
  background: transparent;
  border: 1px solid #2a2a48;
  border-radius: 8px;
  color: #5a5a8a;
  padding: 10px 20px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.gl-modal-cancel:hover { border-color: #5a5a8a; color: #9090c0; }
.gl-modal-save {
  background: #7c5cfc;
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.gl-modal-save:disabled { background: #3a3a60; cursor: not-allowed; }
.gl-modal-save:not(:disabled):hover { background: #9d80ff; }
