/* ========================================== */
/* FULLSCREEN ENFORCER STYLES                 */
/* ========================================== */

#fullscreen-enforcer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.98);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-family: sans-serif;
}

.enforcer-box {
  background: #1e293b;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  max-width: 400px;
  width: 90%;
}

.enforcer-box h2 { 
  margin-top: 0; 
  color: #f8fafc;
}

.enforcer-box p {
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 25px;
}

.enforcer-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  margin: 8px;
  font-weight: bold;
  transition: background 0.3s;
  width: 100%;
  max-width: 200px;
}

.enforcer-btn:hover { 
  background: #2563eb; 
}

/* --- CSS VARIABLES (LIGHT & DARK MODE) --- */
:root {
  /* Theme Dependent Variables */
  --primary: #98BACE;
  --primary-dark: #799EBA;
  --bg-main: #f4f6f9;
  --bg-card: #ffffff;
  --bg-light: #e5eef9;
  --text-main: #334155;
  --text-light: #64748b;
  --text-heading: #111827;
  --border-color: #e2e8f0;
  --badge-bg: #e0f2fe;
  --sidebar-width: 260px;
  --nav-height: 64px;

  /* Permanent Dark Theme Variables (Navbar & Hero) */
  --nav-bg: #1e293b;
  /* Lighter dark for Navbar */
  --hero-bg: #1e293b;
  /* Deeper dark for Hero section */
  --nav-border: #334155;
  --nav-text: #f8fafc;
  --nav-text-muted: #94a3b8;
  --nav-input-bg: rgba(255, 255, 255, 0.08);
  /* Colorful backgrounds that never change */
  --jss1-bg: #d5e0ee;
  /* */
  --jss2-bg: #FFF4A3;
  /* Pastel Yellow */
  --jss3-bg: #d4f5da;
  /* Pastel Blue */
  --sss1-bg: #f5d3cb;
  --sss2-bg: #ccd1f7;
  --sss3-bg: #fad8f5;

  /* Button colors */
  --btn-yellow: #FFF4A3;
  --btn-dark: #282A35;
  --btn-pink: #FFC0C7;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --primary: #98BACE;
  --primary-dark: #b5d0df;
  --bg-main: #0b1120;
  /* Deepest background for body */
  --bg-card: #1e293b;
  --bg-light: #1e293b;
  --text-main: #e2e8f0;
  --text-light: #94a3b8;
  --text-heading: #f8fafc;
  --border-color: #334155;
  --badge-bg: #0ea5e9;
}

@font-face {
  font-family: Poppins;
  src:url(/Poppins/Poppins-Regular.ttf);
}

@font-face {
  font-family: Montserrat;
  src:url(/Montserrat.ttf);
}

@font-face {
  font-family: Poppins-Black;
  src:url(/Poppins/Poppins-Black.ttf);
}

@font-face {
  font-family: Poppins-ExtraBold;
  src:url(/Poppins/Poppins-ExtraBold.ttf);
}

@font-face {
  font-family: Poppins-Bold;
  src:url(/Poppins/Poppins-Bold.ttf);
}

html, body {
  overscroll-behavior: none;
}

