/* ============================================================
   Variables & Reset
   ============================================================ */
:root {
  --bg-primary: #0a0a0f;
  --text-primary: #f0f0ff;
  --text-secondary: #a0a0c0;
  --text-muted: #606080;
  --accent: #6c63ff;
  --accent-dim: rgba(108, 99, 255, 0.25);
  --danger: #ff4757;
  --success: #2ed573;
  --glass-bg: rgba(255,255,255,0.035);
  --glass-border: rgba(255,255,255,0.08);
  --blur-sm: blur(12px);
  --blur-md: blur(24px);
  --blur-lg: blur(40px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tr: all 0.25s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.6s ease;
}

/* Dynamic wallpaper layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--wallpaper-bg,
    radial-gradient(ellipse at 20% 50%, rgba(108,99,255,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(120,80,255,0.06) 0%, transparent 50%)
  );
  pointer-events: none;
  z-index: 0;
  transition: background 0.6s ease;
}

#app { position: relative; z-index: 1; min-height: 100vh; }

/* ============================================================
   Loading
   ============================================================ */
.loading-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.loading-spinner {
  width: 44px; height: 44px;
  border: 2px solid rgba(255,255,255,0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Glass Card
   ============================================================ */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: var(--blur-md) saturate(160%);
  -webkit-backdrop-filter: var(--blur-md) saturate(160%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 32px;
  box-shadow:
    0 8px 40px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.09);
}

/* ============================================================
   Buttons — Water-drop Liquid Glass
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 26px;
  border: none;
  border-radius: 999px;          /* pill / water-drop shape */
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: var(--tr);
  /* lens distortion: scale up content slightly */
  transform-style: preserve-3d;
}

/* Inner highlight — top bright rim */
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 45%;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.28) 0%,
    rgba(255,255,255,0.04) 100%
  );
  border-radius: 999px 999px 60% 60%;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Bottom subtle highlight */
.btn::after {
  content: '';
  position: absolute;
  bottom: 0; left: 15%; right: 15%;
  height: 30%;
  background: linear-gradient(
    0deg,
    rgba(255,255,255,0.10) 0%,
    transparent 100%
  );
  border-radius: 50%;
  pointer-events: none;
}

/* --- Primary (accent) --- */
.btn-primary {
  background: rgba(108,99,255,0.18);
  backdrop-filter: blur(20px) saturate(200%) brightness(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(200%) brightness(1.15);
  color: rgba(210,208,255,0.95);
  border: 1px solid rgba(160,150,255,0.35);
  box-shadow:
    /* outer glow */
    0 0 0 1px rgba(108,99,255,0.12),
    0 4px 20px rgba(108,99,255,0.22),
    /* rim light */
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    inset 1px 0 0 rgba(255,255,255,0.10),
    inset -1px 0 0 rgba(255,255,255,0.10);
}
.btn-primary:hover {
  background: rgba(108,99,255,0.26);
  border-color: rgba(180,170,255,0.5);
  box-shadow:
    0 0 0 1px rgba(108,99,255,0.2),
    0 6px 28px rgba(108,99,255,0.35),
    inset 0 1px 0 rgba(255,255,255,0.38),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    inset 1px 0 0 rgba(255,255,255,0.14),
    inset -1px 0 0 rgba(255,255,255,0.14);
  transform: translateY(-1px) scale(1.02);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }

/* --- Glass (neutral) --- */
.btn-glass {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 3px 14px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.12);
}
.btn-glass:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.22);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 5px 20px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.12);
  transform: translateY(-1px) scale(1.02);
}
.btn-glass:active { transform: translateY(0) scale(0.98); }

/* --- Danger --- */
.btn-danger {
  background: rgba(255,71,87,0.14);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: rgba(255,160,168,0.95);
  border: 1px solid rgba(255,100,115,0.30);
  box-shadow:
    0 0 0 1px rgba(255,71,87,0.08),
    0 3px 14px rgba(255,71,87,0.18),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.12);
}
.btn-danger:hover {
  background: rgba(255,71,87,0.24);
  border-color: rgba(255,120,130,0.45);
  box-shadow:
    0 0 0 1px rgba(255,71,87,0.15),
    0 5px 22px rgba(255,71,87,0.32),
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.12);
  transform: translateY(-1px) scale(1.02);
}
.btn-danger:active { transform: translateY(0) scale(0.98); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-full { width: 100%; }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--text-muted); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.form-input {
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text-primary); font-size: 15px;
  outline: none; transition: var(--tr);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  background: rgba(255,255,255,0.06);
  border-color: rgba(108,99,255,0.45);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  padding: 12px 20px;
  background: rgba(10,10,15,0.65);
  backdrop-filter: var(--blur-md) saturate(180%);
  -webkit-backdrop-filter: var(--blur-md) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.055);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em;
}
.navbar-brand i { color: var(--accent); }
.navbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-badge {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  font-size: 13px; color: var(--text-secondary);
}
.user-badge i { color: var(--accent); font-size: 12px; }
.admin-badge {
  background: rgba(108,99,255,0.12);
  border-color: rgba(108,99,255,0.25);
  color: rgba(180,175,255,0.9);
}

