/* ── Custom Properties ── */
:root {
  --clr-mint:      #00FFCC;
  --clr-lavender:  #B8A9FF;
  --clr-coral:     #FF6B9D;
  --clr-bg:        #0B0B0F;
  --clr-card:      #14141A;
  --clr-border:    #1E1E28;
  --clr-text:      #F0F0F5;
  --clr-text-muted:#8888A0;
  --glow-mint:     0 0 20px rgba(0,255,204,0.3);
  --glow-mint-lg:  0 0 40px rgba(0,255,204,0.45);
  --radius:        0.5rem;
  --radius-lg:     0.75rem;
  --radius-xl:     1rem;
  --shadow:        0 4px 32px rgba(0,0,0,0.7);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section Atoms ── */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--clr-mint);
  text-align: center;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.025em;
  margin-bottom: 3rem;
  color: var(--clr-text);
}

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background 0.3s, backdrop-filter 0.3s, padding 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(11, 11, 15, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--clr-border);
  padding: 0.875rem 0;
}

.navbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--clr-mint);
  letter-spacing: -0.02em;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--clr-text); }

#loginNavBtn {
  color: var(--clr-mint);
  border: 1px solid rgba(0,255,204,0.4);
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  transition: background 0.15s, box-shadow 0.15s;
}
#loginNavBtn:hover {
  background: rgba(0,255,204,0.08);
  box-shadow: var(--glow-mint);
  color: var(--clr-mint);
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}
.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 15% 40%, rgba(0,255,204,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 85% 65%, rgba(184,169,255,0.07) 0%, transparent 60%);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 8rem 1.5rem 4rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0,255,204,0.07);
  border: 1px solid rgba(0,255,204,0.22);
  color: var(--clr-mint);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
  letter-spacing: 0.04em;
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

.hero__title-highlight {
  background: linear-gradient(100deg, var(--clr-mint) 0%, var(--clr-lavender) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  max-width: 560px;
  margin: 0 auto 2.75rem;
  line-height: 1.7;
}

.btn--hero {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--clr-mint);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 2.25rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.btn--hero:hover {
  box-shadow: var(--glow-mint-lg);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════
   UPLOAD SECTION
══════════════════════════════════════ */
.upload-section {
  padding: 6rem 0;
}

.upload-section .container {
  max-width: 760px;
}

/* ── Cards ── */
.card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  background: var(--clr-card);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--clr-mint);
  background: rgba(0,255,204,0.03);
  box-shadow: 0 0 0 1px rgba(0,255,204,0.12), inset 0 0 40px rgba(0,255,204,0.03);
}

.drop-zone__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.drop-zone p {
  color: var(--clr-text-muted);
  font-size: 0.875rem;
}

.drop-zone strong {
  color: var(--clr-mint);
  cursor: pointer;
}

/* ── Preview ── */
.preview-container {
  position: relative;
  display: none;
  margin-bottom: 1rem;
}

.preview-container.visible { display: block; }

.preview-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
}

.btn--clear {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.btn--clear:hover { background: var(--clr-coral); }

/* ── Buttons ── */
button { font-family: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, box-shadow 0.2s, transform 0.15s;
  border: none;
}

.btn:disabled { opacity: 0.38; cursor: not-allowed; }

.btn--primary {
  background: var(--clr-mint);
  color: #000;
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
}
.btn--primary:hover:not(:disabled) {
  box-shadow: var(--glow-mint);
  transform: translateY(-1px);
}

.btn--accent {
  background: transparent;
  color: var(--clr-mint);
  border: 1.5px solid var(--clr-mint);
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.7rem;
}
.btn--accent:hover:not(:disabled) {
  background: rgba(0,255,204,0.08);
  box-shadow: var(--glow-mint);
}

.btn--outline {
  background: transparent;
  color: var(--clr-text-muted);
  border: 1.5px solid var(--clr-border);
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.btn--outline:hover {
  border-color: var(--clr-text-muted);
  color: var(--clr-text);
}

.btn--lavender {
  background: var(--clr-lavender);
  color: #000;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.btn--lavender:hover {
  box-shadow: 0 0 20px rgba(184,169,255,0.4);
  opacity: 0.9;
}

.btn--full { width: 100%; }

.btn--ghost {
  background: transparent;
  color: var(--clr-text-muted);
  border: 1px solid var(--clr-border);
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
}
.btn--ghost:hover { color: var(--clr-text); border-color: var(--clr-text-muted); }

/* ── Loading ── */
.loading-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2.5rem;
  color: var(--clr-text-muted);
}
.loading-overlay.visible { display: flex; }

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--clr-border);
  border-top-color: var(--clr-mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results ── */
.results-section { display: none; }
.results-section.visible { display: block; }

/* ── Prompt Card ── */
.prompt-card h2,
.analysis-card h2 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-text-muted);
  margin-bottom: 0.75rem;
}

