:root {
  --input-border: #444;
  --border: #222;
  --bg: #000;
  --text: #fff;
  --surface: #111;
  --muted: #888;
}

body.light {
  --input-border: #bbb;
  --border: #ddd;
  --bg: #f0ede8;
  --text: #111;
  --surface: #fff;
  --muted: #666;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  margin: 0;
  font-family: 'DM Sans', sans-serif;
}

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-btn {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.logo-img {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  cursor: pointer;
  object-fit: cover;
}

/* ── Search ── */
.search-wrap {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 10px 20px;
  border-radius: 999px;
  border: 0.5px solid var(--input-border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.3s;
}

.search-input::placeholder {
  color: #777;
}

/* ── Sign in button ── */
.btn-signin {
  background: none;
  border: 0.5px solid var(--input-border);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-signin:hover {
  background: var(--text);
  color: var(--bg);
}

/* ── Hamburger ── */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: background 0.3s;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 240px;
  background: var(--surface);
  z-index: 100;
  padding: 32px 20px;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  display: none;
}

.sidebar-overlay.open {
  display: block;
}

.sidebar-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.upload-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #f5c842;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.upload-btn:hover {
  opacity: 0.85;
}

/* ── Upload Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
}

.modal-overlay.open {
  display: block;
}

.upload-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg);
  border: 0.5px solid var(--input-border);
  border-radius: 16px;
  padding: 24px 28px;
  z-index: 201;
}

.upload-modal.open {
  display: block;
}

.upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.upload-modal-header .admin-title {
  margin-bottom: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: var(--text);
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-list li {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-list li:hover {
  background: var(--bg);
}

/* ── Toggle ── */
.toggle-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-wrap span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.3s;
}

.toggle {
  width: 44px;
  height: 24px;
  background: #333;
  border-radius: 999px;
  position: relative;
  transition: background 0.25s;
}

.toggle.on {
  background: #f5c842;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s;
}

.toggle.on::after {
  transform: translateX(20px);
}

/* ── Main Content ── */
.main-content {
  padding: 24px 32px;
  margin-top: 40px;
  display: block;
}

.category-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 250px);
  gap: 20px;
  justify-content: center;
}

.card {
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 0.5px solid var(--input-border);
  transition: transform 0.18s;
  width: 250px;
}

.card:hover {
  transform: translateY(-4px);
}

.card-thumb {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: #222;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ── Prompt Page ── */
.prompt-page {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 32px;
}

.prompt-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.prompt-image img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.prompt-page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.prompt-description {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.prompt-instructions {
  background: var(--surface);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border: 0.5px solid var(--input-border);
}

.prompt-instructions h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.prompt-instructions p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.prompt-box {
  background: var(--surface);
  border-radius: 10px;
  padding: 20px 24px;
  border: 0.5px solid var(--input-border);
  position: relative;
}

#prompt-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 16px;
}

.copy-btn {
  background: #f5c842;
  color: #000;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.copy-btn:hover {
  opacity: 0.85;
}

/* ── Admin Panel ── */
.admin-wrap {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 32px;
}

.admin-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-input {
  padding: 10px 16px;
  border-radius: 8px;
  border: 0.5px solid var(--input-border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.admin-textarea {
  padding: 10px 16px;
  border-radius: 8px;
  border: 0.5px solid var(--input-border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  height: 150px;
  resize: vertical;
}

.admin-prompt-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
  border: 0.5px solid var(--input-border);
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
}

.delete-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

/* ── Auth ── */
.auth-wrap {
  max-width: 400px;
  margin: 80px auto;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border-radius: 16px;
  border: 0.5px solid var(--input-border);
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.google-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 0.5px solid var(--input-border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.google-btn img {
  width: 32px;
  height: 32px;
}

.google-btn:hover {
  border-color: var(--text);
  transform: scale(1.05);
}

.auth-divider {
  color: var(--muted);
  font-size: 13px;
}

.auth-switch {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.auth-switch span {
  color: #f5c842;
  cursor: pointer;
  font-weight: 600;
}

/* ── Mobile Layout ── */
@media (max-width: 768px) {

  .navbar {
    padding: 12px 16px;
    gap: 10px;
  }

  .search-wrap {
    max-width: 100%;
  }

  .search-input {
    font-size: 13px;
    padding: 8px 16px;
  }

  .btn-signin {
    padding: 7px 12px;
    font-size: 12px;
  }

  .main-content {
    padding: 16px;
    margin-top: 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    width: 100%;
  }

  .toggle-wrap {
    bottom: 16px;
    right: 16px;
  }

  .prompt-page {
    padding: 0 16px;
    margin: 20px auto;
  }

  .prompt-image img {
    height: 220px;
  }

  .prompt-page-title {
    font-size: 18px;
  }

  .sidebar {
    width: 100%;
  }
}
.static-page {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 32px;
  color: var(--text);
  line-height: 1.8;
}

.static-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.static-page h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 8px;
}

.static-page p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 16px;
}

.footer {
  text-align: center;
  padding: 24px;
  margin-top: 40px;
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--text);
}
/* ── Mobile Layout ── */
@media (max-width: 768px) {

  .navbar {
    display: flex;
    align-items: centre;
    padding: 12px 16px;
    gap: 10px;
  }

  .search-wrap {
    flex:1
    max-width: 100%;
    min-widt: 0;
  }

  .search-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    padding: 8px 16px;
  }

  .btn-signin {
    flex-shrink: 0;
    white-space: nowrap
    padding: 6px 10px;
    font-size: 12px;
  }

  .main-content {
    padding: 16px;
    margin-top: 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    width: 100%;
  }

  .toggle-wrap {
    bottom: 16px;
    right: 16px;
  }

  .prompt-page {
    padding: 0 16px;
    margin: 20px auto;
  }

  .prompt-image img {
    height: 220px;
  }

  .prompt-page-title {
    font-size: 18px;
  }

  .sidebar {
    width: 100%;
  }

}
.admin-wrap {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 32px;
}

.admin-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-input {
  padding: 10px 16px;
  border-radius: 8px;
  border: 0.5px solid var(--input-border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.admin-textarea {
  padding: 10px 16px;
  border-radius: 8px;
  border: 0.5px solid var(--input-border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  height: 150px;
  resize: vertical;
}

.admin-prompt-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
  border: 0.5px solid var(--input-border);
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
}

.delete-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.auth-wrap {
  max-width: 400px;
  margin: 80px auto;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border-radius: 16px;
  border: 0.5px solid var(--input-border);
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.google-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 0.5px solid var(--input-border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.google-btn img {
  width: 32px;
  height: 32px;
}

.google-btn:hover {
  border-color: var(--text);
  transform: scale(1.05);
}

.auth-divider {
  color: var(--muted);
  font-size: 13px;
}

.auth-switch {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.auth-switch span {
  color: #f5c842;
  cursor: pointer;
  font-weight: 600;
}