/* ============================================================
   Wallpaper Picker (navbar panel)
   ============================================================ */
.wallpaper-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--tr);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  flex-shrink: 0;
}
.wallpaper-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

.wallpaper-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  width: 280px;
  background: rgba(12,12,20,0.92);
  backdrop-filter: var(--blur-lg) saturate(180%);
  -webkit-backdrop-filter: var(--blur-lg) saturate(180%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.1);
  z-index: 200;
  animation: fadeDown 0.2s var(--ease);
}
@keyframes fadeDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.wallpaper-panel-title {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin-bottom: 12px;
}
.wallpaper-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.wallpaper-swatch {
  aspect-ratio: 4/3;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--tr);
  position: relative;
  overflow: hidden;
}
.wallpaper-swatch:hover { transform: scale(1.05); border-color: rgba(255,255,255,0.3); }
.wallpaper-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wallpaper-swatch-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 3px 5px;
  background: rgba(0,0,0,0.55);
  font-size: 9px; color: rgba(255,255,255,0.75);
  text-align: center;
  border-radius: 0 0 8px 8px;
}

/* ============================================================
   Auth
   ============================================================ */
.auth-container {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, rgba(108,99,255,0.25), rgba(80,70,200,0.15));
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 8px 28px rgba(108,99,255,0.18), inset 0 1px 0 rgba(255,255,255,0.18);
  font-size: 30px; color: var(--accent);
}
.auth-title { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 5px; }

.auth-tabs {
  display: flex; gap: 3px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 3px; margin-bottom: 22px;
}
.auth-tab {
  flex: 1; padding: 9px;
  border: none; border-radius: 9px;
  background: transparent; color: var(--text-muted);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--tr);
}
.auth-tab.active {
  background: rgba(108,99,255,0.18); color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ============================================================
   Main Layout
   ============================================================ */
.main-container { max-width: 1200px; margin: 0 auto; padding: 28px 20px; }

/* ============================================================
   Gallery Access
   ============================================================ */
.gallery-access-container { max-width: 480px; margin: 0 auto; padding: 40px 20px; }
.gallery-access-header { text-align: center; margin-bottom: 28px; }
.gallery-access-icon {
  width: 60px; height: 60px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.22);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 26px; color: var(--accent);
}
.gallery-access-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.gallery-access-subtitle { color: var(--text-muted); font-size: 13px; margin-top: 5px; }

/* ============================================================
   Gallery View
   ============================================================ */
.gallery-header { margin-bottom: 24px; }
.gallery-title { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.gallery-meta { margin-top: 6px; }
.gallery-description { color: var(--text-secondary); margin-top: 6px; font-size: 14px; }

/* Visitors bar */
.visitors-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px; color: var(--text-muted);
}
.visitors-bar i { color: var(--accent); font-size: 12px; }
.visitor-chip {
  padding: 3px 10px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 999px;
  font-size: 12px; color: rgba(180,175,255,0.9);
}

.gallery-back-btn {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-muted); font-size: 13px;
  cursor: pointer; padding: 6px 0; margin-bottom: 20px;
  transition: var(--tr); background: none; border: none;
}
.gallery-back-btn:hover { color: var(--text-primary); }

