/* ======================
   THEME VARIABLES
   ====================== */

:root {
  --bg: #0f0f0f;
  --panel: #161616;
  --card: #1e1e1e;
  --text: #ffffff;
  --muted: #9ca3af;
  --accent: #3b82f6;
}

body.light {
  --bg: #f5f6fa;
  --panel: #ffffff;
  --card: #f0f0f0;
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
}

/* ======================
   GLOBAL RESET
   ====================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* ======================
   SIDEBAR
   ====================== */

.sidebar {
  width: 230px;
  background: var(--panel);
  padding: 20px;
}

.logo {
  color: #ff3b3b;
  font-weight: 800;
  margin-bottom: 20px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--card);
}

.sidebar h4 {
  margin: 16px 0 6px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider {
  border: none;
  height: 1px;
  background: var(--card);
  margin: 12px 0;
}

/* ======================
   MAIN AREA
   ====================== */

.main {
  flex: 1;
  padding: 20px;
  padding-bottom: 80px; /* ✅ prevents footer overlap */
}

/* ======================
   TOP BAR
   ====================== */

.topbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.topbar input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: none;
  background: var(--card);
  color: var(--text);
}

.topbar button {
  background: var(--card);
  border: none;
  padding: 10px 14px;
  border-radius: 20px;
  cursor: pointer;
  color: var(--text);
}

.signin {
  border: 1px solid var(--accent);
}

/* ======================
   CONTENT SECTIONS
   ====================== */

.content {
  display: none;
}

.content.active {
  display: block;
}

/* ======================
   GRID & CARDS
   ====================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-bottom: 60px; /* ✅ footer spacing */
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 12px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  min-height: 320px;
  justify-content: space-between;

  transition: transform 0.15s ease;
}

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

.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.card h3 {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ======================
   LIKE BUTTON
   ====================== */

.like-btn {
  margin-top: 6px;
  align-self: center;

  background: transparent;
  border: 1px solid #2a2a2a;
  color: #d1d5db;

  border-radius: 18px;
  padding: 6px 12px;
  font-size: 13px;

  cursor: pointer;

  display: flex;
  align-items: center;
  gap: 6px;

  transition: all 0.2s ease;
}

.like-btn i {
  font-size: 14px;
}

/* Hover */
.like-btn:hover {
  background: #1f2937;
  color: #ffffff;
  border-color: #3b82f6;
}

/* Liked state */
.like-btn.liked {
  color: #3b82f6;
  border-color: #3b82f6;
}

.like-btn.liked i {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #3b82f6;
}

/* ======================
   LEGAL / SUPPORT PAGES
   ====================== */

.legal-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  line-height: 1.7;
}

.legal-container h1 {
  font-size: 32px;
  margin-bottom: 20px;
}

.legal-container h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 18px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  position: relative;
  padding-bottom: 12px;
}

.legal-container h2::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 10px;
  background: linear-gradient(
    to right,
    var(--card),
    var(--card),
    transparent
  );
  opacity: 0.8;
}

.legal-container p,
.legal-container li {
  color: var(--muted);
  margin-bottom: 14px;
  font-size: 15px;
}

/* ======================
   FOOTER
   ====================== */

.site-footer {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--card);
  color: var(--muted);
  font-size: 14px;
  clear: both;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}
