:root {
  --primary-color: #6A994E;
  --secondary-color: #fafafa;
  --text-color: #2c3e50;
  --bg-color: #fafafa;
  --accent-bg: #F8F7F4;
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body, html {
  height: 100%;
  width: 100%;
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow: hidden;
}

/* ==========================================================================
   NAVIGATION BAR & MAIN LAYOUT
   ========================================================================== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 73.55%, var(--accent-bg) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-weight: 700;
}

nav button:not(#menuToggle):not(.translator-btn):not(.auth-options li button) {
  background-color: var(--secondary-color);
  color: var(--text-color);
  border: none;
  padding: 12px 28px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

nav button:not(#menuToggle):not(.translator-btn):not(.auth-options li button):hover {
  transform: translateY(-4px);
  background-color: #faf7ec;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
 
}

/* Container for Left Controls (Hamburger + Translator) */
.nav-left-controls {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px; /* Fixed gap preventing overlap */
  z-index: 1200;
}

/* Container for Far-Right Controls (Profile & Language) */
.nav-right-controls {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1200;
}

/* ==========================================================================
   HAMBURGER & TRANSLATOR (LEFT SIDE)
   ========================================================================== */

#menuToggle {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  background: #faf7ec;
  border: none;
  font-size: 30px;
  color: #6A994E;
  cursor: pointer;
  padding: 10px;
  border-radius: 15px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

#menuToggle:hover {
  transform: scale(1.08) !important;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: #6A994E;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* Translator Button */
.translator-btn {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  background-color: #f1f3f5;
  color: #333;
  border: 1px solid #ccc;
  padding: 6px 0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.translator-btn:hover {
  background-color: #e2e6ea;
}

.translator-btn.active {
  background-color: #28a745;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* ==========================================================================
   SIDE MENU & OVERLAY
   ========================================================================== */

#sideMenu.open ~ nav #menuToggle .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}
#sideMenu.open ~ nav #menuToggle .hamburger span:nth-child(2) {
  opacity: 0;
}
#sideMenu.open ~ nav #menuToggle .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

#sideMenu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  backdrop-filter: blur(10px);
  padding-top: 90px;
  transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1050;
  box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#sideMenu::-webkit-scrollbar { display: none; }
#sideMenu.open { left: 0; }

#sideMenu ul { list-style: none; }
#sideMenu ul li { margin: 15px 20px; }
#sideMenu ul li a {
  display: block;
  color: #6A994E;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 14px 20px;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.3s ease;
}
#sideMenu ul li a:hover {
  background: #faf7ec;
  color: #4b6d38;
  transform: translateX(10px);
}

#sideMenu ul h3 {
  margin: 15px 20px;
  color: #faf7ec;
  font-size: 1.5rem;
  font-weight: 800;
  padding: 14px 20px;
}

#sideMenu ul h5 {
  text-align: center;
  padding: 1.5rem 0;
  color: #353535;
  font-size: 0.9rem;
  display: block;
  width: fit-content;
  margin: 0 auto;
}

#sideMenu ul h4 {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 0.5rem 0;
}

#sideMenu ul h4 a,
#sideMenu ul h4 button {
  all: unset;
  display: block;
  width: fit-content;
  margin: 0 auto;
  font-size: 0.9rem;
  font-weight: 500;
  color: #696868;
  text-decoration: underline;
  cursor: pointer;
}

#sideMenu ul h4 a:hover,
#sideMenu ul h4 button:hover {
  color: #1f1f1f;
}

#overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}
#overlay.active { opacity: 1; visibility: visible; }

iframe {
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100% - 70px);
  border: none;
  transition: all 0.35s ease;
}
iframe.menu-open {
  left: 280px;
  width: calc(100% - 280px);
}

/* ==========================================================================
   LANGUAGE SELECTOR (RIGHT SIDE)
   ========================================================================== */

.language-selector {
  position: relative;
}

.language-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 18px;
  background: white;
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 16px;
  cursor: pointer;
  min-width: 140px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
  transition: all 0.3s ease;
  user-select: none;
}

.language-display:hover {
  background: #f0f8ed;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(106,153,78,0.3);
}

.language-display svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  transition: transform 0.35s ease;
}

