:root {
  --primary-gradient-start: #e9fbe8;
  --primary-gradient-end: #dcf6e5;
  --primary-gradient: linear-gradient(135deg,
      var(--primary-gradient-start) 0%,
      var(--primary-gradient-end) 100%);

  --dynamic-gradient: linear-gradient(135deg, #20c997 0%, #8dc63f 100%);

  --text-heading: #000000;
  --text-on-dark: #ffffff;
  --background-main: #f7fcf7;
  --card-background: #ffffff;
  --text-secondary: #2c2c2c;
  --text-muted: #6c6c6c;
  --accent-lime: #8dc63f;
  --accent-yellow: #ffd700;
  --accent-teal: #20c997;
  --accent-pink: #e64980;
  --divider-borders: #e0e0e0;

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  --hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  --border-radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background-main);
  min-height: 100vh;
  color: var(--text-secondary);
}

/* Header */
.header {
  background: var(--primary-gradient);
  /* background: rgba(255, 255, 255, 0.85); */
  backdrop-filter: blur(12px);
  /* border-bottom: 1px solid var(--divider-borders); */
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  /* box-shadow: var(--card-shadow); */
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: var(--card-shadow);
  background: rgba(255, 255, 255, 0.85);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: #02541a;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo a {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #02541a;
  text-decoration: none;
}

.nav-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #223;
  padding: 0.2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-toggle:hover {
  background: rgba(32, 201, 151, 0.1);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-primary {
  background: var(--card-background);
  color: var(--accent-teal);
  border: 1px solid var(--accent-teal);
  padding: 0.75rem 1.5rem;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: var(--accent-teal);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(32, 201, 151, 0.3);
}

/* Sliding Navigation */
.side-nav {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  transition: left 0.3s ease;
  z-index: 1001;
  padding: 2rem 0;
  box-shadow: var(--card-shadow);
}

.side-nav.open {
  overflow-y: scroll;
  left: 0;
}

.side-nav-header {
  padding: 0 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-nav {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--accent-teal);
}

.nav-links {
  list-style: none;
}

.nav-links li {
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 1rem 2rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.nav-links a:hover {
  background: rgba(32, 201, 151, 0.1);
  border-left-color: var(--accent-teal);
}

.nav-links a.active {
  background: rgba(32, 201, 151, 0.15);
  border-left-color: var(--accent-teal);
  color: var(--accent-teal);
  font-weight: 600;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(32, 201, 151, 0.15);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Main Content */
.main-content {
  /* margin-top: 20px; */
  /* padding: 15px; */
  /* max-width: 1320px; */
  margin-left: auto;
  margin-right: auto;
}

.hero-section {
  text-align: center;
  padding: 30px;
  background: var(--card-background);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
}

.hero-section h1 {
  font-size: 2rem;
  font-weight: 800;
  background: #222;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 10px;
}

.hero-section p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-secondary);
  padding: 10px;
}

.main-part {
  margin: 0 auto;
  max-width: 1320px;
  padding: 10px;
}

/* Input Section */
.input-section {
  background: var(--card-background);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  margin-top: -3rem;
  position: relative;
}

.input-container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  margin-bottom: 2rem;
}

#inputText {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--divider-borders);
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  resize: none;
  /* min-height: 120px; */
  transition: all 0.3s ease;
  font-family: inherit;
  background: #fff;
}

#inputText:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 4px rgba(32, 201, 151, 0.15);
}

.controls {
  display: flex;
  justify-content: space-evenly;
  gap: 1.5rem;
  margin-top: 1rem;
  background: #fff;
  padding: 10px;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
}

.control-group input[type="range"] {
  width: 80%;
  height: 6px;
  border-radius: 3px;
  background: #e1e5e9;
  outline: none;
  appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-teal);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(32, 201, 151, 0.3);
}

.control-group input[type="color"] {
  width: 50px;
  height: 40px;
  border: none;
  /* border-radius: 8px; */
  cursor: pointer;
}

/* Font Cards Grid */
.fonts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.font-card {
  background: var(--card-background);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.font-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.font-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.preview-box {
  background: #f8f9fa;
  /* border: 1px solid #eee; */
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: break-word;
  transition: all 0.3s ease;
}

.preview-box:hover {
  border-color: var(--accent-teal);
  background: #fff;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
  flex-direction: row;
}

.btn-download {
  flex: 1;
  min-width: 100px;
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--divider-borders);
  padding: 0.75rem 1rem;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-download:hover {
  transform: translateY(-2px);
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

/* .btn-download.secondary {
  background: var(--dynamic-gradient);
  color: #fff;
  border: none;
} */

.btn-download.secondary {
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--divider-borders);
}

.btn-download.secondary:hover {
  border-color: #28a745;
  color: #28a745;
  background: #fff;
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.1);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination a:hover,
.pagination a.active {
  background: var(--dynamic-gradient);
  color: white;
  transform: translateY(-2px);
  border: none;
}

/* Footer */
.site-footer {
  background-color: var(--primary-gradient-start);
  /* Soft background */
  color: var(--text-secondary);
  padding: 60px 20px 20px;
  font-family: 'Segoe UI', sans-serif;
  border-top: 1px solid var(--divider-borders);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px auto;
}

.footer-content h3,
.footer-content h4 {
  color: var(--text-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  position: relative;
  display: inline-block;
}

/* Optional underline decoration for headers */
.footer-content h3::after,
.footer-content h4::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent-teal);
  margin-top: 8px;
  border-radius: 2px;
}