/* --- RESET & BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 1px;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  /* Prevent text selection */
  -webkit-user-select: none;
  /* Safari */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* IE10+/Edge */
  user-select: none;
  /* Standard */
}
input, textarea, select {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Prevents background scrolling when mobile sidebar is open */
body.no-scroll {
  overflow: hidden;
}
html:has(body.no-scroll){
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}
button, select {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* --- NAVBAR (PERMANENTLY DARK) --- */
.navbar {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  position: fixed;
  width: 100%;
  top: 0;
  height: var(--nav-height);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-btn {
  font-size: 28px;
  background: none;
  color: var(--nav-text);
  display: block;
}

.brand {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  color: var(--nav-text);
  letter-spacing: -0.5px;
}

.brand img {
  height: 32px;
  width: 32px;
  object-fit: contain;
}

.nav-links {
  display: none;
  gap: 5px;
  font-weight: 600;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 4px;
  transition: 0.2s;
  color: var(--nav-text-muted);
}
.nav-links a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--nav-text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.full-logo {
  display: flex;
  justify-content: left;
  align-items: center;
  width: 150px;
  gap: 0;
  overflow: hidden;
}
.full-logo img {
  width: 150px!important;
  object-fit: unset;
}

@media screen and (max-width: 763px) {
  .flex-mobile {
    display: flex;
  }
  .block-mobile {
    display: block;
  }
  .none-mobile {
    display: none;
  }
}

/* Navbar Inputs */
.search-input {
  background: var(--nav-input-bg);
  color: var(--nav-text);
  border: 1px solid var(--nav-border);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  outline: none;
  transition: 0.3s;
}
.search-input:focus {
  border-color: var(--primary);
}

.custom-theme-dropdown {
  position: relative;
  display: inline-block;
}

.theme-btn {
  background: var(--nav-input-bg);
  color: var(--nav-text);
  border: 1px solid var(--nav-border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  /* Sleek circular button */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: 0.3s;
}

.theme-btn:hover, .theme-btn:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.15);
}

.theme-menu {
  position: absolute;
  top: 130%;
  right: 0;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  display: none;
  /* Hidden by default */
  flex-direction: column;
  overflow: hidden;
  min-width: 130px;
  z-index: 100;
}

.theme-menu.show {
  display: flex;
  /* Shown when toggled */
}

.theme-option {
  background: transparent;
  color: var(--nav-text);
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-option.active {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.search-input {
  display: none;
}

.search-input::placeholder {
  color: #dcdcdc;
}
.search-input:focus {
  width: 200px;
}



/* --- LAYOUT WRAPPER --- */
.app-container {
  display: flex;
  margin-top: 0:
  min-height: calc(100vh - var(--nav-height));
}

/* --- SIDEBAR --- */
.sidebar {
  background: var(--bg-light);
  width: var(--sidebar-width);
  position: fixed;
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  transform: translateX(-100%);
  transition: transform 0.3s ease, background-color 0.3s, border-color 0.3s;
  z-index: 40;
  padding: 20px;
}

.sidebar.open {
  transform: translateX(0);
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

/* Sidebar Navigation Core */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav > li {
  margin-bottom: 5px;
}
.sidebar-nav > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: 0.2s;
  color: var(--text-main);
}

.sidebar-nav > li > a.active {
  background: var(--primary);
  color: white;
}

.sidebar-nav > li > a:hover {
   backdrop-filter: blur(5px);
  background-color: #dcdcdc55;
}

/* Sidebar Dropdown Logic */
.submenu-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.submenu-toggle:hover {
  background: var(--border-color);
}


.chevron {
  width: 18px;
  height: 18px;
  display: inline-block;

  /* 1. Set the background to the current text color */
  background-color: currentColor;

  /* 2. Use the SVG to "mask" or cut out the shape from the background */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M297.4 470.6C309.9 483.1 330.2 483.1 342.7 470.6L534.7 278.6C547.2 266.1 547.2 245.8 534.7 233.3C522.2 220.8 501.9 220.8 489.4 233.3L320 402.7L150.6 233.4C138.1 220.9 117.8 220.9 105.3 233.4C92.8 245.9 92.8 266.2 105.3 278.7L297.3 470.7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M297.4 470.6C309.9 483.1 330.2 483.1 342.7 470.6L534.7 278.6C547.2 266.1 547.2 245.8 534.7 233.3C522.2 220.8 501.9 220.8 489.4 233.3L320 402.7L150.6 233.4C138.1 220.9 117.8 220.9 105.3 233.4C92.8 245.9 92.8 266.2 105.3 278.7L297.3 470.7z'/%3E%3C/svg%3E");

  /* 3. Apply the sizing and positioning rules to the mask */
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  font-size: 10px;
  transition: transform 0.3s ease;
  margin-top: -5px;
}

.submenu-toggle.active .chevron {
  transform: rotate(180deg);
}

/* Submenu Hidden by Default */
.sidebar-submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: 20px;
  /* Indent the sub-items */
}
.sidebar-submenu li {
  margin: 2px 0;
}
.sidebar-submenu li a {
  display: block;
  padding: 8px 15px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-light);
  border-radius: 6px;
  transition: 0.2s;
}
.sidebar-submenu li a:hover {
  background: rgba(152, 186, 206, 0.1);
}
.sidebar-submenu li a.view-all-link {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
  margin-top: 5px;
  margin-bottom: 10px;
}


.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 30;
  display: none;
}
.overlay.show {
  display: block;
}

/* --- MAIN CONTENT --- */
.main-content {
  flex: 1;
  width: 100%;
  transition: margin-left 0.3s;
}

/* Hero Section with Wave */
.hero {
  background: var(--hero-bg);
  color: var(--nav-text);
  text-align: center;
  position: relative;
  padding: 80px 20px 140px 20px;
  /* Extra bottom padding for wave */
}
.hero h1 {
  font-size: 2.4rem;
  text-align: center;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  font-family: Poppins-Bold;
}
.hero h1 span {
  color: var(--primary);
}
.hero p {
  font-size: 1.1rem;
  color: var(--nav-text-muted);
  max-w: 600px;
  margin: 0 auto 30px auto;
}

.hero-search {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  z-index: 10;
  /* Keep above wave */
}
.hero-search input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  font-size: 16px;
  outline: none;
  background: white;
  color: #111;
}
.hero-search button {
  background: var(--primary);
  color: white;
  padding: 0 30px;
  font-weight: bold;
  font-size: 16px;
  transition: 0.2s;
}
.hero-search button:hover {
  background: var(--primary-dark);
}

