/* =========================
   Base Styles (Light Mode)
========================= */
body {
  background: linear-gradient(135deg, oklch(0.85 0.05 250), oklch(0.95 0.05 250));
  color: #000; /* black text in light mode */
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  transition: background 0.4s ease, color 0.4s ease;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =========================
   Navbar
========================= */
#navbar {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  color: #000;
  padding: 1.5rem 2rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  border-radius: 0 0 15px 15px;
  min-height: 90px;
}

#navbar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.75rem;
}

#menu-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  color: #000;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: none;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 40px;
}

#menu-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.05);
}

#site-logo {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#navbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.3;
}

/* =========================
   Layout
========================= */
main.layout {
  flex: 1;
  display: flex;
  max-width: 1400px;
  width: calc(100% - 2rem);
  margin: 1rem auto;
  position: relative;
  gap: 1rem; /* gap between sidebar and content */
}

#sidebar-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.1);
  backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
  z-index: 98;
}

body.sidebar-active #sidebar-overlay {
  opacity: 1;
  backdrop-filter: blur(5px);
  pointer-events: auto;
}

/* =========================
   Sidebar
========================= */

aside#sidebar {
  position: fixed;
  top: 0; 
  left: 0;
  height: 100%;
  width: 280px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  padding: 1.5rem;
  box-shadow: 4px 0 30px rgba(0,0,0,0.2);
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
  z-index: 49;
  color: #000;
  border-radius: 15px;
  margin-right: 1rem;
}

body.sidebar-active aside#sidebar { transform: translateX(0); }

aside#sidebar h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.3);
  padding-bottom: 0.8rem;
  margin-bottom: 1.5rem;
}

aside#sidebar ul { list-style: none; padding: 0; margin: 0; }
aside#sidebar ul li { margin-bottom: 0.8rem; }

aside#sidebar ul li a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-radius: 12px;
  transition: background 0.3s ease, transform 0.2s ease-out;
}

aside#sidebar ul li a:hover {
  background: rgba(255,255,255,0.4);
  transform: translateX(5px);
}

aside#sidebar ul li a.active {
  background: rgba(255,255,255,0.6);
  font-weight: 700;
}

/* =========================
   Content
========================= */
section.content {
  flex: 1;
  padding: 2rem;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  transition: all 0.5s ease;
  color: #000;
}

section.content h1 { 
  font-size: 2.2rem; 
  font-weight: 700; 
  margin-bottom: 1.5rem; 
}

section.content p { 
  line-height: 1.8; 
  margin-bottom: 1rem; 
}

/* =========================
   Footer
========================= */
#footer {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
  text-align: center;
  padding: 1.5rem;
  margin-top: auto;
  border-radius: 15px 15px 0 0;
  color: #000;
}

/* =========================
   Inputs & Buttons
========================= */
input{
  background: #333333;
  color: #000;
}

select {
  background: hsla(180, 100%, 50%, 0.2);
  color: #000;
}

input[type="radio"] {
  accent-color: hsla(180, 100%, 50%, 0.2); 
  outline: 2px solid #4B5320;              
}

button {
  background: hsla(180, 100%, 50%, 0.2);
  border: none;
  border-radius: 5px;
  box-shadow: 2px 2px 2px black;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  color: #000;
}

button:hover {
  transform: scale(1.05);
}

/* =========================
   Responsive
========================= */
@media(max-width: 748px){
  #current, #target{
    width: 80px;
    height: 20px;
  }
  aside#sidebar{
     z-index: 99;
  }
  #navbar{
     z-index: 50;
  }
}

@media (max-width: 768px) {
  #navbar { flex-direction: column; align-items: flex-start; }
  #navbar-content { flex-direction: row; justify-content: flex-start; }
  #menu-btn { display: flex; margin-right: 0.5rem; }
  main.layout { flex-direction: column; gap: 0; }
  aside#sidebar {
    position: fixed;
    margin-right: 0;
    border-radius: 0 15px 15px 0; 
  }
}

@media (min-width: 769px) {
  #navbar-content { justify-content: center; }
  main.layout { flex-direction: row; }
  aside#sidebar { position: relative; transform: translateX(0); box-shadow: none; }
  body.sidebar-active #sidebar-overlay { opacity: 0; pointer-events: none; }
}

/* =========================
   Dark Mode
========================= */
body.dark-mode {
  background: #1e1e2e;
  color: #f5f5f5;
}

body.dark-mode section.content,
body.dark-mode #navbar,
body.dark-mode #footer,
body.dark-mode aside#sidebar {
  background: rgba(40, 40, 55, 0.9);
  color: #f5f5f5;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

body.dark-mode aside#sidebar h2 {
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

body.dark-mode aside#sidebar ul li a {
  color: #f5f5f5;
}

body.dark-mode aside#sidebar ul li a:hover {
  background: rgba(255,255,255,0.15);
}

body.dark-mode aside#sidebar ul li a.active {
  background: rgba(255,255,255,0.25);
}

body.dark-mode a {
  color: #ddd;
}

body.dark-mode input {
  background: #555;
  color: #f5f5f5;
}

body.dark-mode select {
  background: hsla(180, 100%, 50%, 0.2);
  color: #f5f5f5;
}

body.dark-mode button {
  background: hsla(180, 100%, 50%, 0.2);
  color: #f5f5f5;
     }
