/* ================================================================
   Camagru — style.css
   Light theme | Inter font | #6c47ff accent
   ================================================================ */

/* ── Google Font + Tabler Icons injected via <link> in HTML ── */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --accent:          #6c47ff;
  --accent-light:    #f0eeff;
  --accent-border:   #e2dcff;
  --accent-disabled: #d4ccf7;

  --text-primary:   #111;
  --text-secondary: #444;
  --text-muted:     #aaa;
  --text-hint:      #bbb;

  --border:        #f0eff5;
  --border-input:  #eee;

  --bg-page:  #fafafa;
  --bg-card:  #fff;
  --bg-input: #fafafa;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  animation: pageFadeIn 0.35s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* ── Utility ───────────────────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }
.text-muted   { color: var(--text-muted); }
.text-error   { color: #e53e3e; }
.text-success { color: #27ae60; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Main stretch ──────────────────────────────────────────── */
main { flex: 1; }

/* ================================================================
   DEMO BANNER
   ================================================================ */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  background: linear-gradient(90deg, #6c47ff, #8a6bff);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
}
.demo-banner i.ti-flask { font-size: 16px; flex-shrink: 0; }
.demo-banner strong { font-weight: 700; }
.demo-banner span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.demo-banner-more {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.92;
}
.demo-banner-more:hover { opacity: 1; }
.demo-banner-close {
  background: transparent;
  border: none;
  color: #fff;
  opacity: 0.8;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.demo-banner-close:hover { opacity: 1; }
@media (max-width: 640px) {
  .demo-banner { font-size: 12px; padding: 8px 12px; }
  .demo-banner span { white-space: nowrap; }
  .demo-banner-more { font-size: 11.5px; }
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--accent); }
.nav-logo-mark { border-radius: 8px; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-page); }
.nav-link.active { color: var(--accent); }

.nav-guest,
.nav-user {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  color: var(--text-secondary);
  font-size: 20px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.hamburger:hover { background: var(--bg-page); }

/* Dimmed backdrop behind the mobile nav drawer */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.35);
  z-index: 198;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 640px) {
  .hamburger { display: flex; align-items: center; }

  .nav-links {
    position: fixed;
    top: 0; right: 0;
    bottom: 0;
    width: min(78vw, 300px);
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 32px -12px rgba(17,17,17,.18);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 72px 20px 24px;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(.16,.8,.24,1);
    pointer-events: none;
    z-index: 199;
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateX(0);
    pointer-events: auto;
  }
  .nav-link { width: 100%; }
  .nav-guest, .nav-user { flex-direction: column; align-items: stretch; width: 100%; margin-left: 0; margin-top: 10px; }
  .nav-guest .btn, .nav-user .btn { width: 100%; }
  body.nav-open { overflow: hidden; }
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
}
.footer-brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.footer-brand span { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.15s ease;
  white-space: nowrap;
  font-family: var(--font);
  line-height: 1;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #5a39d6; transform: translateY(-1px); }
.btn-primary:disabled {
  background: var(--accent-disabled);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid #e8e8e8;
}
.btn-secondary:hover { border-color: #d0d0d0; background: #f9f9f9; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
  background: #fff0f0;
  color: #e53e3e;
  border: 1px solid #fdd;
}
.btn-danger:hover { background: #ffe0e0; }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-icon:hover { background: var(--bg-page); color: var(--text-secondary); }
.btn-full { width: 100%; }

/* ================================================================
   FORMS
   ================================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.label {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,71,255,0.1); }
.input.error { border-color: #e53e3e; }
.input::placeholder { color: var(--text-hint); }

.input-wrap {
  position: relative;
}
.input-wrap .input { padding-right: 36px; }
.input-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.input-toggle:hover { color: var(--text-secondary); }

.input-with-icon { position: relative; }
.input-with-icon .input { padding-right: 36px; }
.input-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}
.input-status.ok  { color: #27ae60; }
.input-status.err { color: #e53e3e; }

.field-error {
  font-size: 12px;
  color: #e53e3e;
  min-height: 16px;
}
.field-hint { font-size: 12px; color: var(--text-muted); }

/* Password strength */
.strength-wrap {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 14px; color: var(--text-secondary); }
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border-input);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-track::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
input:checked + .toggle-track { background: var(--accent); }
input:checked + .toggle-track::before { transform: translateX(18px); }

/* ================================================================
   AUTH PAGES (login, register, forgot, reset, verify)
   ================================================================ */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: #fafafe;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  width: 100%;
  max-width: 340px;
}

.auth-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-logo span { color: var(--accent); }
.auth-tagline { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 20px;
}
.demo-note i { color: var(--accent); margin-top: 1px; flex-shrink: 0; }
.demo-note a { color: var(--accent); font-weight: 600; }

.auth-fields { display: flex; flex-direction: column; gap: 14px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-footer a { color: var(--accent); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.auth-error {
  font-size: 12px;
  color: #e53e3e;
  text-align: center;
  padding: 8px 12px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--radius-sm);
  display: none;
}
.auth-error.show { display: block; }
.auth-success {
  font-size: 13px;
  color: #27ae60;
  text-align: center;
  padding: 10px 12px;
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  border-radius: var(--radius-sm);
  display: none;
}
.auth-success.show { display: block; }

/* ================================================================
   HERO (Gallery page)
   ================================================================ */
.hero {
  background: #fafafe;
  padding: 60px 24px 48px;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-xl);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.15;
}
.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 28px;
}
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.gallery-page-head {
  background: #fafafe;
  padding: 40px 24px 28px;
  text-align: center;
}
.gallery-page-head h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  line-height: 1.15;
}

/* ================================================================
   GALLERY SECTION
   ================================================================ */