.language-options {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 160px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.language-selector.active .language-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.language-options li { list-style: none; }

.language-options li a {
  display: block;
  padding: 14px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s ease;
}

.language-options li a:hover {
  background: #f0f8ed;
  color: var(--primary-color);
  padding-left: 28px;
}

.language-selector.active .language-display svg {
  transform: rotate(180deg);
}

/* ==========================================================================
   AUTH / PROFILE SELECTOR (RIGHT SIDE)
   ========================================================================== */

.auth-selector {
  position: relative;
}

.auth-display {
  width: 46px;
  height: 46px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
  transition: all 0.3s ease;
  user-select: none;
}

.auth-display:hover {
  background: #faf7ec;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(106,153,78,0.3);
}

.auth-options {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 200px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.auth-options .open-account,
.auth-options .logout {
  border-radius: 12px !important;
  background-color: #f0f0f0 !important; /* Light background so you can see the corners */
}
.auth-selector.active .auth-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.auth-options li { list-style: none; }

.auth-options li a,
.auth-options li button {
  display: block;
  width: 100%;
  padding: 14px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s ease;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  

}

.auth-options li a:hover,
.auth-options li button:hover {
  background: #f0f8ed;
  color: var(--primary-color);
  padding-left: 28px;
  transform: scale(1.03);
}

.auth-options .auth-danger {
  color: #b42318;
}

.auth-options .auth-danger:hover {
  background: #fdecec;
  color: #b42318;
}

.auth-status {
  padding: 12px 20px 6px;
  font-size: 0.85rem;
  color: #667;
  border-bottom: 1px solid rgba(106, 153, 78, 0.12);
}

.auth-status strong {
  display: block;
  color: var(--text-color);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */

.auth-modal,
.status-modal,
.account-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(34, 46, 40, 0.45);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1300;
}

.status-modal { z-index: 1500; }
.account-modal { z-index: 1400; }
#deleteConfirmModal { z-index: 1600; }

.auth-modal.open,
.status-modal.open,
.account-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-panel,
.status-panel,
.account-panel {
  width: min(460px, 100%);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf4 100%);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  position: relative;
}

.status-panel {
  width: min(440px, 100%);
  text-align: center;
}

.account-panel {
  width: min(420px, 100%);
  background: #ffffff;
}

.auth-close,
.account-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: #eef5e7;
  color: #355126;
  font-size: 1.3rem;
  cursor: pointer;
}

.auth-panel h2 {
  font-size: 1.9rem;
  margin-bottom: 8px;
  color: #27401c;
}