.prompt-display {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--clr-text);
  min-height: 2rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.prompt-section-spacer {
  height: 1.2rem;
}

.prompt-section-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clr-mint);
  margin-bottom: 0.25rem;
}

.prompt-line {
  display: block;
  min-height: 0;
}

/* ── Bracket Chips ── */
.bracket-chip {
  display: inline;
  position: relative;
}

.bracket-chip__label {
  display: inline;
  background: rgba(0,255,204,0.12);
  color: var(--clr-mint);
  border: 1.5px solid rgba(0,255,204,0.3);
  border-radius: 0.3rem;
  padding: 0.05em 0.45em;
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.bracket-chip__label:hover {
  background: rgba(0,255,204,0.2);
  box-shadow: 0 0 10px rgba(0,255,204,0.2);
}

/* ── Popover ── */
.bracket-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow), 0 0 24px rgba(0,255,204,0.08);
  min-width: 260px;
  max-width: 340px;
}

.bracket-popover.hidden { display: none; }

.bracket-popover__desc {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  margin-bottom: 0.5rem;
}

.bracket-popover input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  color: var(--clr-text);
  font-size: 0.9rem;
  padding: 0.45rem 0.6rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.bracket-popover input:focus {
  border-color: var(--clr-mint);
  box-shadow: 0 0 0 2px rgba(0,255,204,0.15);
}

.suggestions-label {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  margin: 0.6rem 0 0.35rem;
}

.suggestions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.suggestion-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--clr-border);
  border-radius: 999px;
  padding: 0.2em 0.7em;
  font-size: 0.8rem;
  color: var(--clr-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  word-break: break-word;
  overflow-wrap: break-word;
}
.suggestion-chip:hover {
  border-color: var(--clr-mint);
  background: rgba(0,255,204,0.1);
  color: var(--clr-mint);
}

/* ── Analysis Card ── */
.analysis-card__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-text-muted);
  cursor: pointer;
  padding: 0;
  margin-bottom: 0;
  transition: color 0.15s;
}
.analysis-card__toggle:hover { color: var(--clr-lavender); }

.analysis-card__toggle .chevron {
  transition: transform 0.2s;
  font-style: normal;
  color: var(--clr-lavender);
}
.analysis-card__toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.analysis-body { margin-top: 0.75rem; }
.analysis-body.hidden { display: none; }

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.4rem 1rem;
}

.analysis-grid dt {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: start;
  padding-top: 0.1rem;
}

.analysis-grid dd {
  font-size: 0.9rem;
  color: var(--clr-text);
}

.analysis-grid dt.wide,
.analysis-grid dd.wide { grid-column: 1 / -1; }

.analysis-grid dt.wide { margin-top: 0.4rem; }

.analysis-grid dd.wide {
  font-size: 0.85rem;
  line-height: 1.55;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  white-space: pre-wrap;
}

/* ── Error ── */
.error-display {
  display: none;
  background: rgba(255,107,157,0.08);
  border: 1px solid rgba(255,107,157,0.35);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  color: var(--clr-coral);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.error-display.visible { display: block; }

.credits-error-msg {
  color: var(--clr-coral);
  font-size: 0.88rem;
  text-align: center;
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════
   HOW IT WORKS
══════════════════════════════════════ */
.how-section {
  padding: 7rem 0;
  background: linear-gradient(180deg, transparent, rgba(0,255,204,0.015), transparent);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.step-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.step-card:hover {
  border-color: var(--clr-mint);
  box-shadow: var(--glow-mint);
  transform: translateY(-4px);
}

.step-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--clr-mint);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
}

/* ══════════════════════════════════════
   GALLERY
══════════════════════════════════════ */
.gallery-section {
  padding: 7rem 0;
}

/* ── Filter Tabs ── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.gallery-filter-btn {
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.gallery-filter-btn:hover {
  border-color: rgba(0,255,204,0.4);
  color: var(--clr-text);
  background: rgba(0,255,204,0.04);
}
.gallery-filter-btn.active {
  border-color: var(--clr-mint);
  color: var(--clr-mint);
  background: rgba(0,255,204,0.08);
  box-shadow: 0 0 12px rgba(0,255,204,0.15);
}

/* ── Grid ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--clr-text-muted);
  padding: 3rem;
  font-size: 0.9rem;
}

/* ── Card ── */
.gallery-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  outline: none;
}
.gallery-card:hover,
.gallery-card:focus-visible {
  border-color: var(--clr-mint);
  box-shadow: var(--glow-mint);
  transform: translateY(-4px);
}
.gallery-card:focus-visible {
  box-shadow: var(--glow-mint), 0 0 0 2px var(--clr-mint);
}

