/* ======================================================
   COLOR VARIABLES
====================================================== */
:root {
  --yellow: #FFD400;
  --black: #000;
  --white: #fff;
}

/* ======================================================
   ROOT LAYOUT (STICKY FOOTER + SAFE AREA)
====================================================== */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--black);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* iOS safe areas */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ======================================================
   HEADER (STICKY + HAMBURGER + DARK TOGGLE)
====================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: var(--yellow);
  padding: 0.75rem 1rem;
}

.menu-btn,
.dark-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ======================================================
   MAIN CONTENT
====================================================== */
.app-container {
  flex: 1;
  padding: 1rem;

  /* Space for bottom nav */
  padding-bottom: 80px;
}

/* ======================================================
   FOOTER (STICKY BOTTOM ON SHORT PAGES)
====================================================== */
.app-footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 0.75rem;
  font-size: 0.9rem;
}

/* ======================================================
   CARD (GENERIC UI)
====================================================== */
.card {
  background: var(--white);
  border: 2px solid var(--black);
  padding: 1rem;
  max-width: 400px;
  margin: auto;
}

/* ======================================================
   SIDE MENU (DRAWER)
====================================================== */
.side-menu {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: var(--black);
  color: var(--white);
  z-index: 2001;

  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
}

.side-menu.open {
  left: 0;
}

/* Side menu header */
.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 1rem;
  background: #111;
  border-bottom: 1px solid #333;
}

.side-menu-title {
  font-weight: bold;
  color: var(--yellow);
}

.close-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Side menu links */
.side-menu a {
  padding: 1rem;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid #222;
}

.side-menu a:hover {
  background: #222;
}

/* ======================================================
   OVERLAY (LOCK BACKGROUND)
====================================================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ======================================================
   BOTTOM NAVIGATION (APP STYLE)
====================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  height: 60px;
  padding-bottom: env(safe-area-inset-bottom);

  background: var(--black);
  display: flex;
  justify-content: space-around;
  align-items: center;

  z-index: 1000;
}

.bottom-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.75rem;
  text-align: center;
}

.bottom-nav span {
  display: block;
  font-size: 0.7rem;
}

/* ======================================================
   DARK MODE (YELLOW / BLACK THEME)
====================================================== */
body.dark {
  background: #000;
  color: #fff;
}

body.dark .app-header {
  background: #000;
  color: var(--yellow);
}

body.dark .app-footer {
  background: #111;
}

body.dark .bottom-nav {
  background: #111;
}

body.dark .side-menu {
  background: #111;
}

body.dark .card {
  background: #111;
  border-color: var(--yellow);
}
/* ======================================================
   DARK MODE ICON VISIBILITY FIX
====================================================== */

/* Light mode (default) */
.menu-btn,
.dark-toggle {
  color: var(--black);
}

/* Dark mode */
body.dark .menu-btn,
body.dark .dark-toggle,
body.dark .close-btn {
  color: var(--white);
}

/* Active nav item */
.side-menu a.active,
.bottom-nav a.active {
  background: var(--yellow);
  color: var(--black);
  font-weight: bold;
}

.bottom-nav {
  transition: transform 0.25s ease;
}