/* -----------------------------------
   SETTINGS BUTTON
----------------------------------- */
.settings-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.settings-btn:hover {
  background: rgba(0,0,0,0.08);
}

.dark-mode .settings-btn:hover {
  background: rgba(255,255,255,0.1);
}

.gear-icon {
  font-size: 24px;
  line-height: 1;
}

/* -----------------------------------
   SETTINGS MODAL CARD
   (uses .auth-overlay from auth.css
   for the backdrop — same pattern)
----------------------------------- */
.settings-menu {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  width: min(92vw, 400px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
}

.auth-overlay.visible .settings-menu {
  transform: translateY(0) scale(1);
  opacity: 1;
}

body.dark-mode .settings-menu {
  background: #1a1a2e;
  color: #eee;
}

.settings-menu h3 {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
}

/* -----------------------------------
   TOGGLE ROW (DARK MODE SWITCH)
----------------------------------- */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  background: #ccc;
  border-radius: 22px;
  top: 0; left: 0; right: 0; bottom: 0;
  transition: 0.3s;
}

.slider:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: #3b124f;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* -----------------------------------
   HELP MODAL
----------------------------------- */
.help-button {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

body.dark-mode .help-button {
  color: var(--text-color, #f2f2f2);
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg, #fff);
  color: var(--text-color, #000);
  padding: 24px;
  border-radius: 12px;
  width: min(90%, 420px);
  z-index: 2000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* -----------------------------------
   HISTORY BUTTON
----------------------------------- */
.history-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.history-btn:hover {
  background: rgba(0,0,0,0.08);
}

.dark-mode .history-btn:hover {
  background: rgba(255,255,255,0.1);
}

.history-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  color: #222;
}

body.dark-mode .history-icon {
  color: #f2f2f2;
}

/* -----------------------------------
   HAMBURGER BUTTON
----------------------------------- */
.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #222;
  border-radius: 2px;
  transition: background 0.2s;
}

body.dark-mode .hamburger-btn span {
  background: #eee;
}

/* -----------------------------------
   MENU OVERLAY
----------------------------------- */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.menu-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* -----------------------------------
   MENU PANEL (drops down from subheader)
   Top offset = header (~120px) + subheader bar (8px)
----------------------------------- */
.menu-panel {
  position: absolute;
  top: 128px;
  left: 0;
  right: 0;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 0 0 16px 16px;
  padding: 12px 0 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

.menu-overlay.visible .menu-panel {
  transform: translateY(0);
}

body.dark-mode .menu-panel {
  background: #1a1a2e;
  color: #eee;
}

/* -----------------------------------
   MENU PANEL HEADER
----------------------------------- */
.menu-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 8px;
}

body.dark-mode .menu-panel-header {
  border-bottom-color: #333;
}

.menu-panel-title {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.menu-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.menu-close:hover {
  color: #333;
}

body.dark-mode .menu-close:hover {
  color: #eee;
}

/* -----------------------------------
   MENU NAV ROWS
----------------------------------- */
.menu-nav {
  display: flex;
  flex-direction: column;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: inherit;
  transition: background 0.15s;
}

.menu-row:hover {
  background: rgba(0,0,0,0.04);
}

body.dark-mode .menu-row:hover {
  background: rgba(255,255,255,0.06);
}

.menu-row-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.menu-row-label {
  flex: 1;
}

.menu-row-arrow {
  font-size: 20px;
  opacity: 0.3;
  font-weight: 300;
}

/* -----------------------------------
   MENU PANEL — MOBILE OFFSET
   Smaller header on mobile (~80px) + subheader (8px)
----------------------------------- */
@media (max-width: 480px) {
  .menu-panel {
    top: 88px;
  }
}
