/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

html,
body {
  overflow-x: clip;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: #121212;
  color: #111827;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  max-width: 1200px;
  margin: 0 auto;   
  padding: 0 2rem 2rem;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: rgb(197, 89, 31);
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.bottom-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: rgb(197, 89, 31);
  border-radius: 0 0 10px 10px;
  margin-top: 2rem;
}

main > .bottom-header-bar { 
  margin-top: auto;
  position: relative;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
}

.header-logo {
  color: white;
  display: flex;
  align-items: center;
}

.header-logo a {
  color: inherit;
  font-size: 1.5rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}


.welcome-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #111827;
  background-color: rgb(141, 134, 134);
  padding: 0.5rem 0.75rem;
  margin-top: 15px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  body {
    padding: 0 1rem 1rem;
  }

  .header-bar {
    padding: 0.75rem;
  }

  .site-header {
    flex-wrap: wrap;
  }

}

.btn {
  background-color: rgb(197, 89, 31);
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;

}

.recently-added {
  margin-top: 2rem;
  color: #ffffff;
}

.snack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.snack-card {
  background: rgb(141, 134, 134);
  border-radius: 8px;
  padding: 1.5rem;
 
  border: 1px solid #e5e7eb;
}

.snack-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.meta-tags {
  font-size: 0.875rem;
  color: #fafafa;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.description {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.4;
}

/* the whole shabang */
:root {
  --fb-blue: #2563eb;
  --fb-blue-dark: #1e3a8a;
  --fb-blue-light: #eff6ff;
  --paper: #;
  --border: #d8e1ef;
  --ink: #1e293b;
  --muted: #64748b;
}

:root[data-theme="dark"] {
  --fb-blue: #60a5fa;
  --fb-blue-dark: #1d4ed8;
  --fb-blue-light: #172554;
  --paper: #182337;
  --border: #334155;
  --ink: #e2e8f0;
  --muted: #a5b4c7;
}

* { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f8fafc;
  color: var(--ink);
}

