/* Utility: Remove bottom margin for first converter-container to avoid double spacing */
.mb-0 { margin-bottom: 0 !important; }
/* Professional SaaS hero title style */
.hero-title {
  color: #f8fafc;
  font-size: 2.1rem;
  font-weight: 700;
  font-family: 'Segoe UI', 'Inter', 'Roboto', Arial, sans-serif;
  text-align: center;
  margin: 0 auto 0 auto;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.08);
  max-width: 900px;
  padding: 0 0 0 0;
  box-sizing: border-box;
}
/* Utility class for white text */
.text-white { color: #fff !important; }
/* Transliterator intro paragraph */
.translit-intro {
  max-width: 900px;
  margin: 12px auto 24px;
  color: #ffffff;
  text-align: center;
}
/* Terms page styles moved from terms.html */
body.terms-page {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-dark);
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  flex-direction: column;
}
.terms-container {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 48px auto 32px auto;
  padding: 40px 32px 32px 32px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1em;
}
.terms-container h2 {
  color: var(--secondary);
  font-size: 1.3rem;
  margin-bottom: 0.5em;
}
.terms-container h3 {
  color: var(--secondary);
  font-size: 1.08em;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-weight: 700;
}
.terms-container p {
  color: var(--text-light);
  margin-bottom: 1.2em;
  font-size: 1em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (max-width: 600px) {
  .nav-menu {
    gap: 10px;
  }
  .nav-link {
    font-size: 0.98em;
    padding: 7px 10px;
  }
  .terms-container {
    padding: 18px 6px 18px 6px;
    margin: 24px 4px 16px 4px;
  }
}
/* Privacy page styles moved from privacy.html */
body.privacy-page {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-dark);
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  flex-direction: column;
}
.privacy-container {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 48px auto 32px auto;
  padding: 40px 32px 32px 32px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1em;
}
.privacy-container h2 {
  color: var(--secondary);
  font-size: 1.3rem;
  margin-bottom: 0.5em;
}
.privacy-container h3 {
  color: var(--secondary);
  font-size: 1.08em;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-weight: 700;
}
.privacy-container p {
  color: var(--text-light);
  margin-bottom: 1.2em;
  font-size: 1em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (max-width: 600px) {
  .nav-menu {
    gap: 10px;
  }
  .nav-link {
    font-size: 0.98em;
    padding: 7px 10px;
  }
  .privacy-container {
    padding: 18px 6px 18px 6px;
    margin: 24px 4px 16px 4px;
  }
}
/* How to Use page styles moved from how-to-use.html */
body.howto-page {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-dark);
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  flex-direction: column;
}
.howto-container {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 48px auto 32px auto;
  padding: 40px 32px 32px 32px;
}
header {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 0;
}
header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5em;
  letter-spacing: 0.5px;
}
section {
  margin-bottom: 2.2em;
}
h2 {
  color: var(--secondary);
  font-size: 1.3rem;
  margin-bottom: 0.5em;
}
ol, ul {
  margin-left: 1.2em;
  color: var(--text-light);
}
li {
  margin-bottom: 0.5em;
}
p {
  color: var(--text-light);
}
/* Nav dropdown styles */
.nav-item.dropdown { position: relative; display: flex; align-items: center; }
.nav-item .dropdown-toggle {
  color: var(--secondary);
  background: none;
  border: none;
  font-size: 1.08em;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-item .dropdown-toggle:hover, .nav-item .dropdown-toggle:focus {
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 2px 8px 0 rgba(163,176,135,0.08);
}
.nav-item .dropdown-toggle, .nav-link {
  line-height: 1;
  height: 44px;
  box-sizing: border-box;
  vertical-align: middle;
}
.nav-item .dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.12); border-radius: 8px; padding: 8px 10px; min-width: 220px; z-index: 1200; }
.nav-item .dropdown-menu .nav-link { display: block; padding: 8px 10px; color: #24381A; }
.nav-item .dropdown-menu .nav-link:hover { background: #F3F7EE; border-radius: 6px; }
@media (max-width: 720px) {
  .nav-item .dropdown-menu { position: static; box-shadow: none; padding: 6px 0; }
}
footer.footer {
  text-align: center;
  margin: 32px 0 0 0;
  padding: 18px 0 0 0;
  color: var(--white);
}
.back-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--secondary);
  text-decoration: underline;
}
@media (max-width: 600px) {
  .nav-menu {
    gap: 10px;
  }
  .nav-link {
    font-size: 0.98em;
    padding: 7px 10px;
  }
  .howto-container {
    padding: 18px 6px 18px 6px;
    margin: 24px 4px 16px 4px;
  }
  header h1 {
    font-size: 1.3rem;
  }
}
/* About Us page styles moved from about-us.html */
.howto-container {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 48px auto 32px auto;
  padding: 40px 32px 32px 32px;
}
header {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 0;
}
header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5em;
  letter-spacing: 0.5px;
}
section {
  margin-bottom: 2.2em;
  text-align: left;
}
h2 {
  color: var(--secondary);
  font-size: 1.3rem;
  margin-bottom: 0.5em;
}
ol, ul {
  margin-left: 1.2em;
  color: var(--text-light);
}
li {
  margin-bottom: 0.5em;
}
p {
  color: var(--text-light);
}
footer.footer {
  text-align: center;
  margin: 32px 0 0 0;
  padding: 18px 0 0 0;
  color: var(--white);
}
@media (max-width: 600px) {
  .howto-container {
    padding: 18px 6px 18px 6px;
    margin: 24px 4px 16px 4px;
  }
  header h1 {
    font-size: 1.3rem;
  }
}
/* Utility and layout classes for index.html */
.spacer-4 { height: 4px; }
.hero-main { margin: 0; padding: 0; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.no-margin { margin: 0; }
.input-header-row { display: flex; justify-content: space-between; align-items: center; }
.btn-clear-input {
  display: inline-flex; /* visible by default; converter.js will hide when empty via inline style */
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--secondary);
  font-size: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-left: auto;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.copy-btn-row { display: flex; justify-content: center; margin-top: -8px; margin-bottom: 0; padding-top: 0; }
.copy-btn { padding: 10px 22px; font-size: 14px; }
.settings-info-link { margin-top: 18px; margin-bottom: 16px; color: #333; font-size: 1rem; }
.section-padding-20 { padding:20px; }
.mb-8 { margin-bottom:8px; }
.text-light { color:var(--text-light); }
.mb-12 { margin-bottom:12px; }
.section-padding-30 { padding:24px; }

.section-padding-30 p { margin-bottom: 12px; color: var(--text-light); }
.secondary-color { color:var(--secondary); }
.font-13 { font-size:1.3rem; }
.font-108 { font-size:1.08em; }
.ml-12 { margin-left:1.2em; }
.mb-18 { margin-bottom:18px; }
.social-row { display:flex; justify-content:center; gap:32px; flex-wrap:wrap; }
.social-link { display:inline-flex; align-items:center; justify-content:center; background:var(--bg-light); border-radius:8px; padding:8px 28px; min-width:60px; transition:background 0.18s; }
.social-icon { width:32px; height:32px; filter:grayscale(1) brightness(0.7); }
.ml-10 { margin-left:10px; }
.font-600 { font-weight:600; }
.footer-row { margin-bottom:8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px; }
.footer-links { display: flex; align-items: center; gap: 12px; }
.mr-8 { margin-right:8px; }
.footer-social { display: flex; align-items: center; gap: 8px; }
.footer-follow { color:#fff; font-size:1.08em; margin-right:4px; }
.footer-social-link { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-light); border-radius: 8px; padding: 4px 14px; min-width: 36px; transition: background 0.18s; }
.footer-social-icon { width: 20px; height: 20px; filter: grayscale(1) brightness(0.7); }

/* Browser extension card styles moved from index.html */
.browser-grid {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  margin: 28px 0 18px 0;
}
.browser-card {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 260px;
  background: var(--bg-light);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(49,54,71,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 8px 0;
  margin: 0 0 0 0;
  transition: box-shadow 0.18s, transform 0.18s;
}
.browser-card:hover {
  box-shadow: 0 6px 18px rgba(49,54,71,0.13);
  transform: translateY(-2px) scale(1.03);
}
.browser-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--secondary);
  font-weight: 600;
  font-size: 1.08em;
  background: none;
  border: none;
  outline: none;
}
.browser-btn span {
  margin-top: 4px;
}
.browser-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
}
@media (max-width: 800px) {
  .browser-grid {
    flex-direction: column;
    gap: 16px;
  }
  .browser-card {
    max-width: 100%;
  }
}
/* # Footer and Navigation Styles moved from index.html */
.footer-link {
  color: #ffd966;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  font-size: 1.1rem !important;
  padding: 0 !important;
  margin-bottom: 0.2em !important;
}
.footer-link:hover {
  color: #fffbe7;
  text-decoration: underline;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-link {
  color: var(--secondary);
  background: none;
  border: none;
  font-size: 1.08em;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  letter-spacing: 0.2px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-link:hover, .nav-link:focus {
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 2px 8px 0 rgba(163,176,135,0.08);
  text-decoration: none;
}
.nav-btn {
  margin-left: 8px;
}

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  z-index: 1301;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav ── */
@media (max-width: 768px) {
  .navbar {
    position: sticky;
  }
  .navbar-content {
    position: relative;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    border-radius: 0 0 12px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    z-index: 1200;
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-menu > .nav-link,
  .nav-menu > .nav-item > .nav-link,
  .nav-menu > .nav-item > .dropdown-toggle {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    padding: 13px 24px;
    height: auto;
    border-radius: 0;
    border-bottom: 1px solid #f0ede6;
    font-size: 1em;
  }
  .nav-menu > .nav-link:last-child {
    border-bottom: none;
  }
  .nav-item.dropdown {
    flex-direction: column;
    align-items: stretch;
    position: static;
  }
  .nav-item .dropdown-menu {
    position: static !important;
    box-shadow: none;
    padding: 0 0 4px 0;
    width: 100%;
    background: #f7f5f0;
    border-radius: 0;
    min-width: unset;
  }
  .nav-item .dropdown-menu .nav-link {
    padding: 11px 24px 11px 36px;
    border-bottom: 1px solid #ece9e0;
    border-radius: 0;
    font-size: 0.97em;
    font-weight: 500;
  }
  .nav-item .dropdown-menu .nav-link:last-child {
    border-bottom: none;
  }
}

@media (max-width: 600px) {
  .nav-link {
    font-size: 0.98em;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #A3B087;
  --primary-dark: #8a9671;
  --primary-light: #f0f2eb;
  --secondary: #313647;
  --text-dark: #313647;
  --text-light: #5a6270;
  --border-color: #e8e6e1;
  --bg-light: #F9F8F6;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(49, 54, 71, 0.1);
  --shadow-md: 0 4px 12px rgba(49, 54, 71, 0.15);
  --shadow-lg: 0 10px 30px rgba(49, 54, 71, 0.2);
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #A3B087 0%, #313647 100%);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-buttons {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.nav-btn:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

/* Larger options icon in header */
#optionsBtn {
  font-size: 28px;
  padding: 6px 10px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 20px; /* reduced vertical padding to pull content up */
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertically center content */
  align-items: center;
  text-align: center;
  margin: -6px 0 0; /* keep previous tight offset */
  padding: 6px 0; /* slightly tighter vertical padding */
  min-height: 48px; /* reduced vertical footprint */
  color: white;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin: 0 0 0; /* no gap below title */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 18px;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Converter Container */
.converter-container {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 12px; /* tighten spacing between stacked containers */
  position: relative; /* allow absolutely positioned children like options button */
}

.converter-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px; /* reduced gap for denser layout */
  padding: 16px; /* tighter padding inside the white card */
  align-items: start;
}

.input-wrapper,
.output-wrapper {
  display: flex;
  flex-direction: column;
}

.section-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0; /* remove extra gap so label vertically centers with badge */
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  height: 40px; /* reduced baseline to shrink vertical rhythm */
  line-height: 40px; /* ensure the text vertically centers inside the label box */
}

/* Header row inside the output wrapper to align label and options button */
.output-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.options-in-output {
  background: linear-gradient(180deg, #fff8d6 0%, #fff0a8 100%);
  color: var(--secondary);
  border: 1px solid rgba(125, 95, 0, 0.12);
  padding: 6px 12px;
  font-size: 20px; /* slightly reduced to match smaller label */
  height: 40px; /* match label height for perfect centering */
  min-width: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(137, 109, 0, 0.12), var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  z-index: 4;
}

@media (max-width: 768px) {
  .options-in-output { font-size: 18px; height: 36px; min-width: 36px; padding: 6px 10px; }
}

.input-field {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  min-height: 200px;
  transition: all 0.3s ease;
  background: var(--bg-light);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(163, 176, 135, 0.1);
  background: var(--white);
}

.input-field::placeholder {
  color: var(--text-light);
}

.output-field {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 18px;
  line-height: 1.8;
  min-height: 200px;
  background: var(--bg-light);
  word-wrap: break-word;
  overflow-y: auto;
  transition: all 0.3s ease;
  resize: vertical;
  box-sizing: border-box;
}

/* Position the options button when placed inside a converter container */
.converter-container #optionsBtn {
  /* fallback for any button left in container; grid variant overrides below */
  position: absolute;
  top: 18px;
  right: 16px;
  background: var(--bg-light);
  color: var(--secondary);
  border: none;
  padding: 6px 10px;
  font-size: 16px;
  height: 36px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.converter-container #optionsBtn:hover { transform: translateY(-2px); }

/* When placed inside the converter grid, align to the top-right grid cell
   so it's exactly on the same horizontal baseline as the section labels. */
.converter-section .options-in-grid {
  /* float the badge into the converter's top-right corner so it fills
     the highlighted area */
  position: absolute; /* positioned relative to .converter-container */
  top: 8px;
  right: 12px;
  /* clear grid placement so layout remains stable */
  grid-column: auto;
  grid-row: auto;
  justify-self: auto;
  align-self: auto;
  margin-top: 0;
  background: linear-gradient(180deg, #fff8d6 0%, #fff0a8 100%);
  color: var(--secondary);
  border: 1px solid rgba(125, 95, 0, 0.12);
  padding: 0px;
  font-size: 22px; /* larger cog for visibility */
  height: 56px; /* larger square to match highlighted area */
  width: 56px;
  min-width: 56px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(137, 109, 0, 0.14), var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 8;
}

@media (max-width: 768px) {
  .converter-section .options-in-grid { align-self: start; margin-top: 6px; font-size: 18px; height: 36px; min-width: 36px; }
}

/* Keep input and output fields in sync when resizing */
#sampleInput, #sampleOutput {
  resize: vertical;
  min-height: 200px;
  box-sizing: border-box;
}

.output-field:not(:empty) {
  border-color: var(--primary);
  background: white;
}

.arrow-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
  margin: 20px 0;
}

/* Actions */
.actions {
  padding: 0 30px 30px 30px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Homepage search suggestions */
.search-suggest {
  margin-top: 10px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  position: absolute;
  z-index: 20;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px 0 rgba(44,56,0,0.10), 0 1.5px 0 #D6E2C6;
  min-width: 220px;
  width: 420px;
  max-width: 100vw;
  max-height: 220px;
  overflow-y: auto;
  border: 1.5px solid #D6E2C6;
  transition: box-shadow 0.18s;
  display: block;
}
}

.search-suggest-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #3A4A1F;
  opacity: 0.92;
}

.search-suggest-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.search-suggest-item {
  appearance: none;
  border: 1px solid rgba(122, 148, 74, 0.28);
  background: #F8FAF6;
  color: #3A4A1F;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.search-suggest-item:hover {
  transform: translateY(-1px);
  background: #F3F7EE;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.search-suggest-item:focus {
  outline: 3px solid rgba(163, 176, 135, 0.25);
  outline-offset: 3px;
}

/* Game card layout and smaller play button */
.game-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.game-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.95em;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #fff;
  background: linear-gradient(135deg, #A3B087 0%, #313647 100%);
  box-shadow: 0 6px 18px rgba(49,54,71,0.18);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  align-self: flex-end;
  margin-top: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.game-play-btn::before {
  content: '▶';
  display: inline-block;
  font-size: 0.9em;
  opacity: 0.95;
  transform: translateY(-1px);
}

.game-play-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 28px rgba(49,54,71,0.22);
}

.game-play-btn:focus {
  outline: 3px solid rgba(163,176,135,0.22);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .game-play-btn { padding: 8px 12px; font-size: 0.85em; }
}

/* Settings Panel */
.settings-panel {
  /* Match the converter card appearance for visual consistency */
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.settings-header {
  background: var(--bg-light);
  padding: 12px 16px; /* tighter padding to match converter card rhythm */
  border-bottom: 1px solid var(--border-color);
}

.settings-header h2,
.settings-header h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0;
}

.settings-content {
  padding: 16px 16px; /* match the inner spacing used in converter cards */
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 15px;
}

.checkbox-hint {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}

/* Footer */
.footer {
  background: var(--secondary);
  color: var(--white);
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

/* Logo image defaults */
.logo-img {
  width: 160px;
  height: auto;
  max-height: 160px;
  object-fit: contain;
}

/* Center the header title between logo and nav buttons */
.titleHed {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .converter-section {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
  }

  .arrow-divider {
    transform: rotate(90deg);
    margin: 10px 0;
    font-size: 20px;
  }

  .hero p {
    font-size: 15px;
  }

  .input-field,
  .output-field {
    min-height: 150px;
    font-size: 14px;
  }

  .main-content {
    padding: 20px 15px;
  }

  .navbar-content {
    padding: 0 15px;
  }

  .logo-img {
    height: 64px;
    width: auto;
    max-height: 64px;
    object-fit: contain;
}

  .titleHed {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

  .titleHed h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #A3B087, #313647);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 13px;
  }

  .input-field,
  .output-field {
    min-height: 120px;
    padding: 12px;
    font-size: 13px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 12px;
  }

  .converter-section,
  .settings-header,
  .settings-content {
    padding: 15px;
  }
}

/* Courses page styles */
.courses-main {
  padding: 48px;
  max-width: 1000px;
  margin: 0 auto;
}

.courses-section {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.courses-title {
  margin-top: 0;
  color: #3A4A1F;
  font-size: 1.75rem;
}

.courses-intro {
  background: #e8f5e9;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
}

.courses-intro p {
  color: #2e4a1e;
  margin: 0 0 12px;
  line-height: 1.7;
}

.courses-intro p:last-child {
  margin-bottom: 0;
}

.courses-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.course-card {
  flex: 1 1 300px;
  padding: 16px;
  border-radius: 12px;
}

.course-card--initiation {
  background: #f0f6ff;
}

.course-card--initiation h3 {
  margin: 0 0 8px;
  color: #007bff;
}

.course-card--initiation p {
  margin: 0 0 12px;
  color: #0056b3;
}

.course-card--initiation .btn {
  background: #007bff !important;
  color: #fff !important;
}

.course-card--beginner {
  background: #d4edda;
}

.course-card--beginner h3 {
  margin: 0 0 8px;
  color: #28a745;
}

.course-card--beginner p {
  margin: 0 0 12px;
  color: #155724;
}

.course-card--beginner .btn {
  background: #28a745 !important;
  color: #fff !important;
}

@media (max-width: 600px) {
  .courses-main {
    padding: 24px 16px;
  }
  
  .courses-section {
    padding: 20px;
  }
  
  .courses-title {
    font-size: 1.4rem;
  }
}
/* Support button (Buy Me a Coffee) — inline, non-floating, Mediavine-safe */
.support-btn-wrapper {
  text-align: center;
  padding: 24px 16px 8px;
}
.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFDD00;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.2s;
  white-space: nowrap;
}
.support-btn:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  color: #1a1a1a;
}
@media (max-width: 480px) {
  .support-btn {
    font-size: 0.85rem;
    padding: 10px 16px;
  }
}