.gallery-section { padding: 40px 0 60px; }

.gallery-info-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}
.gallery-info-banner a { color: var(--accent); font-weight: 600; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

/* Gallery card */
.img-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
}
.img-card:hover { border-color: #e0dfec; transform: translateY(-2px); }

.img-card-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-page);
}
.img-card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.img-card:hover .img-card-photo img { transform: scale(1.03); }

.img-card-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.92);
  border-radius: 20px;
  padding: 3px 10px 3px 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.card-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.img-card-footer {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: default;
  font-family: var(--font);
}
.card-stat.clickable { cursor: pointer; }
.card-stat.clickable:hover { color: var(--accent); }
.card-stat.liked { color: #e53e3e; }
.card-stat i { font-size: 14px; }

/* Gallery states */
.gallery-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.gallery-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.gallery-loading {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 32px;
}
.page-ellipsis {
  padding: 6px 4px;
  color: var(--text-muted);
  font-size: 13px;
}
.page-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; cursor: default; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ================================================================
   IMAGE MODAL
   ================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  transform: scale(0.97);
  transition: transform 0.2s;
}
.modal-backdrop.open .modal { transform: scale(1); }

.modal-image-col {
  flex: 1;
  min-width: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 90vh;
}

.modal-side {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-author { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.modal-date   { font-size: 11px; color: var(--text-muted); }

.modal-actions {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-like-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  font-family: var(--font);
  transition: color 0.15s;
}
.modal-like-btn:hover { color: #e53e3e; }
.modal-like-btn.liked { color: #e53e3e; }
.modal-like-btn:disabled { cursor: not-allowed; opacity: 0.5; }
.modal-like-btn i { font-size: 16px; }

.modal-comments {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item { display: flex; gap: 8px; }
.comment-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.comment-text { font-size: 13px; color: var(--text-secondary); word-break: break-word; }
.comment-time { font-size: 11px; color: var(--text-muted); }

.modal-no-comments { font-size: 13px; color: var(--text-muted); text-align: center; padding: 20px 0; }

.modal-comment-form {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.modal-comment-form textarea {
  flex: 1;
  resize: none;
  height: 60px;
  padding: 8px 10px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  font-family: var(--font);
  transition: border-color 0.15s;
}
.modal-comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,71,255,0.1); }
.modal-comment-form textarea::placeholder { color: var(--text-hint); }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s;
}
.modal-close:hover { background: #fff; color: var(--text-primary); }

@media (max-width: 640px) {
  .modal { flex-direction: column; max-height: 95vh; }
  .modal-image-col { max-height: 50vw; }
  .modal-side { width: 100%; border-left: none; border-top: 1px solid var(--border); }
}

/* ================================================================
   EDITOR PAGE
   ================================================================ */
.editor-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.editor-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editor-panel {
  width: 200px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}
.editor-panel-header {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.editor-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.editor-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Camera area */
.camera-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.camera-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.camera-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sticker selector */
.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.sticker-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.sticker-item {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: var(--bg-page);
  padding: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  object-fit: contain;
}
.sticker-item:hover { border-color: var(--accent-border); background: var(--accent-light); }
.sticker-item.selected { border-color: var(--accent); background: var(--accent-light); }

/* Editor controls */
.editor-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.capture-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  outline: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.capture-btn:hover:not(:disabled) { background: #5a39d6; transform: scale(1.05); }
.capture-btn:disabled {
  background: var(--accent-disabled);
  outline-color: var(--accent-disabled);
  cursor: not-allowed;
}
.capture-btn.loading { animation: pulse 1s infinite; }

/* Side panel thumbnails */
.thumb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.thumb-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-page);
}
.thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-delete {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 4px;
  background: rgba(255,255,255,0.9);
  border: none;
  color: #e53e3e;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.thumb-item:hover .thumb-delete { opacity: 1; }

.panel-empty {
  text-align: center;
  padding: 24px 8px;
  color: var(--text-muted);
  font-size: 12px;
}
.panel-empty i { font-size: 28px; display: block; margin-bottom: 8px; }

@media (max-width: 720px) {
  .editor-layout { flex-direction: column; height: auto; }
  .editor-panel { width: 100%; border-left: none; border-top: 1px solid var(--border); }
  .camera-wrap { max-width: 100%; }
  .thumb-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ================================================================
   PROFILE PAGE
   ================================================================ */
.profile-page { padding: 40px 0 60px; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.profile-initials {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--accent-border);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.profile-info { flex: 1; min-width: 0; }
.profile-username { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.profile-email { font-size: 13px; color: var(--text-muted); margin-top: 2px; overflow-wrap: anywhere; }

.profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.profile-section-title {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.profile-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.profile-row:last-child { border-bottom: none; }
.profile-row-key {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 80px;
  flex-shrink: 0;
}
.profile-row-val { flex: 1; font-size: 14px; color: var(--text-primary); min-width: 0; overflow-wrap: anywhere; }

.profile-inline-form {
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafe;
}
.profile-inline-form:last-child { border-bottom: none; }
.inline-form-actions { display: flex; gap: 8px; }

/* ================================================================
   VERIFY PAGE
   ================================================================ */
.verify-card { text-align: center; }
.verify-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.verify-icon.success { color: #27ae60; }
.verify-icon.error   { color: #e53e3e; }

/* CSS spinner */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  min-width: 220px;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  border: 1px solid transparent;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success {
  background: #f0fff4;
  border-color: #c6f6d5;
  color: #27ae60;
}
.toast-error {
  background: #fff5f5;
  border-color: #fed7d7;
  color: #e53e3e;
}
.toast-info {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}

@media (max-width: 480px) {
  #toast-container { right: 12px; left: 12px; bottom: 12px; }
  .toast { max-width: 100%; }
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
