/* ==========================================================================
   Sudo Vision — Design tokens
   Palette: near-black base, ice-cyan → violet "aurora" accent gradient
   Type: Apple system font stack (SF Pro on Apple devices)
   ========================================================================== */

:root{
  --bg: #08080a;
  --bg-elevated: #0f0f12;
  --surface: rgba(255,255,255,0.045);
  --surface-strong: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f5f5f7;
  --text-secondary: rgba(245,245,247,0.62);
  --text-tertiary: rgba(245,245,247,0.38);
  --accent-1: #6EE7F9;
  --accent-2: #A78BFA;
  --accent-grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --danger: #ff6b6b;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-soft: 0 10px 40px rgba(0,0,0,0.45);
  --shadow-lift: 0 20px 60px rgba(0,0,0,0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --nav-height: 64px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Ambient background aurora — signature element */
body::before{
  content: "";
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 70vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(110,231,249,0.10), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(167,139,250,0.10), transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

@keyframes auroraDrift{
  from{ transform: translate3d(0,0,0) scale(1); }
  to{ transform: translate3d(2%, 3%, 0) scale(1.05); }
}

a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }
img{ max-width: 100%; display: block; }
::selection{ background: rgba(167,139,250,0.35); color: #fff; }

:focus-visible{
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
  border-radius: 6px;
}

.container{
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Loading screen
   ========================================================================== */
#loading-screen{
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}
#loading-screen.hidden{ opacity: 0; visibility: hidden; pointer-events: none; }
.loader-mark{
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--accent-grad);
  animation: pulseMark 1.1s ease-in-out infinite;
}
@keyframes pulseMark{
  0%, 100%{ transform: scale(0.85); opacity: 0.7; }
  50%{ transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar{
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-height);
  display: flex; align-items: center;
  background: rgba(8,8,10,0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.navbar .container{
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 100%;
}
.brand{
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand img{ width: 30px; height: 30px; border-radius: 9px; }

.nav-links{
  display: none;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a{
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover, .nav-links a.active{
  color: var(--text);
  background: var(--surface);
}

.nav-right{ display: flex; align-items: center; gap: 10px; }

.fav-counter{
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
  cursor: pointer;
}
.fav-counter:hover{ color: var(--text); background: var(--surface-strong); }
.fav-counter svg{ width: 15px; height: 15px; }
.fav-counter.pulse{ animation: favPulse 0.4s var(--ease); }
@keyframes favPulse{
  0%{ transform: scale(1); }
  40%{ transform: scale(1.18); }
  100%{ transform: scale(1); }
}

.menu-toggle{
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.menu-toggle svg{ width: 18px; height: 18px; }

@media (min-width: 860px){
  .nav-links{ display: flex; }
  .menu-toggle{ display: none; }
}

/* Mobile nav sheet */
.mobile-sheet{
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4,4,6,0.7);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
.mobile-sheet.open{ opacity: 1; visibility: visible; }
.mobile-sheet-panel{
  position: absolute; top: var(--nav-height); left: 12px; right: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  box-shadow: var(--shadow-lift);
}
.mobile-sheet.open .mobile-sheet-panel{ transform: translateY(0); opacity: 1; }
.mobile-sheet-panel a{
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.mobile-sheet-panel a:active{ background: var(--surface); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  padding: 56px 0 32px;
  text-align: center;
  position: relative;
}
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-1);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow .dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-grad);
}

.hero h1{
  font-family: var(--font-display);
  font-size: clamp(42px, 12vw, 84px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.55));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .subtitle{
  font-size: clamp(15px, 4vw, 19px);
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
  font-weight: 400;
  line-height: 1.5;
}

/* Search */
.search-wrap{
  max-width: 560px;
  margin: 0 auto 22px;
  position: relative;
}
.search-bar{
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  backdrop-filter: blur(16px);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.search-bar:focus-within{
  border-color: var(--border-strong);
  background: var(--surface-strong);
  box-shadow: 0 0 0 4px rgba(110,231,249,0.08);
}
.search-bar svg{ width: 18px; height: 18px; color: var(--text-tertiary); flex-shrink: 0; }
.search-bar input{
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-text);
}
.search-bar input::placeholder{ color: var(--text-tertiary); }
.search-clear{
  display: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-strong);
  align-items: center; justify-content: center;
  flex-shrink: 0;
  border: none;
  color: var(--text-secondary);
}
.search-clear.visible{ display: flex; }
.random-btn{
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  background: var(--accent-grad);
  color: #08080a;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.random-btn svg{ width: 14px; height: 14px; }

/* Category chips */
.chips{
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 20px 8px;
  margin: 0 -20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar{ display: none; }
.chip{
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.chip:hover{ color: var(--text); border-color: var(--border-strong); }
.chip.active{
  color: #08080a;
  background: var(--accent-grad);
  border-color: transparent;
}

/* ==========================================================================
   Section headers
   ========================================================================== */
.section{ padding: 36px 0; position: relative; z-index: 1; }
.section-head{
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.section-head h2{
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-head .count{
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ==========================================================================
   Wallpaper grid & cards
   ========================================================================== */
.grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px){
  .grid{ grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 960px){
  .grid{ grid-template-columns: repeat(4, 1fr); gap: 18px; }
}

.card{
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  animation: cardIn 0.6s var(--ease) forwards;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover{
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
@keyframes cardIn{
  to{ opacity: 1; transform: translateY(0); }
}

.card img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover img{ transform: scale(1.06); }

.card-overlay{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px;
}
.card-cat{
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 4px;
}
.card-title{
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}

.card-actions{
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 6px;
}
.icon-btn{
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10,10,12,0.55);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.icon-btn:active{ transform: scale(0.92); }
.icon-btn svg{ width: 15px; height: 15px; }
.icon-btn.fav-btn.active{ background: var(--accent-grad); color: #08080a; }
.icon-btn.fav-btn.active svg{ fill: currentColor; }

/* Card skeleton (loading state) */
.card.skeleton{
  animation: none;
  opacity: 1;
  transform: none;
}
.card.skeleton .skeleton-fill{
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-strong) 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

/* Empty / no-results states */
.state-message{
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  color: var(--text-secondary);
}
.state-message .state-icon{
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  animation: floatY 3s ease-in-out infinite;
}
.state-icon svg{ width: 26px; height: 26px; color: var(--text-tertiary); }
@keyframes floatY{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-8px); }
}
.state-message h3{
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  margin: 0 0 6px;
}
.state-message p{ font-size: 14px; margin: 0; color: var(--text-tertiary); }

/* ==========================================================================
   Buttons (generic)
   ========================================================================== */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn:active{ transform: scale(0.97); }
.btn svg{ width: 16px; height: 16px; }
.btn-primary{ background: var(--accent-grad); color: #08080a; }
.btn-primary:hover{ opacity: 0.92; }
.btn-secondary{ background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover{ background: var(--surface-strong); }
.btn-danger{ background: rgba(255,107,107,0.12); color: var(--danger); border: 1px solid rgba(255,107,107,0.25); }
.btn-block{ width: 100%; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer{
  border-top: 1px solid var(--border);
  padding: 32px 0 100px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  position: relative; z-index: 1;
}
footer .footer-links{
  display: flex; justify-content: center; gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
footer .footer-links a{ color: var(--text-secondary); font-weight: 500; }
footer .footer-links a:hover{ color: var(--text); }

/* ==========================================================================
   Scroll to top
   ========================================================================== */
#scroll-top{
  position: fixed; right: 18px; bottom: 24px; z-index: 80;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all 0.3s var(--ease);
}
#scroll-top.visible{ opacity: 1; visibility: visible; transform: translateY(0); }
#scroll-top svg{ width: 18px; height: 18px; }

/* ==========================================================================
   Toast
   ========================================================================== */
#toast-region{
  position: fixed; left: 50%; bottom: 24px; z-index: 200;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 380px;
}
.toast{
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  display: flex; align-items: center; gap: 8px;
  animation: toastIn 0.35s var(--ease);
}
.toast svg{ width: 15px; height: 15px; color: var(--accent-1); flex-shrink: 0; }
@keyframes toastIn{
  from{ opacity: 0; transform: translateY(10px) scale(0.95); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
.toast.out{ animation: toastOut 0.3s var(--ease) forwards; }
@keyframes toastOut{ to{ opacity: 0; transform: translateY(6px) scale(0.96); } }

/* ==========================================================================
   Keyboard shortcuts modal
   ========================================================================== */
.modal-backdrop{
  position: fixed; inset: 0; z-index: 300;
  background: rgba(4,4,6,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
@media (min-width: 640px){ .modal-backdrop{ align-items: center; } }
.modal-backdrop.open{ opacity: 1; visibility: visible; }
.modal{
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 22px calc(24px + env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: 420px;
  transform: translateY(30px);
  transition: transform 0.35s var(--ease);
}
@media (min-width: 640px){
  .modal{ border-radius: var(--radius-lg); }
}
.modal-backdrop.open .modal{ transform: translateY(0); }
.modal h3{ font-family: var(--font-display); margin: 0 0 16px; font-size: 18px; }
.kbd-row{
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}
.kbd-row:last-child{ border-bottom: none; }
kbd{
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-family: var(--font-text);
  color: var(--text);
}

/* ==========================================================================
   Preview page
   ========================================================================== */
.preview-wrap{
  padding: 20px 0 60px;
  position: relative; z-index: 1;
}
.back-link{
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary);
  font-size: 14px; font-weight: 500;
  margin-bottom: 18px;
}
.back-link svg{ width: 16px; height: 16px; }
.back-link:hover{ color: var(--text); }

.preview-image-wrap{
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 20px;
  position: relative;
}
.preview-image-wrap img{ width: 100%; height: auto; display: block; }

.preview-info{
  display: flex; flex-direction: column; gap: 18px;
}
.preview-title-row{
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.preview-title-row h1{
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.preview-cat{
  display: inline-block;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent-1);
}
.preview-meta{
  display: flex; gap: 10px; flex-wrap: wrap;
}
.meta-pill{
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.meta-pill svg{ width: 14px; height: 14px; }

.preview-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.preview-actions .btn-secondary.full{ grid-column: 1 / -1; }

.related-section{ margin-top: 40px; }

/* ==========================================================================
   Admin page
   ========================================================================== */
.admin-wrap{ padding: 90px 0 80px; position: relative; z-index: 1; }
.admin-header{ margin-bottom: 28px; }
.admin-header h1{
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 38px);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.admin-header p{ color: var(--text-secondary); margin: 0; font-size: 14.5px; max-width: 560px; }

.admin-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px){
  .admin-grid{ grid-template-columns: 380px 1fr; align-items: start; }
}

.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.panel h2{
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 18px;
}
.field{ margin-bottom: 16px; }
.field label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.field input[type="text"], .field select{
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14.5px;
  font-family: var(--font-text);
}
.field input:focus, .field select:focus{ outline: none; border-color: var(--border-strong); }

.dropzone{
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  margin-bottom: 16px;
}
.dropzone:hover, .dropzone.drag{ border-color: var(--accent-1); background: rgba(110,231,249,0.05); }
.dropzone svg{ width: 26px; height: 26px; color: var(--text-tertiary); margin-bottom: 10px; }
.dropzone p{ margin: 0; font-size: 13.5px; color: var(--text-secondary); }
.dropzone span{ display: block; font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.dropzone-preview{
  width: 100%; aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  object-fit: cover;
  margin-bottom: 12px;
  display: none;
}
.dropzone-preview.visible{ display: block; }

.admin-list{ display: flex; flex-direction: column; gap: 10px; }
.admin-row{
  display: flex; align-items: center; gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
}
.admin-row img{ width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.admin-row-info{ flex: 1; min-width: 0; }
.admin-row-info strong{ display: block; font-size: 14px; font-weight: 600; }
.admin-row-info span{ font-size: 12px; color: var(--text-tertiary); }
.admin-row-actions{ display: flex; gap: 6px; flex-shrink: 0; }
.admin-row-actions button{
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
}
.admin-row-actions button svg{ width: 14px; height: 14px; }
.admin-row-actions button:hover{ color: var(--text); background: var(--surface-strong); }

.admin-actions-bar{
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px;
}

.json-output{
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  color: var(--accent-1);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.admin-note{
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.6;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius-sm);
}
.admin-note strong{ color: var(--text-secondary); }

/* ==========================================================================
   404 page
   ========================================================================== */
.error-wrap{
  min-height: 90vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 20px;
  position: relative; z-index: 1;
}
.error-wrap .error-code{
  font-family: var(--font-display);
  font-size: clamp(64px, 20vw, 140px);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.error-wrap h1{ font-family: var(--font-display); font-size: 22px; margin: 12px 0 8px; }
.error-wrap p{ color: var(--text-secondary); margin: 0 0 26px; max-width: 340px; }

/* ==========================================================================
   Page transition fade
   ========================================================================== */
.page-fade{
  animation: pageFadeIn 0.5s var(--ease);
}
@keyframes pageFadeIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* Utility */
.visually-hidden{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
