/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #080808;
  --bg-2:        #0f0f0f;
  --bg-card:     #111111;
  --bg-card-2:   #161616;
  --border:      #222222;
  --border-2:    #2a2a2a;

  --pink:        #ff0055;
  --pink-soft:   #ff2d6a;
  --pink-dim:    rgba(255, 0, 85, 0.15);
  --pink-glow:   rgba(255, 0, 85, 0.4);
  --pink-glow-2: rgba(255, 0, 85, 0.08);

  --text:        #f0f0f0;
  --text-muted:  #888888;
  --text-dim:    #555555;

  --radius:      10px;
  --radius-lg:   18px;
  --transition:  0.25s ease;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Utility ───────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-glow {
  color: var(--pink);
  text-shadow: 0 0 30px var(--pink-glow), 0 0 60px rgba(255, 0, 85, 0.2);
}

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}
.logo-icon { font-size: 1.3rem; }
.logo-text { color: var(--text); }
.logo-dot  { color: var(--pink); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-link {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link--cta {
  color: var(--pink);
  border: 1px solid var(--pink);
  font-weight: 600;
}
.nav-link--cta:hover { background: var(--pink-dim); color: var(--pink-soft); }
.nav-link--admin {
  color: #f0a500;
  border: 1px solid #f0a500;
}
.nav-link--admin:hover { background: rgba(240,165,0,0.1); }
.nav-link--muted { font-size: 0.85rem; }
.nav-user { display: flex; align-items: center; gap: 0.5rem; }
.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--pink);
  object-fit: cover;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-transform: uppercase;
}
.btn--primary {
  background: linear-gradient(135deg, var(--pink) 0%, #cc0044 100%);
  color: #fff;
  box-shadow: 0 0 20px var(--pink-glow);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--pink-soft) 0%, var(--pink) 100%);
  box-shadow: 0 0 30px var(--pink-glow), 0 0 60px rgba(255, 0, 85, 0.2);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-2);
}
.btn--ghost:hover { border-color: var(--pink); color: var(--pink); background: var(--pink-dim); }
.btn--danger {
  background: rgba(200, 30, 30, 0.15);
  color: #ff5555;
  border: 1px solid rgba(200,30,30,0.4);
}
.btn--danger:hover { background: rgba(200,30,30,0.3); }
.btn--lg   { padding: 0.85rem 2rem; font-size: 1.1rem; }
.btn--sm   { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn--full { width: 100%; }
.btn-spinner { display: flex; align-items: center; gap: 0.5rem; }

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4rem 1.5rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255,0,85,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,0,85,0.06) 0%, transparent 60%);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb--1 {
  width: 500px; height: 500px;
  background: rgba(255, 0, 85, 0.07);
  top: -150px; right: -100px;
}
.hero-orb--2 {
  width: 400px; height: 400px;
  background: rgba(120, 0, 200, 0.05);
  bottom: -100px; left: -80px;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 750px;
}
.hero-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--pink-dim);
  border: 1px solid rgba(255,0,85,0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pink);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--pink);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-2);
}

/* ── Section ───────────────────────────────────────────────────────────────── */
.section {
  padding: 5rem 0;
}
.section--dark {
  background: var(--bg-2);
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ── Gallery Grid ──────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,0,85,0.4);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px rgba(255,0,85,0.1);
}
.gallery-card__img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.gallery-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-card:hover .gallery-card__img { transform: scale(1.05); }
.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.gallery-card:hover .gallery-card__overlay { background: rgba(0,0,0,0.4); }
.gallery-card__zoom {
  font-size: 1.8rem;
  opacity: 0;
  transform: scale(0.7);
  transition: all var(--transition);
}
.gallery-card:hover .gallery-card__zoom { opacity: 1; transform: scale(1); }
.gallery-card__title {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Empty Gallery ─────────────────────────────────────────────────────────── */
.empty-gallery {
  text-align: center;
  padding: 4rem 2rem;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-lg);
}
.empty-gallery__icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-gallery__text { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Steps ─────────────────────────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}
.step-card:hover {
  border-color: rgba(255,0,85,0.4);
  transform: translateY(-3px);
}
.step-card__num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--pink);
  opacity: 0.6;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.step-card__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.step-card__desc { color: var(--text-muted); font-size: 0.9rem; }

