/* make sure the page fills the viewport */
html, body {
    height: 100%;
    margin: 0;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
  }
  
  /* full-page background */
  body {
    background-color:#ffffff;
  }
  
  /* fixed left & right sidebars */
  .sidebar {
    position: fixed;
    top: 110px; bottom: 0;
    width: 200px;
    background-color:#008600;
    padding-top: 80px;
    box-sizing: border-box;
    z-index: 1000;
  }
  .sidebar.left  { left: 0; }
  
  /* vertical nav in left sidebar */
  .sidebar.left nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
  }
  /* make sidebar nav links look like buttons */
   .sidebar.left nav a {
       display: block;                  /* full-width blocks */
       background-color:#008600;       /* green */
       color: white;                    /* white text */
       padding: 0.6em 1em;              /* some breathing room */
       margin-bottom: 0.5em;            /* space between buttons */
       border-radius: 0.5em;            /* rounded corners */
       text-align: center;              /* center the label */
       text-decoration: none;           /* remove underline */
       font-weight: bold;
       transition: background-color .2s;
   }
    
   .sidebar.left nav a:hover {
       background-color:#008600;       /* lighter on hover */
   }
  
  /* fixed bottom bar */
  .bottom-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 60px;
    background-color:#008600;
    z-index: 1000;
  }
  
  /* scrolling content region */
  .content {
    margin: 150px 50px 60px 50px;   /* sides = sidebars; bottom = footer */
    padding: 20px;
    min-height: calc(100vh - 110px - 60px);
  }
  
  /* spanning header */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background-color: #008600;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* keep everything left-aligned */
    transition: top 0.1s ease;
    z-index: 1001;
    padding-left: 75px; /* spacing from left edge */
  }

  .header.hidden {
    top: -100px;
  }

  .header-logo-link {
    height: 70px;
    display: flex;
    align-items: center;
  }

  .header-logo {
    height: 100%;
    width: auto;
    display: block;
  }

  .header h1 {
    font-size: 1.8em;
    color: #ffffff;
    margin: 0 0 0 15px; /* space between logo and text */
    text-align: left;
  }

  .header-logo-link {
    position: absolute;
    left: 15px;
    height: 70px;
    display: block;
  }
  .header-logo {
    height: 100%;
    width: auto;
    display: block;
  }

  /* basic section text styling (all white here) */
  .section-text {
    color:#000000;
  }
  .section-text h2,
  .section-text h3,
  .section-text p {
    margin-bottom: .75em;
  }
  .section-text ul {
    margin-left: 1.5em;    /* indent */
    list-style: disc;
    color:#000000;           /* or whatever text color you’re using */
  }


  /* ─── Menu Bar ───────────────────────── */
  .menu-bar {
    position: fixed;
    top:    0;    /* pin to top when header is hidden */
    left:   0;
    right:  0;
    height: 50px;    /* whatever your menu height is */
    background:#3f3f3f;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1000;
  }
  .menu-bar.initial {
    top: 100px;
  }
  .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5em;
    align-items: center;
    height: 50px;
  }
  .menu > li {
    position: relative;
  }
  .menu a {
    color:#ffffff;
    text-decoration: none;
    font-weight: bold;
    line-height: 50px;
    display: block;
    padding: 0 0.5em;
  }
  
  /* Dropdown container hidden by default */
  .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background:#ffffff;
    list-style: none;
    margin: 0;
    padding: 0.5em 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2000;
  }
  .dropdown-menu li a {
    color:#000000;
    padding: 0.5em 1em;
    white-space: nowrap;
  }
  .dropdown-menu li a:hover {
    background:#9c9c9cff;
  }
  
  /* Show dropdown on hover */
  .dropdown:hover .dropdown-menu {
    display: block;
  }

  /* Flashcard visual area */
  .flashcard-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    perspective: 1000px;
  }

  .flashcard {
    width: 500px;
    min-height: 300px; /* start at 300px, can grow */
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
    perspective: 1000px;
  }

  /* Shared front/back styles */
  .flashcard .front,
  .flashcard .back {
    position: absolute;
    width: 100%;
    min-height: 300px;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-size: clamp(1em, 2vw, 1.3em); /* auto scales text */
    border: 2px solid #004d00;
    box-sizing: border-box;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
  }

  /* White front side */
  .flashcard .front {
    background-color: #ffffff;
    color: #333;
  }

  /* Green back side */
  .flashcard .back {
    background-color: #008600;
    color: #fff;
    transform: rotateY(180deg);
  }

  /* Flip animation */
  .flashcard.flipped {
    transform: rotateY(180deg);
  }

  /* If the text is really long, reduce size further dynamically */
  .flashcard .front.long-text,
  .flashcard .back.long-text {
    font-size: 0.9em;
  }

  /* Card generator styling */
  .flashcard-generator {
    background: #f9f9f9;
    padding: 20px;
    margin: 200px auto;
    border-radius: 10px;
    max-width: 700px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
  }

  .card-creator input {
    margin: 5px;
    padding: 10px;
    width: 40%;
  }

  .card-creator button, .deck-actions button {
    padding: 10px 20px;
    margin: 5px;
    background-color: #008600;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }

  .deck-actions {
    margin-top: 15px;
  }

  .deck-list ul {
    list-style-type: none;
    padding: 0;
  }

  .deck-list li {
    background: #e6ffe6;
    margin: 5px 0;
    padding: 8px;
    border-radius: 6px;
  }


  .nav-btn {
    background: #008600;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    cursor: pointer;
    transition: background 0.3s;
    margin: 0 10px;
  }

  .nav-btn:hover {
    background: #00a000;
  }

  .flashcard-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    perspective: 1000px;
  }

