/* ==========================================================================
   02 Folder - Modern Interactive Guestbook UI Stylesheet
   ========================================================================== */
:root {
  /* Light Theme */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-border: rgba(226, 232, 240, 0.9);
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --accent-primary: #6366f1;
  --accent-secondary: #ec4899;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-light: rgba(99, 102, 241, 0.1);
  --accent-border: rgba(99, 102, 241, 0.25);

  /* Note Card Background Themes */
  --card-theme-blue: #eff6ff;
  --card-theme-blue-border: #bfdbfe;
  --card-theme-pink: #fdf2f8;
  --card-theme-pink-border: #fbcfe8;
  --card-theme-yellow: #fefce8;
  --card-theme-yellow-border: #fef08a;
  --card-theme-green: #f0fdf4;
  --card-theme-green-border: #bbf7d0;
  --card-theme-purple: #faf5ff;
  --card-theme-purple-border: #e9d5ff;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-hand: 'Gaegu', 'Pretendard', cursive, sans-serif;
}

[data-theme="dark"] {
  /* Dark Theme */
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #1e293b;
  --bg-card-border: rgba(51, 65, 85, 0.7);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --accent-primary: #818cf8;
  --accent-secondary: #f472b6;
  --accent-gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
  --accent-light: rgba(129, 140, 248, 0.15);
  --accent-border: rgba(129, 140, 248, 0.35);

  /* Note Card Background Themes (Dark Mode Subtle) */
  --card-theme-blue: rgba(30, 58, 138, 0.25);
  --card-theme-blue-border: rgba(96, 165, 250, 0.3);
  --card-theme-pink: rgba(131, 24, 67, 0.25);
  --card-theme-pink-border: rgba(244, 114, 182, 0.3);
  --card-theme-yellow: rgba(113, 63, 18, 0.25);
  --card-theme-yellow-border: rgba(250, 204, 21, 0.3);
  --card-theme-green: rgba(20, 83, 45, 0.25);
  --card-theme-green-border: rgba(74, 222, 128, 0.3);
  --card-theme-purple: rgba(88, 28, 135, 0.25);
  --card-theme-purple-border: rgba(192, 132, 252, 0.3);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  background: none;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Top Header Bar
   ========================================================================== */
.gb-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(var(--bg-surface), 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-card-border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.gb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 1.1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  color: var(--accent-primary);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.btn-nav-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-nav-home:hover {
  background: var(--accent-light);
  color: var(--accent-primary);
  border-color: var(--accent-border);
}

/* Theme Toggle Icons */
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; color: #fbbf24; }

/* ==========================================================================
   Hero Section & Stats Dashboard
   ========================================================================== */
.gb-hero {
  padding: 48px 0 28px;
  text-align: center;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 14px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* Stats Row */
.stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-pill i {
  color: var(--accent-primary);
  font-size: 1.05rem;
}

.stat-pill strong {
  color: var(--text-primary);
  font-weight: 800;
}

/* ==========================================================================
   Guestbook Form Card (Message Creator)
   ========================================================================== */
.form-section {
  margin-bottom: 48px;
}

.creator-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.creator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--accent-gradient);
}

.creator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.creator-title {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 1. Avatar Selector */
.form-step-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.avatar-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.avatar-radio {
  display: none;
}

.avatar-label {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.avatar-label:hover {
  transform: scale(1.1);
  border-color: var(--accent-primary);
}

.avatar-radio:checked + .avatar-label {
  border-color: var(--accent-primary);
  background: var(--accent-light);
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* 2. Category & Color Picker Row */
.picker-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-radio {
  display: none;
}

.chip-label {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-label:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.chip-radio:checked + .chip-label {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* Color Theme Picker */
.color-swatches {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-radio {
  display: none;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}

.swatch-blue { background: #93c5fd; }
.swatch-pink { background: #f9a8d4; }
.swatch-yellow { background: #fde047; }
.swatch-green { background: #86efac; }
.swatch-purple { background: #d8b4fe; }

.color-swatch:hover {
  transform: scale(1.15);
}

.color-radio:checked + .color-swatch {
  transform: scale(1.25);
  border-color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 3. Input Fields */
.inputs-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
  background: var(--bg-surface);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

/* Textarea Extras (Quick Emojis & Counter) */
.textarea-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quick-emojis {
  display: flex;
  gap: 6px;
}

.emoji-btn {
  padding: 2px 6px;
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.emoji-btn:hover {
  transform: scale(1.2);
  border-color: var(--accent-primary);
}

/* Form Actions Row */
.creator-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--bg-card-border);
  flex-wrap: wrap;
  gap: 14px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.checkbox-wrap input {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all var(--transition-fast);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

/* ==========================================================================
   Filter & Search Bar
   ========================================================================== */
.feed-controls-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.filter-pills-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-pill:hover, .filter-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.search-and-sort {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
  width: 200px;
}

.search-box i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  font-size: 0.88rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
}

.sort-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   Guestbook Grid & Note Card Styles
   ========================================================================== */
.guestbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.note-card {
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
}

.note-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Note Card Themes */
.note-card.theme-blue { background: var(--card-theme-blue); border-color: var(--card-theme-blue-border); }
.note-card.theme-pink { background: var(--card-theme-pink); border-color: var(--card-theme-pink-border); }
.note-card.theme-yellow { background: var(--card-theme-yellow); border-color: var(--card-theme-yellow-border); }
.note-card.theme-green { background: var(--card-theme-green); border-color: var(--card-theme-green-border); }
.note-card.theme-purple { background: var(--card-theme-purple); border-color: var(--card-theme-purple-border); }

/* Pinned Host Note */
.note-card.pinned {
  border: 2px solid var(--accent-primary);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.2);
}

.pin-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--accent-gradient);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Card Header */
.note-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.note-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.note-author-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.host-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: bold;
}

.note-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.note-category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
}

/* Card Body */
.note-body {
  font-size: 0.96rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

.secret-mask-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-style: italic;
}

/* Card Footer Actions */
.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed rgba(100, 116, 139, 0.25);
}

.note-reactions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.like-btn i {
  color: #94a3b8;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn.liked {
  color: #ec4899;
}

.like-btn.liked i {
  color: #ec4899;
  transform: scale(1.25);
}

.reply-btn, .delete-btn {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}

.reply-btn:hover { color: var(--accent-primary); }
.delete-btn:hover { color: #ef4444; }

/* Reply Thread Drawer */
.reply-drawer {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
  font-size: 0.88rem;
  display: none;
}

.reply-drawer.open {
  display: block;
}

.reply-header {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.reply-text {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--bg-card-border);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Delete Confirmation Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  text-align: center;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

.modal-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-confirm-delete {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: #ef4444;
  color: #ffffff;
  font-weight: 700;
}

/* ==========================================================================
   Admin System & Header UI
   ========================================================================== */
.db-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  align-items: center;
  gap: 6px;
}

.admin-header-wrap {
  position: relative;
}

.btn-admin-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-admin-nav:hover {
  background: var(--accent-light);
  color: var(--accent-primary);
  border-color: var(--accent-border);
}

.btn-admin-nav.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.2) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  color: #d97706;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .btn-admin-nav.active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

.admin-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 190px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  overflow: hidden;
  animation: fadeInDown 0.2s ease;
}

.admin-dropdown.open {
  display: block;
}

.admin-dropdown-header {
  padding: 12px 14px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--bg-card-border);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--transition-fast);
}

.admin-menu-item:hover {
  background: var(--accent-light);
  color: var(--accent-primary);
}

.admin-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Admin Active Banner */
.admin-active-banner {
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
  color: #ffffff;
  padding: 8px 0;
  font-size: 0.86rem;
  box-shadow: var(--shadow-md);
}

.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.banner-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.banner-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Modal Form Specifics */
.modal-form-group {
  text-align: left;
  margin-bottom: 14px;
}

.modal-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.modal-icon.admin-icon {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
}

.btn-confirm-admin {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.btn-confirm-admin:hover {
  opacity: 0.9;
}

/* Note Card Admin Controls */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  margin-left: 6px;
}

[data-theme="dark"] .admin-badge {
  background: rgba(180, 83, 9, 0.25);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.3);
}

.secret-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-admin-del {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-admin-del:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-admin-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-admin-pin:hover {
  background: #f59e0b;
  color: #ffffff;
}


/* ==========================================================================
   Toast Notification & Footer
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gb-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xl);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gb-toast.success { border-left-color: #10b981; }
.gb-toast.error { border-left-color: #ef4444; }

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.gb-footer {
  margin-top: auto;
  border-top: 1px solid var(--bg-card-border);
  background: var(--bg-surface);
  padding: 28px 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .creator-card {
    padding: 20px;
  }

  .picker-row, .inputs-row {
    grid-template-columns: 1fr;
  }

  .feed-controls-card {
    flex-direction: column;
    align-items: stretch;
  }

  .search-and-sort {
    flex-direction: column;
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

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