/* ── Lightbox ──────────────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  backdrop-filter: blur(8px);
}
.lightbox.active { display: flex; }
.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-2);
  color: var(--text);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.lightbox__close:hover { background: var(--pink-dim); color: var(--pink); }
.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  object-fit: contain;
}
.lightbox__title {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── Generate Page ─────────────────────────────────────────────────────────── */
.gen-section {
  min-height: calc(100vh - 64px);
  padding: 3rem 1.5rem;
  background:
    radial-gradient(ellipse 50% 60% at 0% 50%, rgba(255,0,85,0.05) 0%, transparent 60%),
    var(--bg);
}
.gen-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 2rem;
  align-items: start;
}
.gen-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.gen-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}
.gen-sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.form-textarea,
.form-input {
  width: 100%;
  background: var(--bg-card-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-textarea:focus,
.form-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-glow-2);
}
.form-hint {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}
.form-file {
  width: 100%;
  background: var(--bg-card-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.form-file::file-selector-button {
  background: var(--pink-dim);
  border: 1px solid rgba(255,0,85,0.3);
  border-radius: 6px;
  color: var(--pink);
  padding: 0.25rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.75rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ── Error Box ─────────────────────────────────────────────────────────────── */
.error-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(200,30,30,0.1);
  border: 1px solid rgba(200,30,30,0.35);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #ff6b6b;
  margin-top: 1rem;
}

/* ── Tips ──────────────────────────────────────────────────────────────────── */
.gen-tips {
  margin-top: 2rem;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.tips-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.75rem;
}
.tips-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  padding-left: 1rem;
  position: relative;
}
.tips-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--pink);
  opacity: 0.5;
}

/* ── Result Area ───────────────────────────────────────────────────────────── */
.gen-result {
  position: sticky;
  top: 80px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-placeholder {
  text-align: center;
  padding: 4rem;
}
.placeholder-inner { opacity: 0.35; }
.placeholder-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.placeholder-text { font-size: 0.95rem; color: var(--text-muted); }

.result-loading {
  text-align: center;
  padding: 4rem;
}
.loading-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,0,85,0.3), transparent 70%);
  border: 2px solid rgba(255,0,85,0.4);
  margin: 0 auto 1.5rem;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.1); opacity: 0.7; }
}
.loading-text { font-weight: 600; margin-bottom: 0.4rem; }
.loading-sub  { font-size: 0.85rem; color: var(--text-dim); }

.result-image-wrap { width: 100%; }
.result-img {
  width: 100%;
  display: block;
  object-fit: cover;
}
.result-actions {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  justify-content: center;
}

/* ── Auth Page ─────────────────────────────────────────────────────────────── */
.auth-section {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.auth-orb--1 {
  width: 500px; height: 500px;
  background: rgba(255,0,85,0.07);
  top: -100px; right: -100px;
}
.auth-orb--2 {
  width: 400px; height: 400px;
  background: rgba(100,0,200,0.05);
  bottom: -100px; left: -100px;
}
.auth-card {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}
.auth-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.auth-sub { color: var(--text-muted); margin-bottom: 2rem; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: #fff;
  color: #333;
  border-radius: var(--radius);
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.btn-google:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}
.google-icon { width: 20px; height: 20px; flex-shrink: 0; }
.auth-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── Admin ─────────────────────────────────────────────────────────────────── */
.admin-section { background: var(--bg); }
.admin-header  { margin-bottom: 2.5rem; }
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}
.admin-card__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.upload-form { }
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.admin-img-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.admin-img-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.admin-img-card__info {
  padding: 0.6rem 0.75rem;
  flex: 1;
}
.admin-img-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-img-card__date {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}
.admin-img-card .btn { margin: 0.5rem; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.footer-text  { font-size: 0.8rem; color: var(--text-dim); }
.footer-logo  { color: var(--pink); font-weight: 700; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gen-layout { grid-template-columns: 1fr; }
  .gen-result { position: static; }
  .form-row   { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .navbar { padding: 0 1rem; }
  .nav-logo .logo-text { display: none; }
  .hero-stats { gap: 1rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .auth-card { padding: 2rem 1.5rem; }
}
