/* ==========================================================================
   Photo Project (Prompt Grid Clone) - Modern HTML5/CSS3 Stylesheet
   1:1 Desktop, Tablet, Android & iPhone Responsive UI + Auto-Loading System
   ==========================================================================
   🎨 কালার গাইড (কোথাকার কালার কোথা থেকে বদলাবেন — অ্যাডমিন প্যানেল বা এখান থেকে):
   1. --bg-main          : পুরো ওয়েবসাইটের মেইন ব্যাকগ্রাউন্ড কালার (Default: #faf5f2 ক্রিম কালার)
   2. --bg-sidebar       : বামদিকের সাইডবার, মোবাইলের উপরের হেডার ও নিচের নেভিগেশন বারের কালার (Default: #ffffff)
   3. --bg-card          : ফটো কার্ড, পোস্ট ডিটেইলস বক্স এবং নিচের 'Loading...' বক্সের কালার (Default: #ffffff)
   4. --text-primary     : ওয়েবসাইটের প্রধান লেখার কালার — লোগো টাইটেল ও হেডিং (Default: #111827)
   5. --text-secondary   : সাইডবার মেনু, প্রম্পট টেক্সট ও সাধারণ লেখার কালার (Default: #4b5563)
   6. --text-muted       : তারিখ/সময়, ফুটার ও হ্যাশট্যাগের হালকা লেখার কালার (Default: #8e8a86)
   7. --bg-pill-active   : সিলেক্ট করা অ্যাক্টিভ ফিল্টার বাটন ('All') ও 'Copy Prompt' বাটনের কালার (Default: #111111)
   8. --text-pill-active : অ্যাক্টিভ ফিল্টার বাটন ও 'Copy Prompt' বাটনের লেখার কালার (Default: #ffffff)
   9. --bg-pill          : সাধারণ ফিল্টার বাটনগুলোর (Gemini, ChatGPT ইত্যাদি) ব্যাকগ্রাউন্ড কালার (Default: #ffffff)
   10. --bg-nav-active   : সাইডবার ও মোবাইল বটম বারে সিলেক্ট থাকা মেনুর হাইলাইট কালার (Default: #f3ede8)
   11. --border-color    : কার্ড, হেডার, সাইডবার ও বাটনের চারপাশের বর্ডার কালার (Default: #ece7e3)
   12. --bg-model-badge  : ফটোর উপরে বাম কোণায় থাকা ব্যাজ (GEMINI, CHATGPT) এর ব্যাকগ্রাউন্ড কালার (Default: #141414)
   13. --text-model-badge: ফটোর উপরের মডেল ব্যাজের লেখার কালার (Default: #ffffff)
   14. --color-like-active: ফটোতে লাইক (♡) দিলে হার্ট আইকনের লাল/পিংক কালার (Default: #ff4d6d)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Montserrat:wght@500;600;700&family=Playfair+Display:wght@600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* 1. পুরো ওয়েবসাইটের মেইন ব্যাকগ্রাউন্ড কালার (Main Page Background) */
  --bg-main: #faf5f2;
  /* 2. সাইডবার, মোবাইল টপ হেডার ও বটম নেভিগেশন বারের কালার (Sidebar, Mobile Header & Bottom Nav) */
  --bg-sidebar: #ffffff;
  /* 3. ফটো কার্ড, ডিটেইল বক্স ও Loading... বক্সের কালার (Cards, Modals & Auto-Loader Box) */
  --bg-card: #ffffff;
  /* 4. সাধারণ ফিল্টার পিল বাটনের ব্যাকগ্রাউন্ড কালার (Inactive Filter Pill Background) */
  --bg-pill: #ffffff;
  /* 5. অ্যাক্টিভ ফিল্টার পিল ('All') ও Copy Prompt বাটনের ব্যাকগ্রাউন্ড কালার (Active Pill & Primary Button) */
  --bg-pill-active: #111111;
  /* 6. অ্যাক্টিভ ফিল্টার পিল ও Copy Prompt বাটনের লেখার কালার (Active Pill & Button Text) */
  --text-pill-active: #ffffff;
  /* 7. সিলেক্ট করা মেনু বা ক্যাটাগরির হাইলাইট কালার (Active Menu Highlight Background) */
  --bg-nav-active: #f3ede8;
  /* 8. ক্যাটাগরি সংখ্যার ব্যাজ কালার (Category Count Badge Background) */
  --bg-badge-count: #f1efed;
  /* 9. প্রধান লেখার কালার — টাইটেল ও হেডিং (Primary Heading & Brand Text Color) */
  --text-primary: #111827;
  /* 10. সাধারণ লেখা ও প্রম্পট বিবরণের কালার (Secondary Body & Prompt Text Color) */
  --text-secondary: #4b5563;
  /* 11. হালকা লেখা — তারিখ, সময় ও ফুটার (Muted Text, Date/Time & Footer Color) */
  --text-muted: #8e8a86;
  /* 12. বর্ডার বা দাগের কালার (Main Border Color) */
  --border-color: #ece7e3;
  --border-subtle: #f3efec;
  /* 13. ফটো কার্ডের উপরের মডেল ব্যাজ কালার (Card Top-Left Model Badge Background & Text) */
  --bg-model-badge: rgba(20, 20, 20, 0.74);
  --text-model-badge: #ffffff;
  /* 14. লাইক (♡) হার্ট অ্যাক্টিভ কালার (Active Like Heart Color) */
  --color-like-active: #ff4d6d;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.07);
  --font-primary: 'Plus Jakarta Sans', 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-prompt: 'Inter', 'Hind Siliguri', sans-serif;
  --base-font-size: 14px;
  --card-radius: 14px;
  --sidebar-w: 220px;
  --sidebar-w-collapsed: 52px;
}