/* The SVG Wave */
.hero-wave {
  position: absolute;
  top: -3rem;
  left: 0;
  width: 100%;
  line-height: 0;
  /* Prevents tiny gaps */
}
.hero-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* --- CLASS SECTIONS (STATIC COLORS FOR ALL THEMES) --- */

/* Notice we DO NOT put these in the [data-theme="dark"] block! */

.subject-section {
  padding: 80px 20px 100px 20px;
  text-align: center;
  display: flex;
  justify-content: center;
  /* Force text to be dark so it is always readable on bright backgrounds */
  color: #111827;
}

.bg-jss1 {
  background-color: var(--jss1-bg);
}
.bg-jss2 {
  background-color: var(--jss2-bg);
}
.bg-jss3 {
  background-color: var(--jss3-bg);
}
.bg-sss1 {
  background-color: var(--sss1-bg);
}
.bg-sss2 {
  background-color: var(--sss2-bg);
}
.bg-sss3 {
  background-color: var(--sss3-bg);
}

.subject-content {
  width: 100%;
  max-width: 600px;
}

.subject-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -2px;
  font-family: Poppins-Black;
}

.subject-title-small {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 1rem;
  font-family: Poppins-ExtraBold;
}

.subject-subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 40px;
}

.subject-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.pill-btn {
  display: inline-block;
  width: 100%;
  max-width: 220px;
  padding: 14px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: transform 0.2s, opacity 0.2s;
  /* Force text to be black inside the colored pill buttons */
  color: #000000;
}

.pill-btn:active {
  transform: scale(0.95);
}
.pill-btn:hover {
  opacity: 0.85;
}

/* Individual Button Colors */
.btn-primary {
  background-color: var(--primary);
  color: white;
  border: none;
}
.btn-yellow-pill {
  background-color: var(--btn-yellow);
  border: 1px solid #e5db93;
}
.btn-dark-pill {
  background-color: var(--btn-dark);
  color: white;
}
.btn-pink-pill {
  background-color: var(--btn-pink);
  border: 1px solid #e0a4aa;
}

@media (min-width: 768px) {
  .subject-title {
    font-size: 5.5rem;
  }
}


/* Interactive Section */
.interactive-wrapper {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}
.interactive-header h2 {
  font-size: 1.8rem;
  margin-bottom: 5px;
  color: var(--text-heading);
}
.interactive-header p {
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 30px;
}

.interactive-card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-top: 6px solid var(--primary);
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
  transition: background-color 0.3s;
}

.context-info .badge {
  background: var(--badge-bg);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
}
.context-info h3 {
  font-size: 1.8rem;
  margin: 15px 0;
  color: var(--text-heading);
}
.context-info p {
  margin-bottom: 25px;
  color: var(--text-light);
}
.context-info button {
  background: transparent;
  border: 2px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  color: var(--text-main);
  width: 100%;
  transition: 0.2s;
}
.context-info button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* The Sandbox / Canvas */
.sandbox {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}
.sandbox h4 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  color: var(--text-heading);
}
.pulse-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* --- TITRATION SIMULATOR CSS --- */
.simulation-container {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 15px;
}

.burette {
  width: 14px;
  height: 90px;
  position: absolute;
  top: 10px;
  border: 2px solid #94a3b8;
  border-top: none;
  border-radius: 0 0 4px 4px;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.burette-liquid {
  width: 100%;
  height: 100%;
  /* Will shrink */
  background: #bae6fd;
  /* Acid color (clear/light blue representation) */
  transition: height 0.1s linear;
}

.stopcock {
  width: 24px;
  height: 4px;
  background: #334155;
  position: absolute;
  top: 90px;
  border-radius: 2px;
}

.acid-drop {
  width: 4px;
  height: 12px;
  background: #bae6fd;
  position: absolute;
  top: 100px;
  border-radius: 5px;
  display: none;
  animation: dropFall 0.3s linear infinite;
}

@keyframes dropFall {
  0% {
    top: 100px;
    opacity: 1;
  }
  100% {
    top: 140px;
    opacity: 0;
  }
}

.beaker {
  width: 70px;
  height: 70px;
  position: absolute;
  bottom: 15px;
  border: 2px solid #94a3b8;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.beaker-liquid {
  width: 100%;
  height: 30%;
  /* Starts at 30% volume */
  background: #facc15;
  /* Methyl Orange in Base (Yellow) */
  border-radius: 0 0 5px 5px;
  transition: background-color 0.1s linear, height 0.1s linear;
}

.pour-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 15px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform 0.1s ease, background 0.2s;
  margin-bottom: 10px;
}

