@import "components-extra.css";

/* ============================================================
   QUIZZING SOCIETY — COMPONENT STYLES
   Pill navbar, buttons, cards, ticker, capsule shapes, borderless
   ============================================================ */

/* ────────────────────────────────────────────
   NAVBAR & PILLNAV SWITCHER
   ──────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: transparent;
  z-index: var(--z-sticky);
  transition: all var(--duration-normal) var(--ease-out);
}

.navbar.is-scrolled,
body.subpage .navbar {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.navbar-logo {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text);
  letter-spacing: var(--ls-tight);
}

.navbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* PillNav Layout inside Navbar */
.pill-nav {
  --nav-h: 40px;
  --pill-pad-x: 16px;
  --pill-gap: 2px;
  --pill-text: var(--nav-pill-text);
  --hover-bg: var(--nav-hover-bg);
  display: flex;
  align-items: center;
  height: var(--nav-h);
}

.pill-nav-items {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  background: transparent;
  border-radius: 9999px;
}

.pill-list {
  list-style: none;
  display: flex;
  align-items: stretch;
  gap: var(--pill-gap);
  margin: 0;
  padding: 3px;
  height: 100%;
}

.pill-list > li {
  display: flex;
  height: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 var(--pill-pad-x);
  background: transparent;
  color: var(--pill-text);
  text-decoration: none;
  border-radius: 9999px;
  box-sizing: border-box;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
  outline: none;
}

.pill .hover-circle {
  position: absolute;
  left: 50%;
  bottom: 0;
  border-radius: 50%;
  background: var(--hover-bg);
  z-index: 1;
  display: block;
  pointer-events: none;
  will-change: transform;
}

.pill .label-stack {
  position: relative;
  display: inline-block;
  line-height: 1;
  z-index: 2;
}

.pill .pill-label {
  position: relative;
  z-index: 2;
  display: inline-block;
  line-height: 1;
  will-change: transform;
}

.pill .pill-label-hover {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--nav-hover-text);
  z-index: 3;
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
}

.pill.is-active,
.pill.active {
  background: transparent !important;
  box-shadow: none !important;
}

.pill.is-active .pill-label,
.pill.is-active .pill-label-hover,
.pill.active .pill-label,
.pill.active .pill-label-hover {
  color: #38bdf8 !important; /* Sky blue */
}

/* Navbar Actions */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  color: var(--text);
  transition: all var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  background: var(--primary-surface);
  color: var(--primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }

[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  transition: all 0.3s ease;
  border-radius: 2px;
}

@media (max-width: 900px) {
  .navbar-inner {
    padding: 0 var(--space-4);
    grid-template-columns: auto 1fr auto;
  }

  .pill-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all var(--duration-normal) var(--ease-out);
    border-bottom: 1px solid var(--glass-border);
    padding: var(--space-4) 0;
  }

  .pill-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .pill-nav-items {
    width: 100%;
    height: auto;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .pill-list {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: var(--space-2);
    padding: 0 var(--space-4);
  }

  .pill-list > li {
    width: 100%;
  }

  .pill {
    width: 100%;
    height: 44px;
    justify-content: center;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 480px) {
  .navbar-logo span {
    font-size: var(--fs-base);
  }
  .navbar-logo img {
    width: 28px;
    height: 28px;
  }
  .navbar-inner {
    padding: 0 var(--space-3);
  }
  .navbar-actions {
    gap: var(--space-2);
  }
}


/* ────────────────────────────────────────────
   BUTTONS (Capsule / Pill shaped)
   ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
  background: var(--primary-surface);
  color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--text-on-primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary-border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--primary-surface);
  border-color: var(--primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--fs-base);
}

/* ── Ripple Effect ── */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