/* ── Thumbnail + Overlay ── */
.gallery-card__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--clr-border);
}

.gallery-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-card:hover .gallery-card__img {
  transform: scale(1.06);
}

/* fallback when image fails */
.gallery-card__thumb.img-error {
  background: linear-gradient(135deg, #14141A 0%, #1E1E28 100%);
}
.gallery-card__thumb.img-error::after {
  content: '🖼️';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5,5,10,0) 20%,
    rgba(5,5,10,0.85) 70%,
    rgba(5,5,10,0.97) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-card__overlay,
.gallery-card:focus-visible .gallery-card__overlay {
  opacity: 1;
}

.gallery-card__preview {
  font-size: 0.78rem;
  color: rgba(240,240,245,0.9);
  line-height: 1.55;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card__cta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-mint);
  letter-spacing: 0.02em;
}

.gallery-card__badge {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  background: rgba(11,11,15,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--clr-text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Card Footer ── */
.gallery-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.875rem;
  gap: 0.5rem;
}

.gallery-card__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-card__copy-mini {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  border-radius: var(--radius);
  width: 1.875rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.gallery-card__copy-mini:hover {
  border-color: var(--clr-mint);
  color: var(--clr-mint);
  background: rgba(0,255,204,0.07);
}
.gallery-card__copy-mini.copied {
  border-color: var(--clr-mint);
  color: var(--clr-mint);
}

/* ══════════════════════════════════════
   GALLERY MODAL
══════════════════════════════════════ */
.modal--gallery {
  max-width: 700px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.modal--gallery .gmodal__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--clr-border);
  overflow: hidden;
  flex-shrink: 0;
}

.modal--gallery .gmodal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal--gallery .gmodal__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.gmodal__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.gmodal__cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-mint);
  background: rgba(0,255,204,0.08);
  border: 1px solid rgba(0,255,204,0.2);
  padding: 0.2em 0.65em;
  border-radius: 999px;
}

.gmodal__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--clr-text);
}

.gmodal__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--clr-text-muted);
  margin-bottom: 0.5rem;
  margin-top: 0.25rem;
}

.gmodal__prompt {
  width: 100%;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--clr-text);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  margin-bottom: 1rem;
  overflow-y: visible;
  height: auto;
}

.gmodal__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.btn--gallery-copy {
  flex: 1;
  background: var(--clr-mint);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition: box-shadow 0.2s, opacity 0.15s;
  text-align: center;
}
.btn--gallery-copy:hover { box-shadow: var(--glow-mint); }
.btn--gallery-copy.copied { opacity: 0.8; }

.gmodal__close-abs {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}
.gmodal__close-abs:hover { background: rgba(255,107,157,0.7); }

/* ══════════════════════════════════════
   PRICING
══════════════════════════════════════ */
.pricing-section {
  padding: 7rem 0;
  background: linear-gradient(180deg, transparent, rgba(184,169,255,0.015), transparent);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.pricing-card:not(.pricing-card--popular):hover {
  transform: translateY(-4px);
}

.pricing-card--popular {
  border-color: var(--clr-mint);
  box-shadow: var(--glow-mint);
  transform: translateY(-6px);
}
.pricing-card--popular:hover {
  box-shadow: var(--glow-mint-lg);
}

.popular-badge {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--clr-coral);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.pricing-card__header { margin-bottom: 1.5rem; }

.pricing-card__header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.price-original {
  font-size: 1rem;
  font-weight: 600;
  color: #ff4444;
  text-decoration: line-through;
}

.price-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #ff2d55;
  padding: 2px 6px;
  border-radius: 4px;
  align-self: center;
  letter-spacing: 0.03em;
}