/* Image Grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.image-item {
  position: relative; border-radius: 12px; overflow: hidden;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: var(--tr); aspect-ratio: 1;
}
.image-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.5);
  border-color: rgba(108,99,255,0.25);
}
.image-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.image-item:hover img { transform: scale(1.04); }
.image-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
  opacity: 0; transition: opacity 0.25s ease;
  display: flex; align-items: flex-end; padding: 10px;
}
.image-item:hover .image-item-overlay { opacity: 1; }
.image-download-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: white; font-size: 12px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Empty State */
.empty-state { text-align: center; padding: 72px 24px; color: var(--text-muted); }
.empty-state-icon { font-size: 44px; margin-bottom: 14px; opacity: 0.4; }
.empty-state-text { font-size: 15px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; }

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.25s ease;
  pointer-events: none;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox-content {
  position: relative;
  max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox-img {
  max-width: 90vw; max-height: 74vh;
  object-fit: contain; border-radius: 10px;
  box-shadow: 0 20px 72px rgba(0,0,0,0.65);
}
.lightbox-close {
  position: absolute; top: -44px; right: -4px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--text-primary); font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--tr);
}
.lightbox-close:hover { background: rgba(255,255,255,0.14); }
.lightbox-controls {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
}
.lightbox-nav {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  color: var(--text-primary); font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--tr);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.13); transform: scale(1.06); }
.lightbox-counter { font-size: 13px; color: var(--text-muted); min-width: 52px; text-align: center; }
.lightbox-download {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 20px;
  background: rgba(108,99,255,0.18);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(160,150,255,0.3);
  border-radius: 999px;
  color: rgba(210,208,255,0.95); font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: var(--tr);
  box-shadow: 0 3px 16px rgba(108,99,255,0.22), inset 0 1px 0 rgba(255,255,255,0.25);
}
.lightbox-download:hover {
  background: rgba(108,99,255,0.28);
  box-shadow: 0 5px 22px rgba(108,99,255,0.38), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

/* ============================================================
   Admin
   ============================================================ */
.admin-header { margin-bottom: 28px; }
.admin-title {
  font-size: 26px; font-weight: 700; letter-spacing: -0.03em;
  display: flex; align-items: center; gap: 10px;
}
.admin-title i { color: var(--accent); }
.admin-tabs {
  display: flex; gap: 3px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 3px;
  margin-bottom: 28px; width: fit-content;
}
.admin-tab {
  padding: 9px 18px; border: none; border-radius: 9px;
  background: transparent; color: var(--text-muted);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--tr);
  display: flex; align-items: center; gap: 7px;
}
.admin-tab.active {
  background: rgba(108,99,255,0.18); color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
.admin-tab:hover:not(.active) { background: rgba(255,255,255,0.04); color: var(--text-secondary); }

.gallery-list { display: flex; flex-direction: column; gap: 10px; }
.gallery-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 14px; transition: var(--tr); gap: 14px;
}
.gallery-list-item:hover {
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.09);
}
.gallery-list-info { flex: 1; min-width: 0; }
.gallery-list-name { font-size: 15px; font-weight: 600; }
.gallery-list-meta { display: flex; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.gallery-list-badge { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.gallery-list-badge i { color: var(--accent); font-size: 10px; }
.gallery-list-actions { display: flex; gap: 7px; flex-shrink: 0; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease; pointer-events: none; padding: 20px;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: rgba(12,12,22,0.96);
  backdrop-filter: var(--blur-lg); -webkit-backdrop-filter: var(--blur-lg);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px; padding: 28px;
  width: 100%; max-width: 460px;
  box-shadow: 0 20px 72px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(16px); transition: transform 0.25s var(--ease);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-title {
  font-size: 18px; font-weight: 700; margin-bottom: 22px;
  letter-spacing: -0.02em; display: flex; align-items: center; gap: 9px;
}
.modal-title i { color: var(--accent); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* Admin image grid */
.admin-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px;
}
.admin-image-item {
  position: relative; border-radius: 10px; overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06); aspect-ratio: 1;
}
.admin-image-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-image-delete {
  position: absolute; top: 5px; right: 5px;
  width: 28px; height: 28px;
  background: rgba(255,71,87,0.75);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,110,120,0.3);
  border-radius: 999px;
  color: white; font-size: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--tr); opacity: 0;
}
.admin-image-item:hover .admin-image-delete { opacity: 1; }
.admin-image-delete:hover { background: rgba(255,71,87,1); transform: scale(1.1); }

/* User list */
.user-list { display: flex; flex-direction: column; gap: 7px; }
.user-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 12px; transition: var(--tr);
}
.user-list-item:hover { background: rgba(255,255,255,0.04); }
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, rgba(108,99,255,0.25), rgba(80,70,200,0.15));
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--accent); flex-shrink: 0;
}
.user-info { flex: 1; margin-left: 11px; }
.user-name { font-size: 14px; font-weight: 500; }
.user-joined { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Admin wallpaper management */
.wallpaper-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.wallpaper-admin-item {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07); aspect-ratio: 4/3;
}
.wallpaper-admin-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 10px;
  background: rgba(0,0,0,0.6);
  font-size: 12px; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: space-between;
}

/* Section */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.section-title { font-size: 17px; font-weight: 600; }

/* Alerts */
.alert {
  padding: 12px 16px; border-radius: 10px; font-size: 13px;
  margin-bottom: 14px; display: flex; align-items: center; gap: 9px;
}
.alert-error { background: rgba(255,71,87,0.1); border: 1px solid rgba(255,71,87,0.22); color: #ff8090; }
.alert-success { background: rgba(46,213,115,0.1); border: 1px solid rgba(46,213,115,0.22); color: #60e89a; }

/* Badge */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.22);
  color: rgba(180,175,255,0.9);
}

/* Misc */
.hidden { display: none !important; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }
.text-muted { color: var(--text-muted); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* Responsive */
@media (max-width: 600px) {
  .navbar { padding: 10px 14px; }
  .main-container { padding: 20px 14px; }
  .glass-card { padding: 22px 18px; }
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 7px; }
  .gallery-list-item { flex-direction: column; align-items: flex-start; }
  .gallery-list-actions { width: 100%; }
  .admin-tabs { overflow-x: auto; }
  .wallpaper-panel { right: 8px; width: 260px; }
}

/* ============================================================
   Upload UI (Server-side upload)
   ============================================================ */
.upload-drop-area {
  border: 2px dashed rgba(108,99,255,0.35);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  background: rgba(108,99,255,0.04);
  transition: var(--tr);
  cursor: default;
}
.upload-drop-area.dragover {
  border-color: var(--accent);
  background: rgba(108,99,255,0.1);
}
.upload-drop-icon {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
  opacity: 0.7;
}
.upload-drop-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.upload-drop-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.upload-drop-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}
.upload-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
}
.upload-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}
.upload-file-size {
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 11px;
}
.upload-file-status {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
