:root {
  --primary: #671b00;
  --background: #fff8e7;

  --text: #3e2f1c;
  --text-secondary: #5b4636;
  --border: #e0e0e0;
  --header-bg: #fff3d1;
  --footer-bg: #f2e7c9;
  --shadow: rgba(0, 0, 0, 0.05);
  --menu-bg: rgba(255, 255, 255, 0.95);
  --nav-height: 60px;

  --accent-gold: #d4af37;
  --accent-saffron: #f4a300;
  --accent-green: #4c8c4a;
  --accent-blue: #3a6ea5;

  --link-color: var(--accent-blue);
  --link-hover: var(--accent-gold);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  background-color: var(--background);
  color: var(--text);
  /* line-height: 1.6; */
  padding-top: var(--nav-height);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-top: 3px solid var(--primary);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  display: flex;
  gap: 2px;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.main-nav {
  display: flex;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 5px 0;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  position: relative;
  color: var(--text);
  font-size: 28px;
}

.navshare {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  position: relative;
  color: var(--text);
  font-size: 22px;
}

footer {
  background-color: var(--footer-bg);
  padding: 20px;
  border-top: 1px solid var(--border);
  margin-top: 2em;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  flex-direction: column;
}
.footer-links {
  width: 100%;
}
.footer-links ul {
  width: 100%;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 1em;
  flex-wrap: wrap;
}

.footer-copyright {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1em;
  width: 100%;
}

.footer-about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  width: 100%;
}

.main_content h2,
.main_content h3,
.main_content h4,
.main_content h5 {
  margin: 1.25em 0 0.5em;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}

.main_content h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
}
.main_content h3 {
  font-size: clamp(1.125rem, 1.9vw, 1.4rem);
}
.main_content h4 {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
}
.main_content h5 {
  font-size: clamp(0.95rem, 1.3vw, 1rem);
}

.main_content p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

.main_content ul,
.main_content ol {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
  line-height: 1.6;
}

.view_content {
  display: flex;
  gap: 20px;
  margin-block: 1em;
}

.view_main {
  flex: 1;
  width: auto;
}

.view_sidebar {
  width: 300px;
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sticky {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.heading {
  font-size: 25px;
  line-height: 34px;
  margin-bottom: 1em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--border);
}

.view_heading {
  margin: 0px;
  margin-bottom: 1em;
  padding: 0px;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--accent-gold);
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

.mobile-menu-toggle {
  display: none;
}

.category {
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

.category button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: rgba(255, 242, 189, 0.537);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: 600;
}

.category button:hover {
  background: #f2f2f2;
}

.category-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.category img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.arrow {
  transition: transform 0.3s ease;
  font-size: 18px;
}

.category.active .arrow {
  transform: rotate(180deg);
}

.inner-links {
  display: none;
  flex-direction: column;
  background: #f9f9f9;
  padding: 8px 14px;
  border-top: 1px solid #eee;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.inner-links a {
  text-decoration: none;
  color: #0077cc;
  padding: 6px 0;
  display: block;
  transition: color 0.3s;
}

.inner-links a:hover {
  color: #ff6600;
}

.category.active .inner-links {
  display: flex;
}

.languages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.languages a {
  background-color: rgba(255, 245, 217, 0.736);
  padding: 3px 1px;
  border-radius: 5px;
  min-width: 85px;
  color: #000;
  text-align: center;
  font-size: 14px;
  border: 1px solid var(--border);
}
.languages a:hover {
  background-color: var(--accent-gold);
  color: #fff;
}

.mainView {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.part1 {
  flex: 0 0 220px;
  max-width: 220px;
}

.part2 {
  flex: 1;
}

.mb {
  margin-bottom: 1em;
}

.mt {
  margin-top: 1em;
}
.box {
  background-color: rgba(255, 255, 255, 0.485);
  border: 1px solid var(--border);
  padding: 1em;
  border-radius: 1em;
}

.post_content {
  word-wrap: break-word;
}

.post_content p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

.post_content b {
  margin-top: 1em !important;
  display: block;
  color: var(--primary);
}

.isCenter {
  text-align: center;
}

.sidebar_links img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.sidebar_links a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;

  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
  margin-bottom: 5px;
}

.sidebar_links a:last-child {
  border: none;
}

.sidebarHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;

  margin-bottom: 1em;
}

.btnall {
  background-color: #ff910024;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #000000;
}

.btnall:hover {
  background: var(--accent-gold);
  color: #fff;
}

.ch_content_404 {
  min-height: 66vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  color: #222;
  padding: 2rem;
}
.ch_code_404 {
  font-size: 7rem;
  font-weight: 700;
  line-height: 1;
}
.ch_message_404 {
  font-size: 1.25rem;
  font-weight: 600;
}
.ch_desc_404 {
  font-size: 0.95rem;
  opacity: 0.8;
  max-width: 36ch;
}
.ch_button_404 {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #ddd;
  background: transparent;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ch_button_404:focus,
.ch_button_404:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.linkview a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.linkview a:last-child {
  border: none;
}

.ads {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  flex-direction: column;
  background-color: #e8e8e89d;
  color: #9c9c9c;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 1em;
}

.post_meta_links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta_link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 245, 217, 0.736);
  color: #333;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s ease;
  font-size: 14px;
  border: 1px solid var(--border);
}