.pour-btn:hover {
  background: var(--primary-dark);
}

.titration-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
  font-weight: bold;
}

footer {
  background: var(--bg-light);
  text-align: center;
  padding: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 14px;
  margin-top: 40px;
  transition: background-color 0.3s;
}

.footer-logo {
  width: 150px;
  display: block;
  margin: auto;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }
  .nav-links {
    display: flex;
  }
  .search-input {
    display: block;
  }
  .sidebar {
    transform: translateX(0);
    z-index: 10;
  }
  .hero h1 {
    font-size: 4rem;
  }
  .hero-wave svg {
    height: 100px;
  }

  /* Taller wave on desktop */
  .interactive-card {
    grid-template-columns: 1fr 1fr;
  }
  .context-info button {
    width: auto;
  }
}
/* --- MOBILE SIDEBAR SCROLLBAR TWEAK --- */
@media (max-width: 767px) {
  .sidebar {
    /* Hides scrollbar for Firefox */
    scrollbar-width: none;
  }

  /* Hides scrollbar for Chrome, Safari, and Edge */
  .sidebar::-webkit-scrollbar {
    display: none;
  }
}
/* --- ENGLISH DRAG & DROP SIMULATOR CSS --- */
.dnd-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slots-container {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.letters-container {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 60px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  border: 1px dashed var(--border-color);
}

.letter-slot {
  width: 40px;
  height: 45px;
  border: 2px dashed #94a3b8;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.5);
}

.draggable-letter {
  width: 40px;
  height: 45px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: grab;
  user-select: none;
  /* Crucial for robust touch dragging on mobile OS */
  touch-action: none; 
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.1s, background-color 0.3s;
}

.draggable-letter:active {
  cursor: grabbing;
  transform: scale(1.1);
}

/* Success State for the Stressed Syllable */
.draggable-letter.stressed {
  background: #e11d48 !important; /* Red for stress */
  animation: pulse-red 1.5s infinite;
  z-index: 10;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(225, 29, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}
/* ========================================== */
/* NUKE ALL SCROLLBARS ON MOBILE              */
/* ========================================== */
@media (max-width: 768px) {
  /* 1. Kill native Webkit/Firefox scrollbars */
  ::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  * {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }

  /* 2. Kill the custom cursor.js DOM scrollbar */
  #pormaro-dom-track,
  #pormaro-dom-thumb {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
/* ========================================== */
/* ========================================== */
/* HERO SEARCH BAR (MOBILE BULLETPROOF)       */
/* ========================================== */
.hero-search {
  display: flex;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: white; /* Merges input and button seamlessly */
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  position: relative;
  overflow: visible; /* Lets the dropdown escape safely */
  z-index: 20;
}

.hero-search input {
  flex: 1;
  min-width: 0; /* CRITICAL: Stops mobile flex blowout */
  padding: 15px 20px;
  border: none;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: #111;
  border-radius: 8px 0 0 8px;
}

.hero-search button {
  background: var(--primary);
  color: white;
  padding: 0 25px;
  font-weight: bold;
  font-size: 16px;
  border: none;
  border-radius: 0 8px 8px 0;
  flex-shrink: 0; /* CRITICAL: Stops the button from getting squished or cut off */
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search button:hover {
  background: var(--primary-dark);
}



.hero-search .suggestions-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  text-align: left; /* Forces text to the left */
}

.hero-search .suggestions-box.show {
  display: flex;
}

.hero-search .suggestion-item {
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}

.hero-search .suggestion-item:last-child {
  border-bottom: none;
}

.hero-search .suggestion-item:hover {
  background: var(--bg-main);
}

.hero-search .sugg-title {
  color: var(--text-heading);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.hero-search .sugg-tag {
  display: inline-block;
  background: var(--bg-light);
  color: var(--text-light);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
/* ========================================== */
/* GLOBAL NAVBAR QUICK SEARCH                 */
/* ========================================== */
.nav-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Force the input to always show when the wrapper is visible */
.nav-search-wrapper .search-input {
  display: block !important; 
  width: 200px;
}

.nav-suggestions-box {
  position: absolute;
  top: 130%; /* Drops down just below the navbar */
  right: 0;
  width: 320px; /* Wider than the input for better reading */
  background: var(--nav-bg); /* Matches the dark navbar */
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}

.nav-suggestions-box.show {
  display: flex;
}

.nav-suggestions-box .suggestion-item {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--nav-border);
  transition: 0.2s;
  color: var(--nav-text);
}

.nav-suggestions-box .suggestion-item:last-child {
  border-bottom: none;
}

.nav-suggestions-box .suggestion-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-suggestions-box .sugg-title {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.nav-suggestions-box .sugg-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  color: var(--nav-text-muted);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
/* ========================================== */


