@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* =========================
   CSS VARIABLES
   ========================= */
:root {
  /* Backgrounds */
  --bg-body: #f3f4f6;
  --bg-primary: #ffffff;

  /* Text */
  --text-primary: #0e1420;
  --text-secondary: #374151;
  --text-muted: #666c78;
  --text-inverse: #ffffff;
  --always-white: #f3f4f6;

  /* Accent */
  --accent-primary: #4f46e5;
  --accent-secondary: #4338ca;

  /* Borders & shadows */
  --border-light: #e5e7eb;
  --navbar-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --card-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);

  /* Navbar */
  --navbar-bg: #ffffff;
  --navbar-text: #111827;

  /* Status Colors */
  --status-open: #d23c2b;
  /* Red */
  --status-pending: #f39c12;
  /* Orange */
  --status-resolved: #27ae60;
  /* Green */
  --status-default: #708d90;
}

.dark {
  --bg-body: #0b0f19;
  --bg-primary: #111827;

  --text-primary: #e5e7eb;
  --text-secondary: #ced7fb;
  --text-muted: #9ca3af;
  --text-inverse: #020617;

  --accent-primary: #818cf8;
  --accent-secondary: #6366f1;

  --border-light: #1f2937;
  --navbar-bg: #0b0f19;
  --navbar-text: #e5e7eb;
  --navbar-shadow: 0 10px 28px rgba(0, 0, 0, 0.85);
  --card-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

html {
  scroll-behavior: smooth;
}

/* =========================
   GLOBAL RESET
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", system-ui, sans-serif;
}

body {
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
}

/* =========================
   NAVBAR
   ========================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px;
  background: var(--navbar-bg);
  box-shadow: var(--navbar-shadow);
  z-index: 1000;
}

/* Logo */
.navbar a {
  list-style: none;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--navbar-text);
}

.navbar a span {
  color: var(--accent-secondary);
}

/* Navigation links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a,
.nav-links button {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  color: var(--navbar-text);
}

/* Hover underline */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.7s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* =========================
   ACCOUNT DROPDOWN
   ========================= */

.account-menu {
  position: relative;
}

.account-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

/* Glassmorphic dropdown */
.account-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  min-width: 180px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2000;
}

.account-menu:hover .account-dropdown,
.account-dropdown.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.account-dropdown a {
  padding: 12px 14px;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 10px;
}

.account-dropdown .logout {
  color: var(--status-open);
  font-weight: 500;
}

.dark .account-dropdown {
  background: rgba(15, 23, 42, 0.6);
  /* dark glass */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =========================
THEME TOGGLE (SVG ICONS)
========================= */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.theme-toggle:hover {
  transform: rotate(12deg) scale(1.05);
}

.dark .theme-toggle:hover {
  transform: rotate(-12deg) scale(1.05);
}

/* Icons */
.theme-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sun-icon {
  opacity: 0;
}

.moon-icon {
  opacity: 1;
}

.dark .sun-icon {
  opacity: 1;
}

.dark .moon-icon {
  opacity: 0;
}

.share-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-secondary);
}

/* =========================
PAGE CONTAINER
========================= */
.container {
  padding: 110px 4px 4px;
  min-height: 100vh;
  background: var(--bg-body);
}

/* =========================
   TOASTS
   ========================= */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2000;
}

.toast {
  min-width: 260px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-primary);
  box-shadow: var(--card-shadow);
  font-size: 0.9rem;
}

.toast.success {
  border-left: 4px solid var(--status-resolved);
}

.toast.error {
  border-left: 4px solid var(--status-open);
}

.vote-btn.voted {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.status-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.status-pending {
  background: var(--bg-body);
  color: var(--status-open);
}

.status-acknowledged {
  background: var(--bg-body);
  color: var(--status-pending);
}

.status-resolved {
  background: var(--bg-body);
  color: var(--status-resolved);
}

.admin-status-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

.verified-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--status-resolved);
  background: rgba(34, 197, 94, 0.15);
  padding: 4px 10px;
  border-radius: 999px;
}

.priority-badge {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 12px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

/* Footer */
.civic-footer {
  background-color: var(--bg-primary);
  /* Deep Navy/Black */
  padding: 60px 20px 20px 20px;
  margin-top: 50px;
  width: 100%;
  border-top-right-radius: 30%;
}

.footer-container {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  gap: 50px;
}

.footer-logo {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.footer-logo span {
  color: var(--accent-secondary);
  /* Brand Blue */
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer-links h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

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

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

/* SOCIAL & BOTTOM */
.social-icons {
  display: flex;
  align-items: top;
  margin-top: 20px;
  gap: 25px;
}

.social-icons a img {
  display: flex;
  text-decoration: none;
  filter: grayscale(1);
  transition: filter 0.2s;
}

.social-icons a img:hover {
  filter: grayscale(0);
}

.footer-bottom {
  margin: 50px auto 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--text-muted);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Mobile Menu Styling */
.menu-toggle {
  display: none;
  /* Hidden by default on desktop */
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle .bar {
  height: 2px;
  width: 25px;
  background-color: #333;
  /* Use your existing text color variable here */
  margin: 3px 0;
  transition: 0.3s;
}

/* Base Layout */
.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  padding: 40px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  flex: 2;
  /* Gives the brand description more space */
  min-width: 250px;
}

.footer-links {
  flex: 1;
  min-width: 150px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 60%;
    padding: 10px;
    border-bottom-left-radius: 20px;
    background-color: inherit;
    box-shadow: var(--card-shadow);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links li {
    text-align: center;
  }
  .account-dropdown {
    position: static;
    box-shadow: none;
  }
  .footer-container {
    flex-direction: column;
    /* Stack sections vertically */
    text-align: center;
    /* Center text for mobile aesthetics */
    align-items: center;
  }
  .footer-brand {
    margin-bottom: 20px;
  }
  .social-icons {
    justify-content: center;
    gap: 25px;
  }
  .footer-links ul {
    padding: 0;
    list-style: none;
  }
}