[data-theme="dark"] {
  --bg-main: #121214 !important;
  --bg-sidebar: #18181b !important;
  --bg-card: #1f1f23 !important;
  --bg-pill: #232329 !important;
  --bg-pill-active: #ffffff !important;
  --text-pill-active: #111111 !important;
  --bg-nav-active: #27272d !important;
  --bg-badge-count: #27272d !important;
  --text-primary: #f4f4f5 !important;
  --text-secondary: #d4d4d8 !important;
  --text-muted: #8e8e96 !important;
  --border-color: #27272a !important;
  --border-subtle: #232326 !important;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: var(--base-font-size);
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ==========================================================================
   App Layout (Desktop: Left Sticky Sidebar + Right Masonry Grid)
   (Mobile & Tablet: Top Sticky Header + Off-Canvas Drawer Sidebar + Full Grid)
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  align-items: flex-start;
  position: relative;
}

/* ==========================================================================
   Sidebar Navigation (Desktop Sticky & Mobile/Tablet Slide-Over Drawer)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
  user-select: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
  min-width: var(--sidebar-w-collapsed);
  max-width: var(--sidebar-w-collapsed);
  padding: 12px 6px;
  align-items: center;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 14px 6px;
  gap: 8px;
}

.sidebar.collapsed .sidebar-header {
  flex-direction: column;
  justify-content: center;
  padding: 2px 0 10px 0;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}

.brand-logo {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  background-color: var(--text-primary);
  color: var(--bg-sidebar);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: -0.5px;
}

.brand-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.sidebar.collapsed .brand-title {
  display: none;
}

.collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.collapse-btn:hover {
  background-color: var(--bg-nav-active);
  color: var(--text-primary);
}

.sidebar-scroll {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.nav-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 8px 4px;
  display: none;
}

.sidebar.collapsed .nav-divider {
  display: block;
  width: 80%;
  margin: 6px auto;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 14px 8px 4px 8px;
  letter-spacing: 0.2px;
}

.sidebar.collapsed .nav-section-label {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  text-align: left;
  gap: 8px;
}

.nav-item:hover {
  background-color: var(--bg-nav-active);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--bg-nav-active);
  color: var(--text-primary);
  font-weight: 700;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.nav-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.nav-item.active .nav-icon {
  color: var(--text-primary);
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 10.5px;
  font-weight: 600;
  background-color: var(--bg-badge-count);
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 8px 0;
}

.sidebar.collapsed .nav-item-left {
  justify-content: center;
  flex: unset;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge {
  display: none;
}

.sidebar-footer {
  padding-top: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}

.sidebar.collapsed .sidebar-footer {
  flex-direction: column;
  justify-content: center;
}

.theme-toggle-btn, .admin-link-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover, .admin-link-btn:hover {
  background-color: var(--bg-nav-active);
  color: var(--text-primary);
}

/* ==========================================================================
   Main Content Area & Top Filter Pills Bar (Matches Screenshot_20261028_134306.jpg)
   ========================================================================== */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 14px 16px 36px 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 14px 2px;
}

.top-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: 999px;
  background-color: var(--bg-pill);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.filter-pill:hover {
  transform: translateY(-1px);
}

.filter-pill.active {
  background-color: var(--bg-pill-active);
  color: var(--text-pill-active);
  border-color: var(--bg-pill-active);
}

.view-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 14px 2px;
}

.view-header.visible {
  display: flex;
}

.view-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