.price-amount {
  font-size: 2.125rem;
  font-weight: 800;
  color: var(--clr-text);
}

.price-period {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}

.pricing-card__desc {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}

.pricing-card__features {
  list-style: none;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.pricing-card__features li {
  font-size: 0.875rem;
}

.feat-yes { color: var(--clr-text); }
.feat-no  { color: var(--clr-text-muted); }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  background: #101016;
  border-top: 1px solid var(--clr-border);
  padding: 3rem 0 1.5rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: start;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--clr-mint);
  display: block;
  margin-bottom: 0.5rem;
}

.footer__brand p {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  transition: color 0.15s;
}
.footer__links a:hover { color: var(--clr-text); }

.footer__social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-icon {
  color: var(--clr-text-muted);
  transition: color 0.15s;
}
.social-icon:hover { color: var(--clr-mint); }

.footer__bottom {
  border-top: 1px solid var(--clr-border);
  padding-top: 1.5rem;
  text-align: center;
}
.footer__bottom p {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: var(--shadow);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--clr-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.modal__close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--clr-text);
}

.modal__logo {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--clr-mint);
  margin-bottom: 1.5rem;
}

.modal__title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.modal__sub {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  margin-bottom: 1.5rem;
}

.modal-pane.hidden { display: none; }

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.form-group input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  color: var(--clr-text);
  font-size: 0.925rem;
  padding: 0.625rem 0.75rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.form-group input:focus {
  border-color: var(--clr-mint);
  box-shadow: 0 0 0 2px rgba(0,255,204,0.15);
}

.modal__toggle {
  font-size: 0.825rem;
  color: var(--clr-text-muted);
  text-align: center;
  margin-top: 1.25rem;
}
.modal__toggle a {
  color: var(--clr-mint);
  font-weight: 600;
}
.modal__toggle a:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════ */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   MOBILE
══════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar__menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11,11,15,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 999;
  }
  .navbar__menu.open { display: flex; }
  .navbar__menu .nav-link { font-size: 1.25rem; }
  .navbar__hamburger { display: flex; }

  .steps-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card--popular {
    transform: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-filters {
    gap: 0.4rem;
  }

  .gallery-filter-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
  }

  .modal--gallery {
    max-width: 100%;
  }

  .gmodal__prompt {
    height: auto;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .bracket-popover {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    top: auto;
    max-width: none;
    min-width: 0;
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .analysis-grid dt { margin-top: 0.5rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }

  .gallery-filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem; }
  .gallery-filter-btn { flex-shrink: 0; }
}

/* ══════════════════════════════════════
   AUTH — USER PROFILE (NAVBAR)
══════════════════════════════════════ */
#authNavItem {
  display: flex;
  align-items: center;
}

.user-profile {
  display: none;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.user-avatar {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(0,255,204,0.35);
  display: none;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-text);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  text-transform: uppercase;
  line-height: 1.6;
}

.plan-badge--free {
  background: rgba(136,136,160,0.15);
  color: var(--clr-text-muted);
  border: 1px solid rgba(136,136,160,0.3);
}

.plan-badge--pro {
  background: rgba(0,255,204,0.12);
  color: var(--clr-mint);
  border: 1px solid rgba(0,255,204,0.35);
}

.plan-badge--enterprise {
  background: rgba(184,169,255,0.15);
  color: var(--clr-lavender);
  border: 1px solid rgba(184,169,255,0.4);
}

.usage-display {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

.btn--logout {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  white-space: nowrap;
  color: var(--clr-text-muted);
  border-color: var(--clr-border);
}
.btn--logout:hover {
  color: var(--clr-coral);
  border-color: rgba(255,107,157,0.4);
}

/* ══════════════════════════════════════
   AUTH — GOOGLE BUTTON
══════════════════════════════════════ */
.btn--google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s;
  margin-top: 0.25rem;
}
.btn--google:hover {
  background: #f8faff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
}

.btn--google:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* In-App Browser Warning */
.inapp-warning {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-radius: 8px;
  color: #7a5800;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

/* ══════════════════════════════════════
   AUTH — MODAL ICON
══════════════════════════════════════ */
.modal-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.75rem;
}