.footer-left p {
  max-width: 320px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  opacity: 0.9;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links ul li a:hover {
  color: var(--accent-teal);
  transform: translateX(5px);
}

.footer-social ul,
.footer-social ul li {
  list-style: none;
  margin-bottom: 12px;
}

.footer-social ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: var(--accent-teal);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  margin-top: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  /* very subtle divider */
  padding-top: 25px;
  padding-bottom: 10px;
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: white;
  color: var(--accent-teal);
  border: 1px solid var(--divider-borders);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--dynamic-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(32, 201, 151, 0.3);
}

/* Header Share Button */
.share-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--dynamic-gradient);
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(32, 201, 151, 0.4);
}

.share-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 15px rgba(32, 201, 151, 0.6);
}

/* Custom Share Modal (No Bootstrap) */
.custom-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.5);
  /* Black w/ opacity */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-modal.show {
  display: flex;
  opacity: 1;
}

.custom-modal-dialog {
  width: 90%;
  max-width: 500px;
  margin: auto;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.custom-modal-content {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
}

.custom-modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--divider-borders);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-close-modal:hover {
  color: var(--text-heading);
}

.custom-modal-body {
  padding: 1.5rem;
  text-align: center;
}

.custom-modal-body p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.social-share-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #f8f9fa;
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--divider-borders);
  cursor: pointer;
}

.social-icon:hover {
  background: var(--dynamic-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
}

.input-group-custom {
  display: flex;
  border: 1px solid var(--divider-borders);
  border-radius: 8px;
  overflow: hidden;
}

.form-control-custom {
  flex: 1;
  border: none;
  padding: 10px 15px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: #fdfdfd;
  outline: none;
}

.btn-copy-custom {
  background: #eee;
  border: none;
  border-left: 1px solid var(--divider-borders);
  padding: 0 20px;
  font-weight: 600;
  color: var(--text-heading);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy-custom:hover {
  background: #e2e2e2;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* .header-content {
    padding: 0 1rem;
  } */

  .hero-section h1 {
    font-size: 2rem;
  }

  .input-container {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .fonts-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    flex-direction: row;
  }

  .btn-download {
    min-width: auto;
  }
}

.others {
  padding: 10px 27px;
}

/* Section styling */
section {
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 30px;
  margin: 30px auto;
  /* max-width: 1000px; */
}

section.hero-section {
  margin: 0 auto;
  padding: 80px 30px;
  margin-top: 61px;
  /* margin-top: 66px; */
  border-radius: 0;
  background: var(--primary-gradient);
}

section.fonts-grid#previews {
  background: transparent;
  box-shadow: none;
  max-width: 1320px;
  padding: 0;
}

/* Article & FAQ Redesign */
article.container {
  max-width: 1000px;
  margin: 40px auto;
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 40px;
  color: var(--text-secondary);
}

article.container section {
  box-shadow: none;
  background: transparent;
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--divider-borders);
}

article.container section:last-child {
  border-bottom: none;
}

article.container h2 {
  font-size: 1.8rem;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

article.container p,
article.container ol,
article.container ul {
  line-height: 1.7;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

article.container li {
  margin-bottom: 0.8rem;
}

/* Features Grid Section */
#features-grid {
  padding: 40px 0;
  border-bottom: 1px solid var(--divider-borders);
}

#features-grid:last-child {
  border-bottom: none;
}

.features-header {
  text-align: center;
  margin-bottom: 40px;
}

.features-header h2 {
  font-size: 2rem;
  color: var(--text-heading);
  margin-bottom: 10px;
}

.features-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.heading-underline {
  width: 60px;
  height: 4px;
  background: var(--accent-yellow);
  margin: 15px auto 0;
  border-radius: 2px;
}

.features-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--accent-teal);
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(32, 201, 151, 0.15);
}

.icon-wrapper {
  color: var(--accent-teal);
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-heading);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Responsive adjustments for features */
@media (max-width: 992px) {
  .features-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features-container {
    grid-template-columns: 1fr;
  }

  .features-header h2 {
    font-size: 1.6rem;
  }
}

/* Feature Image */
.feature-image-wrapper {
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.feature-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--border-radius);
  transition: transform 0.3s ease;
}