/* ==========================================================================
   Masonry Photo Grid & Photo Cards
   - Desktop (> 1280px): 4 columns
   - Desktop (1025px - 1280px): 3 columns
   - Tablet (641px - 1024px): 3 columns full width
   - Mobile / iPhone (<= 640px): 2 columns full width (Matches Screenshot_20261028_134306.jpg)
   ========================================================================== */
.masonry-grid {
  column-count: 3;
  column-gap: 14px;
  width: 100%;
}

@media (min-width: 1280px) {
  .masonry-grid {
    column-count: 4;
    column-gap: 16px;
  }
}

@media (max-width: 640px) {
  .masonry-grid {
    column-count: 2;
    column-gap: 12px;
  }
}

.photo-card {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--card-radius);
  overflow: hidden;
  position: relative;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 640px) {
  .photo-card {
    margin-bottom: 12px;
    border-radius: var(--card-radius);
  }
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.photo-card:hover img {
  transform: scale(1.02);
}

/* Top-left Model Badge (GEMINI, NANOBANANAA, CHATGPT, MIDJOURNEY) */
.card-model-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--bg-model-badge);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-model-badge);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 2;
  pointer-events: none;
}

/* Bottom Stats & Favourite Overlay */
.card-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 26px 10px 8px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.36) 62%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  z-index: 2;
}

.card-stats-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  color: rgba(255, 255, 255, 0.96);
  transition: transform 0.15s ease, color 0.15s ease;
}

.stat-chip.like-btn:hover {
  transform: scale(1.1);
}

.stat-chip.liked {
  color: var(--color-like-active);
}

.stat-chip svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.card-fav-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  transition: transform 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.card-fav-btn:hover {
  background-color: rgba(255, 255, 255, 0.18);
  transform: scale(1.1);
}

.card-fav-btn.saved {
  color: #fbbf24;
}

.card-fav-btn svg {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   Auto-Loading ("Loading...") Infinite Scroll Box (Screenshot_20261028_134324.jpg)
   ========================================================================== */
.auto-load-wrap {
  width: 100%;
  margin: 12px 0 6px 0;
}

.auto-load-box {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.auto-load-box:hover {
  background-color: var(--bg-nav-active);
  color: var(--text-primary);
}

.auto-load-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-color);
  border-top-color: var(--text-secondary);
  border-radius: 50%;
  animation: autoSpin 0.8s linear infinite;
  display: none;
}

.auto-load-box.is-loading .auto-load-spinner {
  display: inline-block;
}

@keyframes autoSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Dedicated Single Post Detail View
   ========================================================================== */
.post-detail-view {
  display: none;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  flex-direction: column;
  gap: 28px;
}

.post-detail-view.active {
  display: flex;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(280px, 46%) 1fr;
  gap: 24px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 820px) {
  .detail-card {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 16px;
  }
}

.detail-image-col {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-image-col img {
  width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.detail-back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
  z-index: 5;
}

.detail-back-btn:hover {
  transform: scale(1.06);
  background-color: rgba(0, 0, 0, 0.9);
}

.detail-info-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.detail-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-stats-group {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.detail-stat-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.detail-stat-btn:hover {
  background-color: var(--bg-nav-active);
}

.detail-stat-btn.liked {
  color: var(--color-like-active);
  background-color: rgba(255, 77, 109, 0.12);
}

.detail-date {
  font-size: 12px;
  color: var(--text-muted);
}

.detail-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background-color: var(--bg-nav-active);
  color: var(--text-primary);
}

.detail-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
}

.detail-prompt-box {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: var(--font-prompt);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.detail-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hashtag-chip {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--bg-main);
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.hashtag-chip:hover {
  color: var(--text-primary);
}

.detail-actions-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  padding-top: 6px;
}

