/* 1. Global Styles & Variables */
:root {
  --brand-color: #ff4500;
  --bg-color: #ffffff;
  --bg-soft: #f4f4f6;
  --bg-soft-transparent: rgba(255, 255, 255, 0.8);
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --border-color-darker: #d1d5db;
  --focus-ring: #ff4500;
  --white: #ffffff;
  --black: #000000;

  --codehap-border-color: #d8d8d8;
  --codehap-header-color: #fff;
  --codehap-color: #000;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

html[data-theme="dark"] {
  --bg-color: #131419;
  --bg-soft: #22222c;
  --bg-soft-transparent: rgba(4, 4, 4, 0.8);
  --text-color: #f3f4f6;
  --text-muted: #9ca3af;
  --border-color: #282b32;
  --border-color-darker: #4b5563;
  --codehap-border-color: #282828;
  --codehap-header-color: #fff;
  --codehap-color: #fff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#loader-1{
    fill:var(--brand-color);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.brand-text {
  color: var(--brand-color);
}

.hidden {
  display: none !important;
}

/* 2. Header */
.site-header {
  background-color: var(--bg-soft-transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 5px 42px 0 #00000014;
  position: sticky;
  top: 0px;
  z-index: 50;
  transition: background-color 0.3s, border-color 0.3s;
  max-width: 1180px;
  margin: auto;
  border-radius: 0px 0px 1em 1em;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-color);
}
.logo-icon {
  width: 2.5rem; /* 32px */
  height: 2.5rem; /* 32px */
  color: var(--brand-color);
  margin-top: 0px;
}
.logo-text {
  font-size: 1.5rem; /* 24px */
  font-weight: 600;
}

.main-nav {
  display: none;
}
@media (min-width: 768px) {
  .main-nav {
    display: flex;
    gap: 2rem;
  }
}
.nav-link {
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--brand-color);
}
.nav-link.active {
  color: var(--brand-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle,
.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.theme-toggle:hover,
.mobile-menu-button:hover {
  background-color: var(--bg-soft);
}
.theme-toggle .icon,
.mobile-menu-button .icon {
  width: 1.5rem;
  height: 1.5rem;
}
#sun-icon {
  color: #facc15;
}
#moon-icon {
  color: var(--text-color);
}
.mobile-menu-button .close {
  display: none;
}
.mobile-menu-button[aria-expanded="true"] .open {
  display: none;
}
.mobile-menu-button[aria-expanded="true"] .close {
  display: block;
}

.mobile-menu {
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
}
.mobile-menu .nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

/* 3. Main Content & Sections */
.hero-section {
  text-align: center;
  padding: 4rem 0 3rem;
}
.hero-title {
  font-size: clamp(2.5rem, 5vw, 1.75rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.isflex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 130px;
}

@keyframes blinkAnimation {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
.blink {
  animation: blinkAnimation 0.5s linear infinite;
}

.btn {
  padding: 1rem 2rem;
  font-weight: 600;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.btn-primary {
  background-color: var(--brand-color);
  color: var(--white);
}
.btn-primary:hover {
  background-color: #e63e00;
}

.btn-primary:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
}
.info-section {
  padding: 2rem 0;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}
.card {
  background-color: var(--bg-soft);
  padding: 2rem;
  border-radius: 0.75rem;

  margin: 0 auto;
  transition: background-color 0.3s;
}
@media (min-width: 640px) {
  .card {
    padding: 3rem;
  }
}

.card-content {
  color: var(--text-muted);
  font-size: 1.125rem;
}
.card-content p,
.card-content ul {
  margin-bottom: 1.5rem;
}
.card-content p:last-child,
.card-content ul:last-child {
  margin-bottom: 0;
}
.steps-list {
  list-style: none;
  padding-left: 0;
}
.steps-list li {
  margin-bottom: 1.5rem;
}
.steps-list strong {
  display: block;
  color: var(--text-color);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* 4. FAQ Section */
.faq-section {
  padding: 3rem 0;
}
.faq-container {
  max-width: 56rem;
  margin: 0 auto;

  border-radius: 0.75rem;

  overflow: hidden;
  transition: background-color 0.3s;
}
.faq-item {
  border-radius: 0.75rem;
  margin-bottom: 1em;
  background-color: var(--bg-soft);

  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  background: none;
  border: none;
  cursor: pointer;
}
.faq-question:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
html[data-theme="dark"] .faq-question:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.faq-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}
.faq-icon.rotate-180 {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}
.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
}

/* 5. Footer */
.site-footer-bottom {
  background-color: transparent;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  transition: background-color 0.3s, border-color 0.3s;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-about .logo {
  margin-bottom: 1rem;
}
.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-color);
  margin-bottom: 1rem;
}
.footer-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--brand-color);
}

.footer-copyright {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
@media only screen and (max-width: 600px) {
  .hero-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.55rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
  }
  .logo-text {
    display: none;
  }
}

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