.auth-subtitle {
  color: #607060;
  margin-bottom: 22px;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.auth-tab {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  background: #edf4e8;
  color: #4b5b48;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--primary-color);
  color: #fff;
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-field { margin-bottom: 16px; }

.auth-field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  color: #31462b;
}

.auth-field input {
  width: 100%;
  border: 1px solid #d7e5ce;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text-color);
  background: #fff;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(106, 153, 78, 0.14);
}

.auth-submit {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  background: var(--primary-color);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(106, 153, 78, 0.28);
}

/* Loader */
.auth-loader {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: rgba(165, 193, 179, 0.45);
  backdrop-filter: blur(10px);
  z-index: 2000;
  font-weight: 700;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.auth-loader.active { display: flex; }

.auth-loader-ring {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 4px solid rgba(44, 62, 80, 0.15);
  border-top-color: var(--primary-color);
  border-right-color: #2c3e50;
  animation: auth-loader-spin 0.9s linear infinite;
}

@keyframes auth-loader-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   RESPONSIVE LAYOUTS & MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1200px) {
  nav {
    justify-content: flex-start;
    padding-left: 20px;
    height: 70px;
  }

  nav > button:not(#menuToggle):not(.translator-btn) {
    display: none;
  }

  .nav-left-controls {
    left: 15px;
    gap: 10px;
  }

  .nav-right-controls {
    right: 15px;
    gap: 8px;
  }

  .mobile-main-nav {
    display: block;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(106, 153, 78, 0.25);
  }

  .mobile-main-nav li a {
    font-size: 1.15rem;
    font-weight: 600;
    color: #5a8c3e;
    padding: 16px 24px;
  }
}

@media (min-width: 1201px) {
  .mobile-main-nav { display: none; }
}

@media (max-width: 768px) {
  .nav-left-controls {
    left: 10px;
    gap: 8px;
  }

  .translator-btn {
    width: 95px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    height: 32px;
    font-size: 11px;
    border-radius: 16px;
  }

  .language-display {
    min-width: 105px;
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .auth-display {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .auth-panel { 
    padding: 24px 18px; 
    border-radius: 22px; 
  }
}

@media (max-width: 380px) {
  .translator-btn {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    font-size: 10px;
  }
}































 

.translation-popup {
  display: none; /* Controlled via JS (display: block) */
  position: absolute;
  z-index: 10000;
  width: 290px;
  background: #ffffff;
  border: 1px solid #2bb12b;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 14px 16px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: popupFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Area Inside Popup */
.translation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f2f5;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.translation-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #4a5568;
}

/* Translation Result Box */
.translation-body {
  font-size: 15px;
  line-height: 1.5;
  color: #1a202c;
  word-wrap: break-word;
  min-height: 28px;
  font-weight: 400;
}

/* ==========================================
   POPUP LANGUAGE SELECTOR (MATCHES INDEX NAVBAR)
   ========================================== */

.custom-select {
  position: relative;
  user-select: none;
}

/* Selected Button Toggle */
.select-selected {
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #2d3748;
  transition: all 0.2s ease;
}

.select-selected:hover {
  background-color: #edf2f7;
  border-color: #cbd5e0;
  color: #1a202c;
}

.select-arrow {
  font-size: 10px;
  color: #718096;
  transition: transform 0.2s ease;
}

.custom-select.active .select-arrow {
  transform: rotate(180deg);
}

/* Language Dropdown Menu */
.select-items {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 6px 0;
  margin: 0;
  z-index: 10001;
  min-width: 130px;
  overflow: hidden;
}

/* Individual Language Options */
.select-items li {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #2d3748;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.select-items li:hover {
  background-color: #31ce31; /* Primary site accent color */
  color: #ffffff;
}

/* Hide Utility Class */
.select-hide {
  display: none !important;
}

/* ==========================================
   NAVBAR TRANSLATOR BUTTON STATE
   ========================================== */

.translator-btn {
  transition: all 0.2s ease;
  border-radius: 20px;
  font-weight: 600;
}

.translator-btn.active {
  background-color: #2bb12b !important; /* Soft active green */
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(56, 161, 105, 0.3);
}
/* ==========================================
   MOBILE & TABLET FIXES FOR TRANSLATION POPUP
   ========================================== */

/* ==========================================
   MOBILE & TABLET TRANSLATION POPUP FIX
   ========================================== */

@media (max-width: 768px) {
  .translation-popup {
    /* Fixed positioning relative to the screen, not text selection */
    position: fixed !important;
    bottom: 24px !important;
    left: 50% !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    
    /* Responsive sizing */
    width: calc(100vw - 32px) !important;
    max-width: 340px !important;
    
    /* Ensure it floats over all mobile elements */
    z-index: 99999 !important;
  }

  .select-items {
    max-height: 200px;
    overflow-y: auto;
  }
}






























.auth-display {
      width: 46px;
      height: 46px;
      background: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 22px;
      box-shadow: 0 6px 15px rgba(0,0,0,0.12);
      transition: all 0.3s ease;
      user-select: none;
    }

    .auth-display:hover {
      background: #faf7ec;
      transform: translateY(-3px);
      box-shadow: 0 12px 25px rgba(106,153,78,0.3);
    }

    .auth-options {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      width: 200px;
      background: white;
      border-radius: 16px;
      box-shadow: 0 12px 30px rgba(0,0,0,0.2);
      overflow: hidden;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-12px);
      transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      pointer-events: none;
    }

    .auth-selector.active .auth-options {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
      pointer-events: all;
    }

    .auth-options li { list-style: none; }

    .auth-options li a {
      display: block;
      width: 100%;
      padding: 14px 20px;
      color: var(--text-color);
      text-decoration: none;
      font-weight: 500;
      transition: all 0.25s ease;
    }

  

    .auth-options .auth-danger {
      color: #b42318;
      transition: all 0.3s ease;
      
    }

    .auth-options .auth-danger:hover {
      background: #fdecec;
      color: #b42318;
      transform: scale(1.05);
    }

    .auth-status {
      padding: 12px 20px 6px;
      font-size: 0.85rem;
      color: #667;
      border-bottom: 1px solid rgba(106, 153, 78, 0.12);
    }

    .auth-status strong {
      display: block;
      color: var(--text-color);
      font-size: 0.95rem;
      margin-bottom: 4px;
    }

    .auth-modal {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: rgba(34, 46, 40, 0.45);
      backdrop-filter: blur(10px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.3s ease, visibility 0.3s ease;
      z-index: 1300;
    }

    .auth-modal.open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .auth-panel {
      width: min(460px, 100%);
      background: linear-gradient(180deg, #ffffff 0%, #f8fbf4 100%);
      border-radius: 26px;
      padding: 28px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
      position: relative;
    }

    .auth-loader {
      position: absolute;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 12px;
      background: rgba(255, 255, 255, 0.85);
      border-radius: 26px;
      z-index: 2;
      font-weight: 700;
      color: #2c3e50;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-size: 0.85rem;
    }

    .auth-loader.active {
      display: flex;
    }

    .auth-loader-ring {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: 4px solid rgba(44, 62, 80, 0.15);
      border-top-color: var(--primary-color);
      border-right-color: #2c3e50;
      animation: auth-loader-spin 0.9s linear infinite;
      box-shadow: 0 0 12px rgba(106, 153, 78, 0.25);
    }

    .auth-loader-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--primary-color);
      box-shadow: 0 0 12px rgba(106, 153, 78, 0.35);
      animation: auth-loader-pulse 1s ease-in-out infinite;
    }

    @keyframes auth-loader-spin {
      to { transform: rotate(360deg); }
    }

    @keyframes auth-loader-pulse {
      0%, 100% { transform: scale(0.85); opacity: 0.6; }
      50% { transform: scale(1.2); opacity: 1; }
    }

    .auth-close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: none;
      background: #eef5e7;
      color: #355126;
      font-size: 1.3rem;
      cursor: pointer;
    }

    .auth-panel h2 {
      font-size: 1.9rem;
      margin-bottom: 8px;
      color: #27401c;
    }

    .auth-subtitle {
      color: #607060;
      margin-bottom: 22px;
      line-height: 1.5;
    }

    .auth-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 22px;
    }

    .auth-tab {
      border: none;
      border-radius: 14px;
      padding: 12px 16px;
      background: #edf4e8;
      color: #4b5b48;
      font-weight: 700;
      cursor: pointer;
    }

    .auth-tab.active {
      background: var(--primary-color);
      color: #fff;
    }

    .auth-form { display: none; }
    .auth-form.active { display: block; }

    .auth-field { margin-bottom: 16px; }

    .auth-field label {
      display: block;
      margin-bottom: 7px;
      font-weight: 600;
      color: #31462b;
    }

    .auth-field input {
      width: 100%;
      border: 1px solid #d7e5ce;
      border-radius: 14px;
      padding: 13px 14px;
      font: inherit;
      color: var(--text-color);
      background: #fff;
    }

    .auth-field input:focus {
      outline: none;
      border-color: var(--primary-color);
      box-shadow: 0 0 0 4px rgba(106, 153, 78, 0.14);
    }

    .auth-submit {
      width: 100%;
      border: none;
      border-radius: 16px;
      padding: 14px 18px;
      background: var(--primary-color);
      color: #fff;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 12px 25px rgba(106, 153, 78, 0.28);
    }

    .auth-note,
    .auth-message {
      margin-top: 14px;
      font-size: 0.95rem;
      line-height: 1.5;
    }

    .auth-message {
      min-height: 24px;
      font-weight: 600;
    }

    .auth-message.error { color: #b42318; }
    .auth-message.success { color: #1f7a32; }

    .terms-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .terms-row input[type="checkbox"] {
      margin: 0;
      width: 16px;
      height: 16px;
      flex: 0 0 16px;
      outline: none;
      box-shadow: none;
    }

    .terms-row input[type="checkbox"]:focus,
    .terms-row input[type="checkbox"]:focus-visible {
      outline: none;
      box-shadow: 0 0 0 3px rgba(248, 251, 244, 0.95);
      border-radius: 3px;
    }

    .terms-row input[type="checkbox"]::-moz-focus-inner {
      border: 0;
    }

    .terms-row input[type="checkbox"]::-moz-focus-outer {
      border: 0;
    }

    

    .status-modal {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: rgba(34, 46, 40, 0.45);
      backdrop-filter: blur(10px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.3s ease, visibility 0.3s ease;
      z-index: 1500;
    }

    .status-modal.open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .status-panel {
      width: min(440px, 100%);
      background: linear-gradient(180deg, #ffffff 0%, #f8fbf4 100%);
      border-radius: 26px;
      padding: 26px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
      position: relative;
      text-align: center;
    }

    .status-panel h3 {
      font-size: 1.6rem;
      margin-bottom: 10px;
      color: #27401c;
    }

    .status-panel p {
      color: #607060;
      line-height: 1.5;
      margin-bottom: 18px;
    }

    .status-actions {
      display: grid;
      gap: 10px;
    }

    .status-actions a,
    .status-actions button {
      width: 100%;
      border: none;
      border-radius: 16px;
      padding: 12px 16px;
      background: var(--primary-color);
      color: #fff;
      font-weight: 700;
      text-decoration: none;
      cursor: pointer;
      box-shadow: 0 12px 25px rgba(106, 153, 78, 0.28);
      display: inline-block;
    }

    .status-actions .secondary {
      background: #edf4e8;
      color: #355126;
      box-shadow: none;
    }

    .confirm-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 18px;
    }

    .confirm-actions button {
      border: none;
      border-radius: 14px;
      padding: 12px 16px;
      font-weight: 700;
      cursor: pointer;
    }

    .confirm-cancel {
      background: #edf4e8;
      color: #355126;
      transition: all 0.3s ease;
    }
    .confirm-cancel:hover {
      background: #edf4e8;
      color: #355126;
      transform: scale(1.05)
    }

    .confirm-danger {
      background: #fdecec;
      color: #b42318;
      transition: all 0.3s ease;
    }
    .confirm-danger:hover {
      background: #fdecec;
      color: #b42318;
      transform: scale(1.05)
    }

    .auth-link {
      margin-top: 12px;
      border: none;
      background: none;
      color: #355126;
      font-weight: 600;
      cursor: pointer;
      text-decoration: underline;
    }

    .auth-link:hover {
      color: #1f7a32;
    }
    .account-modal {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0,0,0,0.45);
      backdrop-filter: blur(8px);
      opacity: 0;
      visibility: hidden;
      transition: 0.3s;
      z-index: 1400;
    }

    #deleteConfirmModal {
      z-index: 1600;
    }

    .account-modal.open {
      opacity: 1;
      visibility: visible;
    }

    .account-panel {
      width: min(420px, 100%);
      background: white;
      border-radius: 24px;
      padding: 28px;
      box-shadow: 0 25px 70px rgba(0,0,0,0.25);
      position: relative;
    }

    .account-close {
      position: absolute;
      top: 12px;
      right: 12px;
      border: none;
      background: #f1f1f1;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      cursor: pointer;
    }

    .account-info { margin: 20px 0; line-height: 1.7; }

    .account-update-actions {
      margin: 10px 0 18px;
      display: grid;
      gap: 10px;
    }

    .account-update-actions button {
      width: 100%;
      padding: 12px;
      border-radius: 12px;
      border: none;
      font-weight: 700;
      cursor: pointer;
      background: #edf4e8;
      color: #355126;
      transition: all 0.5s ease;
    }

    .account-update-actions button:hover {
      background: #e4efe0;
      transform: scale(1.03);
    }

    .account-form {
      background: #f7faf3;
      border-radius: 16px;
      padding: 14px;
      border: 1px solid #e2ecd8;
    }

    .account-form h3 {
      margin-bottom: 10px;
      font-size: 1.05rem;
      color: #355126;
    }

    .account-form label {
      display: block;
      font-weight: 600;
      margin-bottom: 6px;
      color: #31462b;
    }

    .account-form input {
      width: 100%;
      border: 1px solid #d7e5ce;
      border-radius: 12px;
      padding: 10px 12px;
      font: inherit;
      background: #fff;
    }

    .account-form button {
      margin-top: 10px;
      width: 100%;
      border: none;
      border-radius: 12px;
      padding: 11px 14px;
      background: var(--primary-color);
      color: #fff;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 10px 20px rgba(106, 153, 78, 0.22);
    }

    .account-message {
      min-height: 20px;
      margin-top: 8px;
      font-weight: 600;
      font-size: 0.92rem;
    }

    .account-message.error { color: #b42318; }
    .account-message.success { color: #1f7a32; }

    .account-actions button {
      width: 100%;
      margin-top: 10px;
      padding: 12px;
      border-radius: 12px;
      border: none;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    .account-actions button:hover {
    background: #e4e4e4;
    transform: scale(1.05)
    }

    .account-actions .danger {
      background: #fdecec;
      color: #b42318;
      transition: all 0.3s ease;
    }
    .account-actions .danger:hover{
      background: #fdecec;
      color: #b42318;
      transform: scale(1.05);
    }
















    .add-vocabulary-btn {
    width: 100%;
    margin-top: 12px;
    padding: 9px 12px;
    border: none;
    border-radius: 6px;
    background: #6A994E;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.add-vocabulary-btn:hover {
    background: #58813f;
}

.add-vocabulary-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.vocabulary-message {
    margin-top: 7px;
    font-size: 12px;
    text-align: center;
}

.vocabulary-message.success {
    color: #2D6A4F;
}

.vocabulary-message.error {
    color: #c0392b;
}











.vocabulary-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.vocabulary-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.vocabulary-modal-panel {
    width: min(750px, 100%);
    max-height: 80vh;
    overflow-y: auto;

    background: #fff;
    border-radius: 12px;
    padding: 22px;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);

    transform: translateY(15px) scale(0.96);
    opacity: 0;

    transition:
        transform 0.3s ease,
        opacity 0.25s ease;
}

.vocabulary-modal.active .vocabulary-modal-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.vocabulary-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.vocabulary-panel-header h3 {
    margin: 0;
    color: #2c3e50;
}

.vocabulary-close {
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 2px 7px;
}

.vocabulary-close:hover {
    color: #2c3e50;
}

.vocabulary-loading,
.vocabulary-empty,
.vocabulary-error {
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

.vocabulary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vocabulary-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.vocabulary-word {
    color: #2c3e50;
}

.vocabulary-translation {
    color: #555;
}

.vocabulary-language {
    font-size: 12px;
    color: #777;
    white-space: nowrap;
}

.delete-vocabulary-btn {
    border: none;
    border-radius: 5px;
    padding: 7px 10px;
    background: #c0392b;
    color: white;
    cursor: pointer;
}

.delete-vocabulary-btn:hover {
    background: #a93226;
}

.delete-vocabulary-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

@media (max-width: 600px) {

    .vocabulary-modal {
        padding: 12px;
    }

    .vocabulary-modal-panel {
        max-height: 85vh;
        padding: 16px;
    }

    .vocabulary-item {
        grid-template-columns: 1fr 1fr;
    }

    .vocabulary-language {
        grid-column: 1;
    }

    .delete-vocabulary-btn {
        grid-column: 2;
    }
}







.account-vocabulary-actions {
      margin: 10px 0 18px;
      display: grid;
      gap: 10px;
    }

    .account-vocabulary-actions button {
      width: 100%;
      padding: 12px;
      border-radius: 12px;
      border: none;
      font-weight: 700;
      cursor: pointer;
      background: #fff6dd;
      color: #2c3e50;
      border: 1px solid #ffc107;
      transition: all 0.3s ease;
    }

    .account-vocabulary-actions button:hover {
      color:#2c3e50;
      background: #ffc107;
      transform: scale(1.03);
    }
    
#sideMenuVocabularyContainer ul li { margin: 15px 20px; }
#sideMenuVocabularyContainer ul li a {
  display: block;
  color: #2c3e50;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 14px 20px;
  border-radius: 12px;
  background: #fff6dd;
  transition: all 0.3s ease;
  border: 1px solid #ffc107;
  font-weight: 900;

}
#sideMenuVocabularyContainer ul li a:hover {
  background: #ffc107;
  color: #2c3e50;
  transform: translateX(10px);
}