.btn-save-prompt {
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-save-prompt:hover {
  background-color: var(--bg-nav-active);
}

.btn-save-prompt.saved {
  border-color: #f59e0b;
  color: #d97706;
}

.btn-copy-prompt {
  padding: 11px 16px;
  border-radius: 10px;
  background-color: var(--bg-pill-active);
  color: var(--text-pill-active);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-copy-prompt:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.related-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* ==========================================================================
   Information & Blog Pages Container
   ========================================================================== */
.info-page-view {
  display: none;
  max-width: 820px;
  width: 100%;
  margin: 8px auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.info-page-view.active {
  display: block;
}

.info-page-view h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
}

.info-page-view p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.blog-card {
  padding: 18px;
  border-radius: 12px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.blog-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.blog-card .blog-date {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.empty-state-box {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}

.empty-state-box h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* ==========================================================================
   Search Popup Modal
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 20px 16px;
}

.search-modal-backdrop.open {
  display: flex;
}

.search-modal {
  width: 100%;
  max-width: 560px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.search-input-bar {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
}

.search-input-bar input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.search-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.search-result-item:hover {
  background-color: var(--bg-nav-active);
}

.search-result-item img {
  width: 44px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Site Footer (Matches Screenshot_20261028_134324.jpg) */
.site-footer {
  margin-top: auto;
  padding: 20px 0 12px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 72px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background-color: #111827;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MOBILE & TABLET TOP HEADER + DRAWER + BOTTOM PILL NAVIGATION
   Matches Screenshot_20261028_134306.jpg & Screenshot_2026_1028_135542.jpg 1:1
   ========================================================================== */
.mobile-top-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 48;
  width: 100%;
  gap: 10px;
}

.mobile-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mobile-menu-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.mobile-menu-btn:hover {
  background-color: var(--bg-nav-active);
}

.mobile-top-left .brand-logo {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
}

.mobile-top-left .brand-title {
  font-size: 18px !important;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.mobile-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hidden by default so Mobile Top Bar matches Screenshot_20261028_134306.jpg cleanly */
.mobile-layout-pill {
  display: none;
}

.mobile-search-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-theme-box-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Mobile Slide-Over Drawer Backdrop */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 55;
}

.mobile-drawer-backdrop.open {
  display: block;
}

/* Sticky Bottom Pill Navigation Bar (Screenshot_2026_1028_135542.jpg) */
.mobile-bottom-nav {
  display: none;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 8px;
  z-index: 49;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.mob-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.mob-nav-btn.active {
  color: var(--text-primary);
  background-color: var(--bg-nav-active);
  font-weight: 700;
}

.mob-nav-btn svg {
  width: 17px;
  height: 17px;
}

/* ==========================================================================
   Real Tablet (<= 1024px) & Real Mobile (<= 640px) Viewport Rules
   ========================================================================== */
@media (max-width: 1024px) {
  .mobile-top-bar {
    display: flex;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    z-index: 65;
    transform: translateX(-105%);
    box-shadow: 10px 0 32px rgba(0, 0, 0, 0.28);
  }
  .sidebar.mobile-drawer-open {
    transform: translateX(0);
  }
  .main-content {
    padding: 14px 14px 28px 14px;
    width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .masonry-grid {
    column-count: 3;
    column-gap: 14px;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 12px 12px 24px 12px;
  }
  .filter-pill {
    padding: 8px 18px;
    font-size: 13px;
  }
  .masonry-grid {
    column-count: 2;
    column-gap: 12px;
  }
}

/* ==========================================================================
   Simulated Viewport Classes for Live Testing on Desktop / Canvas
   - body.sim-tablet : Tablet / iPad (3-column full-width grid + drawer sidebar)
   - body.sim-mobile : Android Mobile (2-column full-width grid + drawer sidebar)
   - body.sim-iphone : iPhone (2-column full-width grid + drawer sidebar)
   ========================================================================== */
body.sim-tablet .mobile-top-bar,
body.sim-mobile .mobile-top-bar,
body.sim-iphone .mobile-top-bar {
  display: flex;
}

body.sim-tablet .mobile-bottom-nav,
body.sim-mobile .mobile-bottom-nav,
body.sim-iphone .mobile-bottom-nav {
  display: flex;
}

body.sim-tablet .sidebar,
body.sim-mobile .sidebar,
body.sim-iphone .sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 255px !important;
  min-width: 255px !important;
  max-width: 255px !important;
  z-index: 65;
  display: none;
  box-shadow: 12px 0 36px rgba(0, 0, 0, 0.35);
}

body.sim-tablet .sidebar.mobile-drawer-open,
body.sim-mobile .sidebar.mobile-drawer-open,
body.sim-iphone .sidebar.mobile-drawer-open {
  display: flex;
  transform: translateX(0);
}

body.sim-tablet .masonry-grid {
  column-count: 3 !important;
  column-gap: 14px !important;
}

body.sim-mobile .masonry-grid,
body.sim-iphone .masonry-grid {
  column-count: 2 !important;
  column-gap: 12px !important;
}

body.sim-mobile .main-content,
body.sim-iphone .main-content {
  padding: 12px 12px 24px 12px !important;
}

body.sim-mobile .filter-pill,
body.sim-iphone .filter-pill {
  padding: 8px 18px !important;
  font-size: 13px !important;
}

body.sim-mobile .photo-card,
body.sim-iphone .photo-card {
  margin-bottom: 12px !important;
  border-radius: var(--card-radius) !important;
}

body.sim-mobile .detail-card,
body.sim-iphone .detail-card,
body.sim-tablet .detail-card {
  grid-template-columns: 1fr !important;
  padding: 12px !important;
  gap: 14px !important;
}