.dropdown-button {
  border-radius: 50%;
  background: transparent;
  color: var(--text-color);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;

  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

.is_error {
  animation: blink 1s step-start infinite, hideIt 5s forwards;
  color: red;
  font-weight: bold;
}

.verysmall {
  font-size: 0.75rem; /* 12px */
  color: var(--text-muted);
}

.chweb_result {
  min-height: 40px;
}

@keyframes blink {
  10% {
    color: rgb(0, 0, 0);
  }
  30% {
    color: rgb(255, 0, 0);
  }
  60% {
    color: rgb(0, 0, 0);
  }
  100% {
    color: rgb(255, 0, 0);
  }
}

@keyframes hideIt {
  0% {
    visibility: visible;
    opacity: 1;
  }
  99% {
    visibility: visible;
    opacity: 1;
  }
  100% {
    visibility: hidden;
    opacity: 0;
  }
}

.ch_page {
  margin-block: 1em;
}

.ch_page h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.ch_page h2 {
  font-size: 1.7rem;
  font-weight: bold;
  margin-top: 0.6em;
}

.ch_page h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 0.6em;
}

.ch_page h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 0.5em;
}

.ch_page h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.4em;
}

.ch_page h6 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.4em;
}

.ch_page p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 15px;
}

.ch_page ul,
.ch_page ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.ch_page ul li,
.ch_page ol li {
  line-height: 1.5;
  color: var(--text-color);
  margin-bottom: 8px;
}

/* Optional: reset list style inside .ch_page */
.ch_page ul {
  list-style-type: disc;
}

.ch_page ol {
  list-style-type: decimal;
}

.codehap_html table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  color: var(--codehap-color);
  font-weight: normal;
  background-color: var(--bg-soft);
}

.codehap_html table th[colspan="8"] {
  background-color: var(--brand-color);
  font-size: 20px;

  padding: 5px;
  border: 2px solid var(--codehap-border-color);
  color: var(--codehap-header-color);
}

.codehap_html table td {
  border: 1px solid var(--codehap-border-color);
  padding: 15px;
  font-size: 18px;
  font-weight: normal;
}

.codehap_html table tr:nth-child(2) td,
.codehap_html table tr:nth-child(3) td {
  font-weight: bold;
}

@media (max-width: 768px) {
  .codehap_html table td {
    font-size: 15px;
    padding: 10px 2px;
  }

  .codehap_html table th[colspan="8"] {
    font-size: 14px;
    padding: 10px;
  }
}

#live {
  margin-bottom: 2em;
}

.disclaimer {
  padding: 1em;
  border-radius: 1em;
  background-color: #fff5c4;
  margin-bottom: 2em;
  border-left: 5px solid #cf8300;
  color: #000;
}

