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

:root {
  --bg-color: #f5f5f7;
  --card-bg: rgba(255, 255, 255, 0.65);
  --text-color: #222;
  --border-color: #ddd;
  --accent: #8a60ff;
  --page-padding: 20px;
}

body.dark {
  --bg-color: #0f0f11;
  --card-bg: rgba(25, 25, 30, 0.6);
  --text-color: #eaeaea;
  --border-color: #333;
  --accent: #b38bff;
}

/* ============================================================
   GLOBAL STYLES
============================================================ */

body {
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  padding: var(--page-padding);
  padding-bottom: 60px !important; /* for footer */
  overflow-x: hidden;
}

/* ============================================================
   FLOATING BACKGROUND BLOBS
============================================================ */

.blob {
  position: fixed;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #8a60ff80, #8a60ff20, transparent);
  filter: blur(70px);
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}

.blob1 {
  top: -120px;
  left: -120px;
}
.blob2 {
  bottom: -150px;
  right: -150px;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -30px) scale(1.15);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* ============================================================
   STICKY NAVBAR (FULL WIDTH)
============================================================ */

.navbar-wrapper {
  width: 100vw;
  margin-left: calc(-1 * var(--page-padding));
  margin-right: calc(-1 * var(--page-padding));
  position: sticky;
  top: 0;
  z-index: 9999;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark .navbar {
  background: rgba(20, 20, 20, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-left {
  font-size: 20px;
  font-weight: 700;
}

.nav-right {
  display: flex;
  gap: 10px;
}

.navbar button {
  padding: 10px 16px;
  font-size: 15px;
  border-radius: 10px;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: 0.25s;
}

.navbar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px #0003;
}

/* Mobile navbar */
@media (max-width: 600px) {
  .navbar {
    padding: 16px 14px;
  }
  .nav-left {
    font-size: 18px;
  }
  .navbar button {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 12px;
  }
}

/* ============================================================
   SEARCH BAR
============================================================ */

.search-input {
  width: 96%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin: 18px 0;
  background: #fff;
  font-size: 15px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ============================================================
   QUESTION CARDS
============================================================ */

.question-card {
  padding: 20px;
  margin-bottom: 16px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(14px);
  transition: 0.3s ease;
}

.question-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px #0004;
}

.question-card strong {
  font-size: 16px;
}
.question-card p {
  margin: 10px 0;
  line-height: 1.5;
}
.question-card small {
  opacity: 0.7;
}

/* Mobile */
@media (max-width: 600px) {
  .question-card strong {
    font-size: 18px;
  }
  .question-card p {
    font-size: 15px;
  }
  .question-card small {
    font-size: 14px;
  }
}

/* ============================================================
   FILTER MODAL (OLED STYLE)
============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 0;
  z-index: 99999;
  overflow-y: auto;
  backdrop-filter: blur(8px);
}

.hidden {
  display: none !important;
}

.modal-content {
  width: 92%;
  max-width: 520px;
  background: #000;
  color: #fff;
  padding: 26px;
  border-radius: 18px;
  border: 1px solid #333;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-size: 22px;
}
.close-btn {
  background: none;
  border: none;
  font-size: 26px;
  color: #ccc;
  cursor: pointer;
}

/* ============================================================
   CHIP UI
============================================================ */

section {
  margin: 22px 0;
}
section h3 {
  margin-bottom: 10px;
  font-size: 17px;
}

.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #666;
  color: #eee;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}

.chip:hover {
  border-color: #fff;
}
.chip.selected {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.chip-container.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Mobile chips */
@media (max-width: 600px) {
  .chip {
    padding: 12px 18px;
    font-size: 16px;
    border-radius: 22px;
  }
  section h3 {
    font-size: 18px;
  }
}

/* ============================================================
   MODAL DROPDOWNS
============================================================ */

select {
  width: 100%;
  padding: 14px;
  background: #111;
  border: 1px solid #444;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
}

/* ============================================================
   MODAL FOOTER BUTTONS
============================================================ */

.modal-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.reset-btn,
.apply-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
}

.reset-btn {
  background: #222;
  border: 1px solid #555;
  color: #bbb;
}
.apply-btn {
  background: #fff;
  color: #000;
  font-weight: 700;
}

@media (max-width: 600px) {
  .modal-footer button {
    padding: 16px !important;
    font-size: 18px !important;
    border-radius: 14px !important;
    width: 48%;
    height: 52px !important;
  }
}

/* ============================================================
   SLIM STICKY FOOTER (THREE-ITEM)
============================================================ */

.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 38px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 18px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);

  font-size: 12.5px;
  color: #444;

  z-index: 999999;
}

body.dark .sticky-footer {
  background: rgba(20, 20, 20, 0.4);
  color: #ccc;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sticky-footer div {
  flex: 1;
  display: flex;
}
.footer-left {
  justify-content: flex-start;
}
.footer-center {
  justify-content: center;
}
.footer-right {
  justify-content: flex-end;
}

.footer-right a {
  color: inherit;
  text-decoration: none;
}
.footer-right a:hover {
  text-decoration: underline;
}
.question-card p {
  white-space: pre-line;
}