.meta_link:hover {
  background: var(--accent-gold);
  color: #fff;
}

.meta_link img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 50%;
}

.ch_nav_links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  padding: 10px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.ch_nav_links a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 40%;
}

.ch_nav_links a:hover {
  color: var(--accent-gold);
}

.ch_nav_links .ch_prev {
  justify-content: flex-start;
}

.ch_nav_links .ch_next {
  justify-content: flex-end;
  margin-left: auto;
  text-align: end;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 2px;

  flex-wrap: wrap;
}

.controls #copyBtn,
.share,
.btn_fav,
.btnresult {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  background-color: rgba(255, 245, 217, 0.736);
  color: #fff;
  transition: background 0.3s;
  min-width: 90px;
  height: 32px;
  color: #000;
}

.font-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: rgba(255, 250, 236, 0.736);
}

.font-btn {
  background-color: rgba(255, 245, 217, 0.736);
  color: #000;
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  transition: background 0.2s;
  cursor: pointer;
}

.font-btn:hover,
.controls #copyBtn:hover,
.share:hover,
.btn_fav:hover {
  background: var(--accent-gold);
  color: #fff;
}

.btn_fav,
.btnresult {
  min-width: 190px;
  width: 100% !important;
}

.btn_fav:disabled {
  pointer-events: none;
  cursor: default;
  background-color: #d0d0d0;
  color: #818181;
}
.btnresult:disabled {
  pointer-events: none;
  cursor: default;
  background-color: #f7ffde;
  color: #000000;
}
.font-size-display {
  width: 20px;
  text-align: center;
  font-weight: 500;
}

.btn_lang {
  display: none;
}

.languageheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 1em;
}

.delete-btn {
  background-color: none;
  border: none;
  cursor: pointer;
  color: #c40000;
}

.favlist {
  background-color: #ffd29824;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 10px;
  margin-block: 10px;
}
.favlist a {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
@media (max-width: 600px) {
  .ch_nav_links {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .ch_nav_links .ch_next {
    margin-left: 0;
  }

  .ch_nav_links a {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .ch_code_404 {
    font-size: 4.2rem;
  }
  .ch_message_404 {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .heading {
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 0.5em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--border);
  }

  .languageheader {
    margin-bottom: 0px;
  }
  .languages {
    display: none;
    margin-top: 1em;
  }
  .btn_lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;

    background-color: #ff910024;
    padding: 5px 8px;
    border-radius: 5px;
    color: #000;
    text-align: center;
    font-size: 14px;
    border: 1px solid var(--border);
  }
  .controls {
    align-items: center;
    justify-content: space-between;
    gap: 12px 2px;
    flex-wrap: wrap;
  }

  .footer-about {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
  .footer-about p {
    text-align: center;
  }
  h1 {
    font-size: 24px;
  }
  .hero_p {
    font-size: 14px !important;
  }
  .mainView {
    flex-direction: column;
  }

  .part1,
  .part2 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 991px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--menu-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px var(--shadow);
    border-top: 1px solid var(--border);
    z-index: 999;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.active {
    max-height: 300px;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 15px 0;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 12px 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  .nav-link:hover {
    background-color: var(--primary);
    color: white;
  }

  .nav-link::after {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

@media screen and (max-width: 768px) {
  .container {
    width: 100%;

    padding: 0 1em;
  }
  .view_content {
    flex-direction: column;
    gap: 10px; /* Optional: smaller gap on mobile */
  }

  .view_main {
    width: 100%;
    flex: none;
  }

  .view_sidebar {
    width: 100%;
    position: relative; /* Remove sticky on mobile */
    top: auto;
  }
}

.fav-empty-container {
  text-align: center;

  margin: 80px auto;
  animation: favFadeIn 0.35s ease-in-out;
}

@keyframes favFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fav-empty-icon svg {
  width: 90px;
  height: 90px;
  color: var(--accent-gold);
  opacity: 0.8;
  animation: favPulse 1.8s infinite ease-in-out;
}

@keyframes favPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.fav-empty-title {
  margin: 20px 0 10px;
  font-size: 1.4rem;
  color: #222;
}

.fav-empty-text {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 25px;
}

.fav-empty-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.fav-empty-btn {
  border: none;
  outline: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.25s ease;
  text-decoration: none;
  display: inline-block;
}

.fav-empty-primary {
  color: #fff;
  background: var(--accent-gold);
}

.fav-empty-primary:hover {
  background: var(--accent-saffron);
  color: #fff;
}

.fav-empty-reload {
  background: none;
  border: 1px solid #6c757d;
  color: #6c757d;
}

.fav-empty-reload:hover {
  background: #6c757d;
  color: #fff;
}

.fav-empty-tip {
  margin-top: 15px;
  font-size: 0.85rem;
  color: #777;
}

.fav-empty-tip kbd {
  background: #f1f1f1;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 480px) {
  .fav-empty-container {
    padding: 30px 20px;
  }
}

.sidebarheading {
  color: var(--accent-gold);
  font-size: clamp(1.125rem, 1.9vw, 1.4rem);
  font-weight: 700;
}
