/* ============================================
   Gallery Scene
   ============================================ */

#scene-gallery {
  justify-content: flex-start;
}

.gallery-header {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gallery-header .scene-title {
  margin: 0;
  font-size: 20px;
}

.gallery-header .back-btn {
  position: static;
  transform: none;
  margin-left: auto;
  padding: 6px 16px;
  font-size: 13px;
}

.gallery-filters {
  width: 100%;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gallery-filter-btn {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--text-muted);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery-filter-btn.active {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  background: rgba(255, 45, 155, 0.1);
}

.gallery-progress {
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
}

.gallery-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(180, 74, 255, 0.2);
  border-radius: 2px;
  margin-top: 4px;
}

.gallery-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-gold));
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.gallery-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 10px;
  padding: 12px 16px 32px;
  width: 100%;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}

.gallery-item {
  aspect-ratio: 9/16;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(180, 74, 255, 0.2);
  transition: all var(--transition-fast);
}

.gallery-item:hover {
  border-color: var(--neon-pink);
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item.locked {
  cursor: default;
}

.gallery-item.locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item .lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  opacity: 0.5;
  z-index: 1;
}

.gallery-item .fav-star {
  position: absolute;
  top: 4px;
  right: 4px;
  color: var(--neon-gold);
  font-size: 16px;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
  z-index: 1;
}

/* ---- Profile Card (in grid) ---- */
.gallery-profile-card {
  aspect-ratio: 9/16;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid var(--neon-gold);
  box-shadow: var(--glow-gold);
  transition: all var(--transition-fast);
}

.gallery-profile-card:hover {
  transform: scale(1.03);
}

.gallery-profile-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px;
  background: linear-gradient(to top, rgba(10, 10, 20, 0.9), transparent);
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  color: var(--neon-gold);
  letter-spacing: 2px;
}

/* ---- Profile Overlay (lightbox) ---- */
#profile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  background: linear-gradient(to top, rgba(10, 10, 20, 0.95) 60%, transparent);
  z-index: 202;
}

.profile-name {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  color: var(--neon-gold);
  letter-spacing: 3px;
  text-shadow: var(--glow-gold);
}

.profile-name-jp {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.profile-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.profile-label {
  color: var(--neon-purple);
  min-width: 55px;
  flex-shrink: 0;
}

.profile-row span:last-child {
  color: var(--text-primary);
}

.profile-quote {
  font-size: 13px;
  color: var(--neon-pink);
  font-style: italic;
  margin-bottom: 4px;
}

.profile-personality {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- VENUS Profile Modal ---- */
.venus-profile-container {
  position: relative;
  width: 90%;
  max-width: 380px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  overflow-y: auto;
}

.venus-profile-img {
  width: 60%;
  max-width: 200px;
  border-radius: 12px;
  border: 2px solid var(--neon-gold);
  box-shadow: var(--glow-gold);
}

.venus-profile-info {
  background: rgba(10, 10, 20, 0.9);
  border: 1px solid rgba(180, 74, 255, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-top: -20px;
  width: 100%;
  z-index: 1;
}

.venus-secret-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  min-height: 20px;
}

.venus-secret-input-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
  animation: slide-up 0.3s ease-out;
}

.venus-secret-input-row .name-input {
  width: 140px;
  font-size: 14px;
  padding: 6px 10px;
}

/* ---- Secret Gallery ---- */
.secret-gallery-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0008, #1a0020, #0a0008);
  z-index: 0;
}

.secret-gallery-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 45, 155, 0.08), transparent 70%);
}

.secret-gallery-header {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.secret-title {
  margin: 0;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.secret-gallery-header .back-btn {
  position: static;
  transform: none;
}

.secret-gallery-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 8px 16px 32px;
  width: 100%;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}

.secret-gallery-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 45, 155, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.secret-gallery-item:hover {
  border-color: var(--neon-gold);
  box-shadow: var(--glow-gold);
  transform: scale(1.02);
}

.secret-gallery-item img {
  width: 100%;
  display: block;
}

.secret-gallery-item .secret-item-label {
  padding: 6px 8px;
  background: rgba(10, 10, 20, 0.9);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--neon-gold);
  letter-spacing: 1px;
  text-align: center;
}

/* ---- Lightbox ---- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.3s ease-out;
}

.gallery-lightbox img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 32px;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 201;
}

.lightbox-fav {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 28px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 201;
  transition: color var(--transition-fast);
}

.lightbox-fav.active {
  color: var(--neon-gold);
  text-shadow: var(--glow-gold);
}