:root[data-theme="dark"] body { background: #0f172a; }

main { width: 100%; max-width: none; padding: 0 clamp(10px, 2vw, 28px); }

.header-bar {
  padding: .55rem .8rem;
  background: linear-gradient(135deg, #3b82f6, var(--fb-blue));
  border: 1px solid #1d4ed8;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

main > .header-bar { left: auto; width: 100vw; margin-left: calc(50% - 50vw); transform: none; }

.header-logo a { font-size: 1.42rem; font-weight: bold; text-shadow: 1px 1px #1e40af; }
.site-tagline { display: block; color: #dbeafe; font-size: .68rem; letter-spacing: .04em; }
.header-logo .logo { object-fit: contain; }
.search-form { max-width: 760px; margin-right: -0.65rem; }
.search-form input { padding: .68rem 1rem .68rem 2.75rem; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; font-size: .9rem; }
.theme-toggle { width: 2rem; height: 2rem; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(255,255,255,.14); color: white; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.theme-toggle:hover, .theme-toggle:focus-visible { background: rgba(255,255,255,.28); }

.forum-nav { display: flex; align-items: center; gap: 1.15rem; padding: .5rem .7rem; background: var(--fb-blue-light); border: 1px solid var(--border); border-top: 0; font-size: .78rem; }
main > .forum-nav { position: relative; left: 50%; width: 100vw; transform: translateX(-50%); }
.forum-nav a, a { color: var(--fb-blue); }
.crumb { color: var(--muted); font-weight: bold; }
.online-note { margin-left: auto; color: var(--muted); font-size: .78rem; }
.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 18px; margin-top: 16px; }

.welcome-container { display: block; padding: 1rem 1.15rem; margin-top: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--border); border-top: 3px solid var(--fb-blue); border-radius: 2px; }
.welcome-container h1 { margin: .18rem 0 .35rem; color: #172554; font-size: 1.55rem; }
.welcome-container p:last-child { max-width: 650px; margin: 0; color: #526174; font-size: .95rem; line-height: 1.5; }
.eyebrow, .section-kicker { margin: 0; color: var(--muted); font-size: .74rem; font-weight: bold; letter-spacing: .08em; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 1.25rem 0 .45rem; }
.recently-added { margin: .12rem 0 0; color: #172554; font-size: 1.15rem; }
.text-link { font-size: .84rem; }

.snack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 0 0 1.5rem; }
.snack-card { display: flex; flex-direction: column; min-height: 340px; padding: .75rem .9rem; background: var(--paper); border: 1px solid var(--border); border-radius: 2px; box-shadow: 0 1px 1px rgba(40,55,80,.06); }
.snack-card[hidden] { display: none; }
.snack-pagination { display: flex; align-items: center; justify-content: center; gap: .65rem; margin: -0.5rem 0 1.5rem; }
.snack-pagination button { min-width: 76px; border: 1px solid var(--border); border-radius: 2px; padding: .4rem .65rem; background: var(--paper); color: var(--fb-blue); font: inherit; font-weight: bold; cursor: pointer; }
.snack-pagination button:hover:not(:disabled) { border-color: var(--fb-blue); background: #eff6ff; }
.snack-pagination button:disabled { cursor: not-allowed; opacity: .5; }
.snack-pagination span { min-width: 88px; color: var(--muted); font-size: .85rem; text-align: center; }
.snack-card:hover { border-color: #93c5fd; background: #f8fbff; }
.snack-card h3 { margin: 0 0 .25rem; color: var(--fb-blue); font-size: 1rem; }
.meta-tags { margin-bottom: .38rem; color: var(--muted); font-size: .78rem; letter-spacing: 0; }
.description { display: -webkit-box; overflow: hidden; margin: .35rem 0 0; color: #526174; font-size: .9rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.snack-card [style*="margin-bottom"] { margin-bottom: .25rem !important; }
.card-rating { display: inline-flex; align-items: center; gap: 0.08rem; }
.card-rating-star { color: #cbd5e1; font-size: 1.05rem; line-height: 1; }
.card-rating-star.is-filled { color: #f59e0b; }
.card-rating-value { margin-left: 0.3rem; color: var(--muted); font-size: 0.82rem; }

.forum-sidebar { padding-top: 0; }
.sidebar-panel { display: grid; gap: .5rem; margin-bottom: 12px; padding: .7rem .8rem; background: var(--paper); border: 1px solid var(--border); border-radius: 2px; font-size: .84rem; }
.sidebar-panel h2 { margin: -.7rem -.8rem .15rem; padding: .4rem .6rem; background: var(--fb-blue); color: white; font-size: .86rem; }
.sidebar-panel a { border-bottom: 1px solid #eef2f7; padding-bottom: .35rem; }
.bulletin p { margin: .2rem 0; color: #526174; line-height: 1.45; }
.btn { padding: .42rem .72rem; background: var(--fb-blue); border: 1px solid var(--fb-blue-dark); border-radius: 2px; font-size: .78rem; }
.btn:hover { background: var(--fb-blue-dark); }
.profile-button { white-space: nowrap; position: relative; }




.bottom-header-bar { padding: .65rem .8rem; background: var(--fb-blue); border-radius: 2px; }
main > .bottom-header-bar { left: 50%; width: 100vw; transform: translateX(-50%); }

:root[data-theme="dark"] .search-form input { border-color: #93c5fd; background: #f8fafc; color: #1e293b; }
:root[data-theme="dark"] .snack-card:hover { border-color: #60a5fa; background: #1e293b; }
:root[data-theme="dark"] .welcome-container h1, :root[data-theme="dark"] .recently-added { color: #bfdbfe; }
:root[data-theme="dark"] .welcome-container p:last-child, :root[data-theme="dark"] .description, :root[data-theme="dark"] .bulletin p { color: #cbd5e1; }
:root[data-theme="dark"] .online-note { color: #cbd5e1; }
:root[data-theme="dark"] .sidebar-panel a { border-color: #334155; }

@media (max-width: 700px) {
  .forum-layout { grid-template-columns: 1fr; }
  .forum-sidebar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sidebar-panel { margin: 0; }
}

@media (max-width: 520px) {
  main { padding: 0 8px 1rem; }
  .search-form { margin-right: 0; }
  .header-logo a { font-size: 1.1rem; }
  .header-logo .logo { width: 42px !important; height: 38px !important; }
  .forum-nav { flex-wrap: wrap; gap: .55rem .9rem; }
  .online-note { margin-left: 0; }
  .section-heading { align-items: start; gap: .5rem; }
  .forum-sidebar { display: block; }
  .sidebar-panel { margin-bottom: 8px; }
  .snack-grid { grid-template-columns: minmax(0, 1fr); }
  .snack-card { min-height: 0; }
  .bottom-header-bar,
  .footer-links { flex-wrap: wrap; gap: .5rem; }
  .footer-links p { width: 100%; margin: .25rem 0 0; }
}