.feature-image:hover {
  transform: scale(1.02);
}

/* Responsive Typography for Article */
@media (max-width: 768px) {
  article.container {
    padding: 20px;
    margin: 20px auto;
  }

  article.container h2 {
    font-size: 1.5rem;
  }

  article.container h3 {
    font-size: 1.1rem;
  }

  article.container p,
  article.container li {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .feature-image-wrapper {
    margin-bottom: 1.5rem;
  }
}

/* FAQ Accordion */
#faq h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-heading);
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

#faq h3:hover {
  background: #e9ecef;
}

#faq h3::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent-teal);
  transition: transform 0.3s ease;
}

#faq h3.active {
  background: var(--dynamic-gradient);
  color: #fff;
}

#faq h3.active::after {
  content: '-';
  color: #fff;
}

#faq p {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height 0.3s ease, margin-bottom 0.3s ease;
  opacity: 0;
}

#faq p.active {
  max-height: 500px;
  /* Approximate max height */
  margin-bottom: 20px;
  opacity: 1;
  padding-top: 10px;
}

section h2 {
  font-size: 26px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  border-left: 6px solid var(--accent-teal);
  padding-left: 12px;
}

section h3 {
  font-size: 20px;
  margin-top: 20px;
  color: #444;
}

/* Paragraphs and ordered list */
section p {
  font-size: 16px;
  margin-bottom: 15px;
}

section ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

section ol li {
  margin-bottom: 10px;
}

/* Emphasize bold text */
section strong {
  color: var(--accent-teal);
}

@media (max-width:480px) {
  .fonts-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 1rem;
    margin-bottom: 3rem;
  }

  .font-card {
    width: 100%;
  }
}

/* Responsive tweaks */
@media (max-width: 600px) {
  section {
    padding: 20px;
  }

  section h2 {
    font-size: 22px;
  }

  section h3 {
    font-size: 18px;
  }

  section p,
  section ol li {
    font-size: 15px;
  }
}

.container {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 30px;
  margin: 30px auto;
  max-width: 1320px;
}

.fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999999;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 10px 0;
  max-height: 80px;
  border-bottom: 1px solid #eee;
  box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}

.others {
  padding: 10px 27px;
}

/* Responsive Grid for Font Cards */
.fonts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  width: 100%;
}

@media (min-width: 768px) {
  .fonts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.font-card {
  background: var(--card-background);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.font-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.font-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Controls Styling */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  background: #fff;
  padding: 10px;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f9fdfa;
  border: 1px solid #e1e8e5;
  border-radius: 12px;
  padding: 25px;
  flex: 1 1 300px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  gap: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.control-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.control-group label {
  font-weight: 700;
  color: #333;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.control-group input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e9ecef;
  outline: none;
  appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-teal);
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(32, 201, 151, 0.4);
  transition: transform 0.1s;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.control-group input[type="color"] {
  width: 60px;
  height: 50px;
  /* border: 1px solid #ddd; */
  padding: 0;
  background: transparent;
  /* border-radius: 8px; */
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.control-group input[type="color"]:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Character Map Panel */
.char-map-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  max-width: 90%;
  height: 100vh;
  background: #fff;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  z-index: 2001;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.char-map-panel.open {
  right: 0;
}

.char-map-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--divider-borders);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--background-main);
}

.char-map-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-heading);
}

.char-map-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.map-section {
  margin-bottom: 2rem;
}

.map-section h4 {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Code Block Styling inside Panel */
.char-map-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Toggle Button Style */
.btn-char-map {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: var(--accent-teal);
  color: white;
  border: 1px solid var(--accent-teal);
  width: 50px;
  height: 50px;
  border-radius: 8px 0 0 8px;
  /* Rounded on left only */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1999;
  /* Below modal/panel but above content */
  box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.1);
  margin-right: 0;
}

.btn-char-map:hover {
  background: #19a17a;
  padding-right: 5px;
  /* Slide out effect */
  width: 60px;
  box-shadow: -6px 6px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 480px) {
  .char-map-panel {
    width: 320px;
  }
}

/* Character Map Page Specific Styles */
.char-map-page-container {
  margin-top: 100px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem;
}

.char-map-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.char-map-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.char-map-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid var(--divider-borders);
}

.char-map-card h2 {
  background: #f3f4f6;
  color: #111827;
  font-size: 1.25rem;
  margin: 0;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--divider-borders);
  text-align: left;
}

.char-map-card pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.5rem;
  margin: 0;
  overflow-x: auto;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

.key {
  color: #9cdcfe;
}

.str {
  color: #ce9178;
}

.pun {
  color: #d4d4d4;
}

@media (max-width: 768px) {
  .char-map-page-container {
    padding: 1rem;
    margin-top: 80px;
  }

  .char-map-card pre {
    font-size: 0.85rem;
    padding: 1rem;
  }
}