.tables {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;

  margin: 0 auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

.table th {
  background: var(--bg-soft);
  font-weight: bold;
  color: var(--text-color);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Desktop: side-by-side */
@media (min-width: 768px) {
  .table {
    width: calc(50% - 10px); /* Adjust for gap */
  }
}

/* Mobile: stacked */
@media (max-width: 767px) {
  .table {
    width: 100%;
  }
}

/* Responsive font sizes */
.table th,
.table td {
  font-size: 16px;
  font-family: var(--font-sans);
}

@media (max-width: 767px) {
  .table th,
  .table td {
    font-size: 14px;
    padding: 10px;
  }
}

/* Hover effect for better interactivity */
.table tbody tr:hover {
  background: var(--bg-soft-transparent);
}

/* Focus styles for accessibility */
.table th:focus,
.table td:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.whyus {
  padding: 1em;
  text-align: center;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  border-radius: 1em;
  margin-bottom: 2em;

  border: dashed 2px var(--brand-color);
}
.whyus h3 {
  margin-block: 1em;
  font-size: 25px;
}

.whyus p {
  margin-block: 1em;
}

.live-result {
  min-height: 170px;
}

.old-title {
  margin-top: 2em;
  font-size: 1.5rem;
}

.months {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 3em;
  margin-top: 1em;
}

.months div {
  flex: 1 1 auto;
  white-space: nowrap;
}

.months a {
  display: inline-block;
  padding: 6px 10px;
  background-color: var(--bg-soft);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  text-align: center;
}

.months a:hover {
  background-color: var(--brand-color);
  color: #fff;
}

.thisMonth {
  background-color: #222222;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.thisMonth:hover {
  background-color: var(--brand-color);
}

/* Mobile style: 3 in a row, small text */
@media (max-width: 768px) {
  .months a {
    font-size: 12px;
    padding: 4px 6px;
    min-width: 60px;
  }
}
.social_buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  background-color: var(--bg-soft);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;

  transition: background 0.3s;

  text-align: center;
  width: 180px;
  height: 50px;
}

.social_btn:hover {
  background-color: var(--brand-color);
  color: #fff;
}

.social_btn svg {
  width: 20px;
  height: 20px;
}

.nofound {
  font-size: 30px;
  color: red;
  text-transform: capitalize;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.tips table {
  border-collapse: collapse;
  width: 100%;
}

.tips table td,
.tips table th {
  border: 1px solid var(--border-color);
  padding: 8px;
}

.tips table tr:nth-child(even) {
  background-color: var(--bg-soft);
}

.tips table th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: center;
  background-color: var(--brand-color);
  color: white;
}

.circle {
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  animation: blink 1s infinite;
  display: inline-flex;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.1;
  }
  100% {
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

/* Custom CSS for the wheel */
.wheel_container {
  position: relative;
  width: 350px; /* Increased size for better visibility */
  height: 350px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto; /* Center the wheel */
  border: 8px solid #ccc; /* Add a subtle border */
}

.wheel_spinner {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1); /* Smooth spin transition */
  /* Replicated color scheme from the image (greens and yellows) */
  background: conic-gradient(
    #aac3fe 0% 10%,
    #f07de7 10% 20%,
    #f0f7da 20% 30%,
    #ffd700 30% 40%,
    #7ce37c 40% 50%,
    #6ceaef 50% 60%,
    #ff9abe 60% 70%,
    #ffac41 70% 80%,
    #9fd7cc 80% 90%,
    #e5fb95 90% 100%
  );
}

/* This wrapper will rotate with the wheel, and contain the number */
.wheel_segment_wrapper {
  position: absolute;
  width: 100%; /* Spans the whole wheel */
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: center center; /* Rotates around the wheel's center */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* The actual number content, positioned radially and counter-rotated */
.wheel_segment_content {
  position: absolute; /* Position relative to the wrapper */
  font-family: "Inter", sans-serif;
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  /* Initial transform will be set dynamically in JS */
  text-align: center; /* Ensure text is centered within its own box */
  width: 50px; /* Give it a fixed width for centering */
  height: 50px; /* Give it a fixed height for centering */
  display: flex;
  justify-content: center;
  align-items: center;
}

.wheel_center_button {
  position: absolute;
  width: 100px;
  height: 100px;
  background-color: #333; /* Dark background for the button */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 20; /* Ensure it's above the spinner */
  transition: transform 0.1s ease-in-out;
}

.wheel_center_button:active {
  transform: scale(0.95); /* Add a slight press effect */
}

.tips .table td,
.tips .table th {
  text-align: center;
}
/* Responsive adjustments */
@media (max-width: 640px) {
  .wheel_container {
    width: 300px;
    height: 300px;
  }
  .wheel_segment_content {
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }
  .wheel_center_button {
    width: 80px;
    height: 80px;
    font-size: 1.2rem;
  }

  .header-actions {
    gap: 5px;
  }

  .tips .table td,
  .tips .table th {
    padding: 4px;
    font-size: 12px;
  }
}
.iamflex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hidden {
  display: none;
}

.wheel_box {
  min-height: 55px;
  margin-top: 2px;
}

.wheel_result_display {
  background-color: #c6ffea;

  color: #003421;
  border-radius: 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: auto;
  max-width: 300px;
  height: 50px;
  border: 1px solid #04aa6d;
}

#wheel_lucky_number {
  font-size: 40px;
  font-weight: bold;
}

.sp {
  position: relative;
}

.ar {
  position: absolute;
  top: 44px;
  right: -15px;
  rotate: 14deg;

  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 20px solid #333; /* Arrow points right */
}

#goToTopBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background: 0;
  cursor: pointer;
  border: 0;
}
#goToTopBtn svg {
  fill: var(--brand-color);
  background-color: #fff;
  border-radius: 50%;
  padding: 1px;
}
#goToTopBtn svg:hover {
  fill: var(--black);
}

.radio-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.vote-option {
  position: relative;
  display: inline-block;
}

.vote-option input {
  display: none;
}

.vote-label {
  display: inline-block;
  padding: 12px 18px;
  border: 2px solid var(--text-muted);
  border-radius: 8px;
  background: var(--bg-soft-transparent);
  color: var(--text-color);
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s;
  font-weight: bold;
}

.vote-option input:checked + .vote-label {
  background: var(--brand-color);
  color: white;
}

.submit-btn {
  padding: 12px 25px;
  font-size: 16px;
  background: var(--brand-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 30px;
}

#result table {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-collapse: collapse;
  background: var(--bg-soft);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-weight: bold;
}

#result table th,
#result table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

#result table th {
  background: var(--brand-color);
  color: white;
}

@media (max-width: 600px) {
  .vote-label {
    padding: 10px 14px;
    font-size: 16px;
  }
}

.color_circle_picker {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  padding: 0px;
  border-radius: 50%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  overflow: hidden;
}

.color_circle_picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color_circle_picker::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}
