/* ---------------------------------------------------------------------------
   Base reset + the handful of utility classes this site used from Tailwind.
   The Tailwind Play CDN (a ~400KB script that compiled CSS in the browser on
   every page load) was render-blocking in <head>; these rules replace it.
   --------------------------------------------------------------------------- */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  margin: 0;
  line-height: inherit;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

p,
blockquote,
figure,
pre,
dl,
dd {
  margin: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b,
strong {
  font-weight: bolder;
}

small {
  font-size: 80%;
}

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

button,
[role="button"] {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

textarea {
  resize: vertical;
}

summary {
  display: list-item;
}

[hidden] {
  display: none;
}

/* Utility classes still referenced in the markup. */
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.leading-relaxed { line-height: 1.625; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

body {
box-sizing: border-box;
 font-family: 'Poppins', sans-serif;
background: radial-gradient(circle at 10% 20%, rgba(23, 32, 49, .8), transparent 40%), radial-gradient(circle at 90% 30%, rgba(35, 45, 65, .7), transparent 50%), radial-gradient(circle at 50% 80%, rgba(23, 32, 49, .6), transparent 60%), radial-gradient(circle at 30% 50%, rgba(45, 55, 75, .7), transparent 70%), radial-gradient(circle at 70% 10%, rgba(23, 32, 49, .8), transparent 80%);
color: #e0e6ed;
margin: 0;
padding: 0px;
min-height: 100%;
}
.container {
max-width: 450px !important;
margin: 0 auto;
padding: 10px;
padding-top: 0px;
background: #172031;

box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.coins{
  cursor: pointer;
}
.header {
text-align: center;
margin-bottom: 0px;
}

.page-shell {
min-height: 100vh;
display: flex;
flex-direction: column;
}

.page-content {
flex: 1;
display: block;
padding: clamp(20px, 4vw, 40px) 0 12px;
}

.page-shell .quiz-card {
width: min(100%, 860px);
margin: 0 auto;
padding: clamp(24px, 4vw, 40px) !important;
}

.page-shell .footer-links {
width: min(100%, 860px);
margin: 0 auto 28px !important;
padding: 18px 0 0 !important;
border-top: 1px solid rgba(255, 255, 255, 0.08);
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px 22px;
}

.page-shell .footer-links a {
margin: 0 !important;
}

.page-shell .quiz-card p,
.page-shell .quiz-card li {
font-size: clamp(0.98rem, 1.7vw, 1.06rem);
line-height: 1.75;
}

.page-shell .quiz-card h2 {
font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.page-shell .quiz-card h3 {
font-size: clamp(1.05rem, 2.2vw, 1.35rem);
}

.page-shell .quiz-card h4 {
font-size: clamp(0.98rem, 2vw, 1.1rem);
}

@media (max-width: 768px) {
.page-content {
padding: 16px 0 10px;
}

.page-shell .quiz-card {
width: calc(100% - 16px);
padding: 22px 16px !important;
}

.page-shell .footer-links {
width: calc(100% - 16px);
gap: 10px 16px;
}
}
.ads-placement-cover {
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo {
font-size: 2.2rem;
font-weight: 800;
margin-bottom: 8px;
/*background: linear-gradient(45deg, #00d4ff, #0099cc);*/
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.tagline {
font-size: 0.9rem;
opacity: 0.7;
margin-bottom: 20px;
color: #9ca3af;
}

.quiz-card {
   max-width: 100%;
    width: 100%;
    background-color: #3b4559;
    display: block;
    margin: 40px auto;
    position: relative;
    border-radius: 16px;
    padding: 30px 10px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    margin-top: 60px;
}
#optionsContainer .option{
        background-color: #172031;
    width: 100%;
    height: 100%;
    padding: 10px;
    border-radius: 6px;
    color: #fff;
    text-align: center;
    font-weight: 600;
    border: none;
}

.question-counter {
text-align: center;
font-size: 0.9rem;
opacity: 0.8;
margin-bottom: 20px;
margin-top: 20px;
}

.progress-bar {
width: 100%;
height: 6px;
background: rgba(255, 255, 255, 0.2);
border-radius: 3px;
margin-bottom: 30px;
overflow: hidden;
}

.progress-fill {
height: 100%;
background: linear-gradient(90deg, #ffd700, #ffed4e);
border-radius: 3px;
transition: width 0.5s ease;
width: 0%;
}

.question {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 25px;
line-height: 1.4;
text-align: center;
}

.options {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
margin-bottom: 25px;
}

.option {
background: linear-gradient(145deg, #1e1e2e, #2a2a3e);
border: 2px solid rgba(75, 85, 99, 0.3);
color: #e0e6ed;
padding: 18px 20px;
border-radius: 16px;
cursor: pointer;
transition: all 0.3s ease;
font-size: 0.95rem;
font-weight: 500;
text-align: center;
position: relative;
overflow: hidden;
min-height: 55px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.option:hover {
background: linear-gradient(145deg, #2a2a3e, #3a3a4e);
border-color: rgba(0, 212, 255, 0.4);
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 212, 255, 0.2);
}

.option.selected {
background: linear-gradient(145deg, #ff6b35, #ff8c42);
border-color: #ff6b35;
color: #ffffff;
box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4), 0 0 20px rgba(255, 107, 53, 0.3);
}

.option.correct {
background: linear-gradient(145deg, #10b981, #059669);
border-color: #10b981;
color: #ffffff;
box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.option.wrong {
background: linear-gradient(145deg, #ef4444, #dc2626);
border-color: #ef4444;
color: #ffffff;
box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.option::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
transition: left 0.5s ease;
}

.option:hover::before {
left: 100%;
}

.next-btn {
background: linear-gradient(45deg, #ffd700, #ffed4e);
color: #333;
border: none;
padding: 15px 40px;
border-radius: 25px;
font-size: 1.1rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
display: block;
margin: 0 auto;
opacity: 0.5;
pointer-events: none;
}

.next-btn.active {
opacity: 1;
pointer-events: auto;
}

.next-btn:hover.active {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.score-display {
text-align: center;
font-size: 1.2rem;
margin-bottom: 20px;
}

.score-number {
font-size: 2rem;
font-weight: bold;
color: #ffd700;
}

.result-card {
text-align: center;
}

.result-title {
font-size: 2rem;
font-weight: bold;
margin-bottom: 20px;
color: #ffd700;
}

.result-message {
font-size: 1.2rem;
margin-bottom: 30px;
opacity: 0.9;
}

.restart-btn {
background: linear-gradient(45deg, #667eea, #764ba2);
color: #fff;
border: 2px solid rgba(255, 255, 255, 0.3);
padding: 15px 40px;
border-radius: 25px;
font-size: 1.1rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
}

.restart-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.fun-fact-card {
background: linear-gradient(145deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
border: 1px solid rgba(16, 185, 129, 0.2);
border-radius: 16px;
padding: 20px;
margin-bottom: 25px;
position: relative;
}

.fun-fact-label {
color: #10b981;
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 8px;
}

.fun-fact-text {
color: #d1d5db;
font-size: 0.85rem;
line-height: 1.4;
}

.bottom-section {
background: linear-gradient(145deg, rgba(26, 26, 46, 0.6), rgba(22, 33, 62, 0.4));
border: 1px solid rgba(0, 212, 255, 0.1);
border-radius: 20px;
padding: 25px;
margin-top: 20px;
}

.bottom-title {
color: #00d4ff;
font-size: 1.1rem;
font-weight: 700;
margin-bottom: 15px;
text-align: center;
}

.bullet-points {
list-style: none;
padding: 0;
margin: 0;
}

.bullet-points li {
color: #9ca3af;
font-size: 0.9rem;
margin-bottom: 8px;
padding-left: 20px;
position: relative;
}

.bullet-points li::before {
content: '•';
color: #00d4ff;
font-weight: bold;
position: absolute;
left: 0;
}

.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 20px;
margin-top: 30px;
}

.stat-item {
background: linear-gradient(145deg, rgba(26, 26, 46, 0.8), rgba(22, 33, 62, 0.6));
border: 1px solid rgba(0, 212, 255, 0.1);
padding: 20px;
border-radius: 16px;
text-align: center;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stat-number {
font-size: 1.8rem;
font-weight: bold;
color: #ffd700;
}

.stat-label {
font-size: 0.9rem;
opacity: 0.8;
margin-top: 5px;
}
.ads-container {
    width: 100%;
    max-width: 100%;
    margin: 2px auto;
    margin-top: 0px;
    padding-top: 0px;
    text-align: center;
    position: relative;
}
.ads {
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.ads-label {
    font-size: 12px;
    color: #f0e7e7;
    margin-top: 5px;
    text-transform: uppercase;
}
.ads-label {
    margin-top: 5px;
    text-align: center;
    margin-bottom: 10px;
}

/*----Question counter -------------*/

#questionCounter {
    max-width: 150px;
    width: 100%;
    border-radius: 50px;
    padding: 5px;
    border: 4px solid #3b4559;
    display: block;
    margin: 0 auto;
    text-align: center;
    position: absolute;
    top: -23px;
    background-color: #172031;
    left: 50%;
    right: 50%;
    transform: translate(-50%,-50%);
    z-index: 999;
}

/*------- End ----------------------*/
body .margin-top-20px{
  margin-top: 20px;
}

.footer-links,
.page-footer {
  text-align: center;
  margin: 30px 0 20px;
  padding: 10px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 6px;
}

/* Tap targets: each footer link keeps at least a 44px-high hit area. */
.footer-links a,
.page-footer a {
  color: #00d4ff;
  text-decoration: none;
  margin: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 10px;
}

.footer-links a:hover,
.page-footer a:hover {
  text-decoration: underline;
}

.ads-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.ads-popup-overlay.active {
  opacity: 1;
  visibility: visible;
  z-index: 9999;
}

.ads-popup {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 25px 20px;
  width: min(80%, 480px);
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: fadeInZoom 0.35s ease-out;
}

.close-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 30px;
  align-items: center;
  gap: 8px;
}

.ads-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  min-width: 44px;
  min-height: 32px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  display: none;
}

.ads-close-btn.active {
  display: block;
}

.ads-loading {
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  color: #333;
}

#adsPopup .ads-label {
  font-size: 12px;
  color: #333;
  margin-top: 5px;
  text-transform: uppercase;
}

#custom-interstitial-popup .close-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 5px;
  align-items: center;
  gap: 2px;
}

div#count-down-wrap {
  color: #000 !important;
  font-size: 13px;
}

#custom-interstitial-popup .ads-label {
  margin-top: 5px;
  text-align: center;
  margin-bottom: 5px;
  color: #333 !important;
}

#custom-interstitial-popup #close-button {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #ff4757;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

#custom-interstitial-popup #close-button::before,
#custom-interstitial-popup #close-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: #ff4757;
  transition: all 0.3s ease;
}

#custom-interstitial-popup #close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#custom-interstitial-popup #close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#custom-interstitial-popup #close-button:hover {
  background: #ff4757;
  border-color: #ff4757;
}

#custom-interstitial-popup #close-button:hover::before,
#custom-interstitial-popup #close-button:hover::after {
  background: white;
}

#custom-interstitial-popup #countdown {
  color: #000 !important;
}
/*------ Bttom Section -------------------------*/

/* Featured Section */
.bottom-content{
  margin-top: 15px;
}
.bottom-content .featured-section {
    background: #3b4559;
    padding: 20px;
    border-radius: 10px;
    margin: 5px 0;
}

.bottom-content .featured-section h2,
.bottom-content .featured-section h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
}

.bottom-content .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 15px;
    gap: 15px;
    margin-top: 15px;
}

.bottom-content .feature-item {
    background: #172031;
    padding: 15px;
    border-radius: 8px;
    color: #fff;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.bottom-content .feature-item h3,
.bottom-content .feature-item h4,
.bottom-content .feature-item h5 {
    margin-bottom: 8px;
    color: #fff;
}

.bottom-content .feature-item p {
    font-size: 0.9rem;
    color: #a09e9e;
    margin: 0;
}

/* How To Play Section */
.bottom-content .how-to-play {
    background: #3b4559;
    padding: 20px;
    border-radius: 10px;
}

.bottom-content .how-to-play h2,
.bottom-content .how-to-play h3 {
    color: #fff;
    margin-bottom: 15px;
}

.bottom-content .play-steps {
    padding-left: 20px;
}

.bottom-content .play-steps li {
    margin-bottom: 10px;
    color: #fff;
}

/* Fact Box */
.bottom-content .fact_box {
    background-color: #3b4559;
    padding: 15px;
    border-radius: 16px;
    text-align: center;
}

.bottom-content .fact_box h3,
.bottom-content .fact_box h4,
.bottom-content .fact_box h5 {
    font-size: 18px;
    font-weight: 600;
}

/* Quiz Rules */
.bottom-content .quiz_rules {
    padding-top: 40px;
    width: 100%;
}

.bottom-content .quiz_rules h3 {
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid;
    display: block;
    margin: 0 auto;
    width: fit-content;
    padding-bottom: 10px;
}
.hide-index{
    z-index: -1;
    opacity: 0;
}
/* Responsive */
@media (max-width: 768px) {
    .bottom-content .features-grid {
        grid-template-columns: 1fr;
    }

    .bottom-content .featured-section,
    .bottom-content .how-to-play {
        padding: 15px;
    }
}


/*----- Result--model----*/
.show_modal {
    width: 100%;
    height: 90vh;
    position: absolute;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center
}

.show_modal .modal_body {
    max-width: 380px;
    position: absolute;
    display: block;
    margin: 0 auto;
    background-color: #fff;
    width: 100%;
    top: 30%;
    border-radius: 8px;
    padding: 10px
}

.show_modal .modal_body .close_modal_btn {
    position: absolute;
    right: 10px;
    color: #000;
    font-size: 24px
}

.show_modal .modal_body .modal_content img {
    animation: flip 3s infinite;
    margin: 20px auto 5px;
    display: block
}

.show_modal .modal_body .modal_content h3 {
    text-align: center;
    color: #172031;
    font-size: 20px
}

.show_modal .modal_body .modal_content h3 b {
    font-size: 22px;
    color: #ffb540;
}

@keyframes flip {
    0% {
        transform: rotateY(0deg)
    }

    50% {
        transform: rotateY(180deg)
    }

    to {
        transform: rotateY(1turn)
    }
}


/**-------- Popup close ---------------*/

/* Overlay background */
  .popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
  }

  /* Popup box */
  .popup-box {
    background: #111827;
    border: 1px solid #fff;
    border-radius: 15px;
    padding: 40px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    color: #fff;
    position: relative;
    animation: fadeIn 0.4s ease-in-out;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }

  /* Close button */
  .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
  }

  .popup-box img {
    animation: flip 3s infinite;
    margin: 20px auto 5px;
    display: block
  }

  .popup-box h2 {
    margin: 10px 0;
  }

  .popup-box .new-reward {
    color: #ffb540;
    font-size: 18px;
    font-weight: 600;
  }

  .popup-box .get-coins {
    font-size: 26px;
    font-weight: 700;
  }

.popup-box p {
  color: #9ca3af;
  margin-bottom: 25px;
}

 .watch-btn-wrapper {
   position: relative;
   width: 100%;
   padding-top: 10px;
 }

 .watch-btn,
 .claim-button.watch-btn {
   position: relative;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   overflow: hidden;
 }

 .watch-btn .watch-label,
 .claim-button .watch-label {
   display: inline-block;
   white-space: nowrap;
 }

.watch-btn-wrapper > .ad-tag {
  position: absolute;
  top: -2px;
  right: -8px;
  margin: 0;
   padding: 0;
   background: transparent;
   color: #fff;
   font-size: 12px;
   font-weight: 800;
   letter-spacing: 0.08em;
  pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.watch-btn[data-loading="true"],
.claim-button.watch-btn[data-loading="true"] {
  background: linear-gradient(135deg, #ffd84d 0%, #ffca28 100%);
  color: #1b1b1b;
  box-shadow: 0 10px 28px rgba(255, 202, 40, 0.35);
  opacity: 1;
  transform: none;
}

.watch-btn[data-loading="true"] .watch-label,
.claim-button.watch-btn[data-loading="true"] .watch-label {
  position: relative;
  padding-left: 28px;
  letter-spacing: 0.02em;
}

.watch-btn[data-loading="true"] .watch-label::before,
.claim-button.watch-btn[data-loading="true"] .watch-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-top-color: currentColor;
  animation: rewardSpin 0.8s linear infinite;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18) inset;
}

@keyframes rewardSpin {
  to {
    transform: rotate(360deg);
  }
}
 
  .claim-button {
    background-color: #ffb540;
    box-shadow: 0 10px 50px -20px rgba(255,181,64,.9),0 20px 60px -30px rgba(0,0,0,.9);
    font-weight: 700;
    color: #000;
    border-radius: 1.5rem;
    border: none;
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
}

  .claim-button:hover {
    background: #ffb540;
  }
.quiz-wrapper h3,.quiz-wrapper h2{
  color:#ffb540;
}
/* Result Container */
.result-container {
  padding: 2px;
  background: #1a2332;
  border-radius: 12px;
  
  margin: 10px auto;
  margin-top: 10px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
}

/* Result Box */
.result-container .result_box {
  text-align: center;
  background: #2a3446;
  padding: 25px 20px;
  border-radius: 16px;
  margin-bottom: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.result-container .result_box:hover {
  transform: translateY(-5px);
}

.result-container .winner_img {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 15px;
  border-radius: 12px;
}

.result-container .result_box h2,
.result-container .result_box h3 {
  font-size: 20px;
  margin: 10px 0;
  color: #ffd700;
  font-weight: 600;
}

.result-container .coin_set {
  color: #00d4ff;
  font-weight: 700;
}

/* Button */
.result-container .play_now_btn {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #1a1a1a;
  border: none;
  font-weight: 600;
  padding: 10px 25px;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 15px;
}

.result-container .play_now_btn:hover {
  background: linear-gradient(45deg, #ffed4e, #ffd700);
  transform: scale(1.05);
}

/* Quiz Rules */
.result-container .quiz_rules {
  background: #2a3446;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.result-container .quiz_rules h3 {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: #00d4ff;
  margin-bottom: 15px;
  border-bottom: 2px solid #00d4ff;
  display: inline-block;
  padding-bottom: 5px;
}

.result-container .quiz_rules_set {
  list-style-type: disc;
  margin: 0 auto;
  max-width: 600px;
  padding-left: 20px;
  color: #e0e6ed;
  line-height: 1.6;
}

.result-container .quiz_rules_set li {
  margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 600px) {
  .result-container {
    padding: 15px;
  }

  .result-container .winner_img {
    max-width: 150px;
  }

  .result-container .result_box h2,
.result-container .result_box h3 {
    font-size: 18px;
  }

  .result-container .quiz_rules h3 {
    font-size: 18px;
  }
}





/*-------End ----------**/


/*----- End ------*/

/*-------------- End -----------------------*/

@media (max-width: 480px) {
.container {
    padding: 0 10px;
    padding-top: 0px;
}

.quiz-card {
    padding: 5px;
    margin-bottom: 10px;
}

.logo {
    font-size: 1.8rem;
}

.question {
    font-size: 1.1rem;
}

.option {
    padding: 12px 15px;
    font-size: 0.9rem;
    min-height: 45px;
}

.options {
    gap: 10px;
}

.score-display {
    font-size: 1.1rem;
}

.score-number {
    font-size: 1.8rem;
}
}


/* --- Quiz category css -----------------*/
.quiz-category {
  position: relative;
}

.quiz-category .sidebar {
  position: absolute;
  left: -10px;
  top: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  transition: left 0.3s ease;
  z-index: 1000;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  display: none;
}

.quiz-category .sidebar.open {
  left: -10px;
  display: block;
}

.quiz-category .sidebar-header {
  padding: 25px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-category .sidebar-header h2 {
  color: #fff;
  font-size: 24px;
  margin-bottom: 5px;
}

.quiz-category .sidebar-header p {
  color: #a0a0a0;
  font-size: 14px;
}

.quiz-category .sidebar-menu {
  padding: 20px 0;
}

.quiz-category .menu-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.quiz-category .menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #667eea;
}

.quiz-category .menu-item-icon {
  font-size: 24px;
  margin-right: 15px;
  width: 30px;
  text-align: center;
}

.quiz-category .menu-item-text {
  font-size: 16px;
}

.quiz-category .sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-category .sidebar-footer .menu-item {
  padding: 10px;
}

.quiz-category .overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.quiz-category .overlay.active {
  opacity: 1;
  visibility: visible;
}

.quiz-category .top-bar {
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  z-index: 100;
}

.quiz-category .menu-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-category .menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.quiz-category .logo {
  color: white;
  font-size: 28px;
  font-weight: bold;
  -webkit-text-fill-color: #ffb540;
  letter-spacing: 1px;
  margin: 0;
  color: #ffb540;
}

.quiz-category .coins {
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 20px;
  border-radius: 25px;
  border: 2px solid #ffb540;
  color: white;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quiz-category .category-bar {
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 99;
}

.quiz-category .arrow {
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.quiz-category .arrow:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.quiz-category .category-scroll {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.quiz-category .category-scroll::-webkit-scrollbar {
  display: none;
}

.quiz-category .category-tabs {
  display: flex;
  gap: 10px;
  padding: 0 5px;
}

.quiz-category .tab {
  background: #f0f0f0;
  border: none;
  padding: 5px 5px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  transition: all 0.3s ease;
  color: #555;
}

.quiz-category .tab:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.quiz-category .tab.active {
  background: #ffb540;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.quiz-category .quiz-list {
  padding: 10px;
  max-width: 100%;
  margin: 0 auto;
}

.quiz-category span#coin-count {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.quiz-category span#coin-count img {
  width: 15px;
  height: auto;
}

.quiz-category .quiz-card {
  background: transparent;
  border: 1px solid hsla(0, 0%, 68%, .6);
  border-radius: 20px;
  padding: 15px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

.quiz-category .quiz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: #ffb540;
}

.quiz-category .quiz-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.quiz-category .quiz-card-icon {
  width: 80px;
  height: 80px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quiz-category .details {
  flex: 1;
}

.quiz-category .category {
  color: #ffb540;
  font-size: 10px;
  line-height: 22px;
  font-weight: 600;
  margin-bottom: 0;
  text-transform: uppercase;
}

.quiz-category .details h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 700;
}

.quiz-category .entry-fee {
  font-size: 13px;
  background: hsla(0, 0%, 50%, .259);
  display: flex;
  padding: 2px 7px;
  margin-top: 7px;
  border-radius: 50px;
  align-items: center;
  max-width: -moz-fit-content;
  max-width: fit-content;
  gap: 5px;
}

.quiz-category .play-btn {
  background: #ffb540;
  color: white;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  flex-shrink: 0;
  position: relative;
}

svg.play_icon {
  position: absolute;
  left: 34%;
}

.quiz-category .play-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

@media (max-width: 768px) {
  .quiz-category .logo {
    font-size: 22px;
  }

  .quiz-category .coins {
    padding: 8px 15px;
    font-size: 16px;
  }

  .quiz-category .quiz-card {
    flex-direction: row;
    text-align: center;
  }

  .quiz-category .quiz-card::before {
    width: 100%;
    height: 5px;
  }

  .quiz-category .quiz-card-icon {
    width: 70px;
    height: 70px;
    font-size: 35px;
  }

  .quiz-category .play-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

.close-sidebar-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 28px;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}
button#closeSidebar {
    position: absolute;
    top: 20px;
    right: 10px;
}
.quiz-card {
  cursor: pointer;
}
/*----------------   End ---------------*/


/*----------- Quiz play game -----------------*/

 .quiz-wrapper {
  background: #1e293b;
  border-radius: 10px;
  width: 450px;
  margin: 0 auto;
  max-width: 100%;
  text-align: center;
  padding: 20px;
  position: relative;
}

#play-quiz-wrapper .quiz-wrapper h2 {
  color: #f59e0b;
  font-size: 18px;
  margin-bottom: 6px;
}

#play-quiz-wrapper .quiz-wrapper h3 {
  font-size: 14px;
  font-weight: normal;
  color: #d1d5db;
  margin: 0 0 15px;
}

/* Score circles */
#play-quiz-wrapper .scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#play-quiz-wrapper .score-circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 18px;
}

#play-quiz-wrapper .correct {
  background: #16a34a;
}

#play-quiz-wrapper .wrong {
  background: #dc2626;
}

/* Timer */
#play-quiz-wrapper .timer {
  border: 4px solid #f59e0b;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  line-height: 62px;
  color: #fbbf24;
  font-weight: bold;
  font-size: 18px;
  margin: 10px auto;
}

#play-quiz-wrapper .question-box {
  background: #334155;
  padding: 20px;
  border-radius: 10px;
  margin-top: 15px;
}

#play-quiz-wrapper .question-count {
  background: #111827;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #fff;
  margin-bottom: 10px;
}

#play-quiz-wrapper .question-text {
  font-size: 16px;
  margin-bottom: 15px;
}

#play-quiz-wrapper .options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#play-quiz-wrapper .option {
  background: #1e293b;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: 0.2s;
}

#play-quiz-wrapper .option:hover {
  background: #475569;
}

#play-quiz-wrapper .option.correct {
  background: #16a34a !important;
}

#play-quiz-wrapper .option.wrong {
  background: #dc2626 !important;
}

#play-quiz-wrapper .score-text {
  margin-top: 15px;
  color: #fbbf24;
  font-weight: bold;
}

#play-quiz-wrapper .close-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #fff;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}


#pageLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.35);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* === Hidden state after load === */
#pageLoader.hidden {
  opacity: 0;
  visibility: hidden;
}
.ads-label {
    font-size: 12px;
    color: #fff;
    margin-top: 5px;
    text-transform: uppercase;
}
/* === Spinner === */
.loader {
  width: 45px;
  height: 45px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #fbbf24; /* yellow accent */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



@media (max-width: 768px) {
    .popup-box {
        padding: 9px;
        width: 97%;
    }
}



/*-------------- End -----------------*/

/* Available to screen readers and crawlers, invisible on screen. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* QuizMaster light theme overrides. */
:root {
  color-scheme: light;
  --page: #f5f7fb;
  --paper: #ffffff;
  --ink: #18263e;
  --muted: #53617a;
  --line: #dbe2ed;
  --blue: #1645a3;
  --blue-dark: #103782;
  --blue-wash: #eaf0ff;
  --gold-wash: #fff3d9;
  --gold-ink: #704600;
  --success: #086845;
  --success-wash: #e0f5eb;
  --error: #a32d3d;
  --error-wash: #fde8eb;
  --shadow: 0 18px 45px rgba(28, 45, 75, .08);
}

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #e9efff 0, transparent 28rem), var(--page);
  font-family: 'Poppins', system-ui, sans-serif;
}
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #be7621 !important; outline-offset: 3px; }

.container {
  width: min(100%, 450px);
  max-width: 450px !important;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 14px 24px;
  background: var(--page);
  box-shadow: 0 0 36px rgba(28, 45, 75, .08);
}
.page-shell .quiz-card { width: calc(100% - 16px); padding: 22px 16px !important; }
.page-shell .footer-links { width: calc(100% - 16px); gap: 10px 16px; }
.page-content { padding: 20px 0 12px; }

.site-header, .quiz-category .top-bar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}
.site-brand, .quiz-category .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.2;
  white-space: nowrap;
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}
.site-brand::before, .quiz-category .logo::before {
  content: 'Q';
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 1.35rem;
  letter-spacing: -.06em;
}
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: 10px;
  color: var(--ink);
  font-size: .85rem;
  font-weight: 600;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--blue-wash); color: var(--blue); }
.site-nav .nav-primary { background: var(--blue); color: #fff; }
.site-nav .nav-primary:hover { background: var(--blue-dark); color: #fff; }
.ads-container { margin: 20px auto; }
.ads-label, #adsPopup .ads-label { color: #5d6b80; font-size: .72rem; letter-spacing: .08em; }
.ads:has(ins:empty) { box-shadow: none; }
.sponsored-area { display: flex; flex-direction: column; max-width: 900px; min-height: 280px; margin: 16px auto 18px; text-align: center; }
.sponsored-area ins { width: 100%; min-height: 250px; }
.sponsored-area .ads-label { margin: auto 0 0; color: var(--muted); }

.quiz-card, .quiz-wrapper, .result-container .result_box, .result-container .quiz_rules,
.bottom-content .featured-section, .bottom-content .how-to-play, .bottom-content .fact_box {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.quiz-card { max-width: 760px; margin: 22px auto 16px; padding: 20px 12px; cursor: default; }
.question-counter, #questionCounter, #play-quiz-wrapper .question-count {
  display: inline-flex;
  align-items: center;
  align-self: center;
  width: auto;
  max-width: none;
  margin: 0 0 12px;
  padding: 7px 14px;
  position: static;
  transform: none;
  border: 1px solid #cbd9f5;
  border-radius: 999px;
  background: var(--blue-wash);
  color: var(--blue-dark);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: 1;
}
#quizCard > #questionCounter { display: flex; width: max-content; margin: 0 auto 12px; }
.question { margin: 0 0 20px; color: var(--ink); font-size: 1.2rem; font-weight: 700; line-height: 1.3; text-align: center; }
.options, #play-quiz-wrapper .options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 26px; }
.option, #optionsContainer .option, #play-quiz-wrapper .option {
  min-width: 0;
  height: auto;
  padding: 15px 18px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.option::before { display: none; }
.option:hover, #optionsContainer .option:hover, #play-quiz-wrapper .option:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  background: #f5f8ff;
  box-shadow: 0 5px 16px rgba(20, 69, 163, .1);
}
.option.selected, #optionsContainer .option.selected { background: var(--blue-wash); border-color: var(--blue); color: var(--blue-dark); box-shadow: none; }
.option.correct, #optionsContainer .option.correct, #play-quiz-wrapper .option.correct {
  background: var(--success-wash) !important;
  border-color: var(--success) !important;
  color: var(--success) !important;
  box-shadow: none;
}
.option.wrong, #optionsContainer .option.wrong, #play-quiz-wrapper .option.wrong {
  background: var(--error-wash) !important;
  border-color: var(--error) !important;
  color: var(--error) !important;
  box-shadow: none;
}
.option:disabled { cursor: default; }
.progress-bar { height: 8px; margin: 0; background: #e7ebf3; border-radius: 999px; }
.progress-fill { background: var(--blue); border-radius: inherit; }
.answer-feedback { margin: 16px 0; padding: 14px 16px; border: 1px solid #cbd9f5; border-radius: 12px; background: var(--blue-wash); color: var(--blue-dark); font-size: .9rem; line-height: 1.6; }
.score-number, .stat-number, .result-title { color: var(--blue); }
.stat-item { background: var(--blue-wash); border: 1px solid #d9e3fa; box-shadow: none; }
.restart-btn, .next-btn { background: var(--blue); color: #fff; border: 0; border-radius: 12px; }

.bottom-content { max-width: 900px; display: grid; gap: 16px; }
.bottom-content .featured-section, .bottom-content .how-to-play, .bottom-content .fact_box { padding: 20px; margin: 0; }
.bottom-content .featured-section h2, .bottom-content .featured-section h3,
.bottom-content .how-to-play h2, .bottom-content .how-to-play h3,
.bottom-content .fact_box h3, .bottom-content .fact_box h4 { color: var(--ink); text-align: left; font-weight: 700; }
.bottom-content .featured-section h2, .bottom-content .how-to-play h2 { font-size: 1.15rem; }
.bottom-content .features-grid { grid-template-columns: 1fr; }
.bottom-content .feature-item { background: #f6f8fc; border: 1px solid #e8edf5; border-radius: 14px; color: var(--ink); box-shadow: none; text-align: left; }
.bottom-content .feature-item h3, .bottom-content .feature-item h4, .bottom-content .feature-item h5 { color: var(--ink); text-align: left; }
.bottom-content .feature-item p, .bottom-content .play-steps li { color: var(--muted); }
.bottom-content .fact_box { background: var(--gold-wash); border-color: #f1d9a8; text-align: left; box-shadow: none; }
.bottom-content .fact_box h3 { color: var(--gold-ink); }
.bottom-content.home-content .featured-section h2,
.bottom-content.home-content .feature-item,
.bottom-content.home-content .feature-item h3,
.bottom-content.home-content .fact_box,
.bottom-content.home-content .fact_box h3 { text-align: center; }
.bottom-content.play-content .featured-section h2,
.bottom-content.play-content .feature-item,
.bottom-content.play-content .feature-item h3,
.bottom-content.play-content .fact_box,
.bottom-content.play-content .fact_box h3,
.bottom-content.play-content .how-to-play h2 { text-align: center; }
.bottom-content.play-content .play-steps { list-style-position: inside; padding-left: 0; text-align: center; }
.bottom-content.play-content .play-steps li { padding-left: 0; }
.bottom-content .play-steps { list-style: decimal; padding-left: 24px; }
.bottom-content .play-steps li { padding-left: 5px; }

.footer-links, .page-footer, .page-shell .footer-links {
  width: 100%;
  margin: 36px auto 0 !important;
  padding: 18px 0 0 !important;
  border-top: 1px solid var(--line);
  gap: 4px 8px;
  font-size: .8rem;
}
.footer-links a, .page-footer a, .page-shell .footer-links a { color: var(--muted); margin: 0 !important; border-radius: 8px; }
.footer-links a:hover, .page-footer a:hover { color: var(--blue); background: var(--blue-wash); text-decoration: none; }

.quiz-category .top-bar { margin: 0 0 24px; padding: 12px 0; }
.category-intro { margin: 24px 0; padding: 22px; border-radius: 20px; background: linear-gradient(120deg, var(--blue-wash), #fff); border: 1px solid #d8e3fa; }
.category-intro .eyebrow { margin-bottom: 6px; color: var(--blue); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.category-intro h2 { color: var(--ink); font-size: 1.5rem; font-weight: 700; }
.category-intro p { max-width: 720px; margin-top: 10px; color: var(--muted); line-height: 1.6; }
.quiz-category .menu-btn, .quiz-category .arrow, .close-sidebar-btn {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--line);
  box-shadow: none;
}
.quiz-category .menu-btn:hover, .quiz-category .arrow:hover, .close-sidebar-btn:hover { background: var(--blue-wash); }
.quiz-category .logo { flex: 1; margin: 0; color: var(--ink); -webkit-text-fill-color: currentColor; }
.quiz-category .coins { background: var(--gold-wash); color: var(--gold-ink); border: 1px solid #efd39b; box-shadow: none; }
.quiz-category .category-bar { gap: 10px; margin: 20px 0 8px; padding: 0; box-shadow: none; }
.quiz-category .arrow { border-radius: 12px; }
.quiz-category .category-tabs { gap: 8px; padding: 4px; }
.quiz-category .tab { min-height: 40px; padding: 8px 14px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.quiz-category .tab:hover { background: var(--blue-wash); color: var(--blue); }
.quiz-category .tab.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: none; }
.quiz-category .quiz-list { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 10px 0; }
.quiz-category .quiz-card { max-width: none; min-height: 136px; margin: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 20px rgba(28, 45, 75, .05); cursor: pointer; }
.quiz-category .quiz-card::before { width: 4px; height: 100%; background: var(--blue); }
.quiz-category .quiz-card:hover { transform: translateY(-3px); border-color: #a7bae4; box-shadow: var(--shadow); }
.quiz-category .quiz-card-icon { width: 58px; height: 58px; border-radius: 16px; background: var(--blue-wash); box-shadow: none; font-size: 1.8rem; }
.quiz-category .category { color: var(--blue); font-size: .7rem; line-height: 1.5; }
.quiz-category .details h3 { margin: 6px 0; color: var(--ink); font-size: 1.05rem; line-height: 1.35; }
.quiz-category .quiz-card-summary { margin: 2px 0 9px; color: var(--muted); font-size: .77rem; line-height: 1.45; }
.quiz-category .entry-fee { background: var(--gold-wash); color: var(--gold-ink); font-weight: 600; }
.quiz-category .play-btn { width: 46px; height: 46px; background: var(--blue); color: #fff; font-size: 20px; box-shadow: none; }
.quiz-category .play-btn:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(22, 69, 163, .22); }
.quiz-category .sidebar { position: fixed; left: -300px; top: 0; height: 100dvh; background: #fff; color: var(--ink); border-right: 1px solid var(--line); box-shadow: var(--shadow); display: block; visibility: hidden; }
.quiz-category .sidebar.open { left: 0; visibility: visible; }
.quiz-category .sidebar-header { background: var(--blue-wash); border-color: var(--line); }
.quiz-category .sidebar-header h2, .quiz-category .menu-item { color: var(--ink); }
.quiz-category .sidebar-header p { color: var(--muted); }
.quiz-category .menu-item:hover { background: var(--blue-wash); border-left-color: var(--blue); }
.quiz-category .menu-item a { display: flex; align-items: center; width: 100%; color: var(--ink); }
.quiz-category .sidebar-footer { position: static; background: #f6f8fc; border-color: var(--line); }

.quiz-wrapper { width: min(100%, 760px); max-width: 760px; padding: 20px 16px; }
.quiz-wrapper h2, .quiz-wrapper h3 { color: var(--ink); }
#quizCategoryTitle { font-size: 1.3rem; font-weight: 700; }
.quiz-wrapper .category-description { margin: 8px auto 0; max-width: 570px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.quiz-wrapper > h3 { color: var(--gold-ink); }
.quiz-wrapper .reward-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 18px; color: var(--gold-ink); font-size: .9rem; font-weight: 600; }
#play-quiz-wrapper .scoreboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; width: 100%; gap: 0; margin: 22px 0; }
.score-metric { display: grid; justify-items: center; gap: 8px; min-width: 68px; }
#play-quiz-wrapper .score-metric { min-width: 0; }
.score-metric > span { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
#play-quiz-wrapper .score-circle { width: 46px; height: 46px; }
#play-quiz-wrapper .correct { background: var(--success-wash); color: var(--success); border: 1px solid #aad9c3; }
#play-quiz-wrapper .wrong { background: var(--error-wash); color: var(--error); border: 1px solid #f0b7bd; }
#play-quiz-wrapper .timer { width: 78px; height: 78px; display: grid; place-items: center; margin: 0; line-height: 1; color: var(--blue); border-color: var(--blue); background: var(--blue-wash); }
#play-quiz-wrapper .question-box { padding: 18px; background: #f7f9fd; border: 1px solid var(--line); border-radius: 16px; }
#play-quiz-wrapper .question-text { margin-bottom: 22px; color: var(--ink); font-size: 1.12rem; font-weight: 700; line-height: 1.45; }
#play-quiz-wrapper .score-text { color: var(--blue); font-weight: 700; }

.result-container { max-width: 760px; margin: 32px auto 0; padding: 0; background: transparent; color: var(--ink); }
.result-container .result_box { padding: 30px; margin: 0 0 16px; }
.result-container .winner_img { max-width: 150px; }
.result-container .result_box h2, .result-container .result_box h3 { color: var(--ink); font-size: 1.4rem; }
.result-container .coin_set { color: var(--blue); }
.result-container .play_now_btn, .page-content .back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 12px;
  padding: 10px 22px;
  background: var(--blue);
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: none;
}
.result-container .play_now_btn:hover, .page-content .back-home:hover { background: var(--blue-dark); color: #fff; }
.result-container .open-reward-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin: 12px 0 0 10px; padding: 10px 20px; border: 1px solid #adc3ee; border-radius: 12px; background: var(--blue-wash); color: var(--blue-dark); font-weight: 700; }
.result-container .open-reward-btn:hover { background: #dae7ff; }
.result-container .quiz_rules { padding: 28px; }
.result-container .quiz_rules h3 { color: var(--ink); border-color: var(--blue); font-size: 18px; }
.result-container .quiz_rules_set { color: var(--muted); }

/* Both reward dialogs share one native modal layout and keyboard behavior. */
.quiz-modal { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 8px; border: 0; background: transparent; overflow-y: auto; }
.quiz-modal[open] { display: flex; align-items: center; justify-content: center; }
.quiz-modal::backdrop { background: rgba(14, 27, 49, .68); backdrop-filter: blur(4px); }
.popup-box, .show_modal .modal_body, .ads-popup {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(10, 25, 50, .25);
}
.quiz-modal .popup-box { width: min(100%, 440px); max-width: 440px; max-height: calc(100dvh - 32px); margin: auto; padding: 24px; overflow-y: auto; animation: none; }
.quiz-modal .popup-box img { width: 96px; height: 96px; margin: 4px auto 12px; animation: coinFloat 2.8s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(167, 101, 0, .2)); }
@keyframes coinFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-9px) rotate(5deg); }
}
#coinAlert .reward-coin { display: block; width: 112px; height: 112px; margin: 2px auto 14px; object-fit: contain; }
.quiz-modal .popup-title { margin: 8px 0; font-size: 1.5rem; font-weight: 700; }
.quiz-modal .popup-message, .quiz-modal .popup-box p { margin-bottom: 14px; line-height: 1.55; }
.quiz-modal .reward-highlight { margin: 18px 0; padding: 14px 16px; border: 1px solid #efd39b; border-radius: 12px; background: var(--gold-wash); }
.quiz-modal .reward-highlight p { margin: 0; font-size: .9rem; }
.quiz-modal .watch-btn-wrapper { max-width: 320px; margin: 0 auto; }
.quiz-modal .close-btn { top: 10px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 1.45rem; }
.quiz-modal .close-btn:hover { background: var(--blue-wash); color: var(--blue-dark) !important; }
.popup-box .get-coins, .popup-title { color: var(--ink) !important; }
.popup-box .new-reward { color: var(--gold-ink); }
.popup-box p, body .popup-message { color: var(--muted) !important; }
.popup-box .reward-text { color: var(--gold-ink) !important; }
.quiz-modal .reward-status { max-width: 320px; min-height: 0; margin: 12px auto 0 !important; color: var(--muted) !important; font-size: .8rem; line-height: 1.45; }
.quiz-modal .reward-status:empty { display: none; }
.popup-box .close-btn, body .skip-btn { color: var(--muted) !important; }
.claim-button, .watch-btn, .btn.watch-btn {
  min-height: 48px;
  padding: 12px 18px;
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  box-shadow: none;
}
.claim-button:hover, .watch-btn:hover { background: var(--blue-dark); box-shadow: none; }
.quiz-modal .skip-btn { display: flex; align-items: center; justify-content: center; width: min(100%, 320px); min-height: 44px; margin: 6px auto 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue-dark) !important; font-weight: 600; }
.quiz-modal .skip-btn:hover { background: var(--blue-wash); }
.watch-btn-wrapper > .ad-tag { color: var(--muted); text-shadow: none; }
.ads-popup-overlay { background: rgba(14, 27, 49, .62); }
.ads-close-btn { background: var(--blue); opacity: 1; }
#pageLoader { background: rgba(245, 247, 251, .74); }
.loader { border-color: #d7e1f2; border-top-color: var(--blue); }

.page-shell .quiz-card { margin-top: 0; }
.page-shell .quiz-card h2 { color: var(--ink); font-weight: 700; }
.page-shell .quiz-card h3, .page-shell .quiz-card h4 { color: var(--blue-dark); font-weight: 700; }
.page-shell .quiz-card h3 { font-size: 1.05rem; }
.page-shell .quiz-card h4 { font-size: .98rem; }
.page-shell .quiz-card p, .page-shell .quiz-card li { color: var(--ink); }
.page-shell .quiz-card a:not(.back-home) { color: var(--blue); text-decoration: underline; }
.page-shell .quiz-card a:not(.back-home):hover { color: var(--blue-dark); }
.round-summary { max-width: 760px; margin: 24px auto; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.round-summary .eyebrow { color: var(--blue); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.round-summary h2 { margin: 6px 0; font-size: 1.4rem; font-weight: 700; }
.round-summary > p:not(.eyebrow) { color: var(--muted); }
.round-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.round-metrics div { display: grid; gap: 4px; padding: 18px; border-radius: 12px; background: var(--blue-wash); text-align: center; }
.round-metrics strong { color: var(--blue-dark); font-size: 1.3rem; }
.round-metrics span { color: var(--muted); font-size: .8rem; }
.round-replay { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }

/* Keep the phone layout inside the 450px canvas at every browser width. */
.site-header, .quiz-category .top-bar { min-height: 52px; }
.site-header { flex-wrap: wrap; justify-content: center; padding: 12px 0; }
.site-brand::before, .quiz-category .logo::before { width: 32px; height: 32px; font-size: 1.1rem; }
.site-nav { width: 100%; justify-content: center; gap: 2px; }
.site-nav a { padding: 8px 10px; font-size: .75rem; }
.quiz-category .top-bar { gap: 8px; }
.quiz-category .logo { font-size: 1rem; gap: 6px; }
.quiz-category .coins { padding: 7px; font-size: .8rem; }
.quiz-category .quiz-card { flex-direction: row; text-align: left; padding: 14px; }
.quiz-category .quiz-card-icon { width: 48px; height: 48px; font-size: 1.5rem; }
.quiz-category .play-btn { width: 40px; height: 40px; }
.option, #optionsContainer .option, #play-quiz-wrapper .option { padding: 12px 10px; font-size: .85rem; }

/* Follow the visitor's system color setting while keeping the same layout. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101827;
  --paper: #1a2638;
  --ink: #f3f6fd;
  --muted: #b8c7dc;
  --line: #425671;
  --blue: #a9c7ff;
  --blue-dark: #d2e0ff;
  --blue-wash: #263a59;
  --gold-wash: #3c2d16;
  --gold-ink: #f6cf83;
  --success: #9ce2bd;
  --success-wash: #15392d;
  --error: #ffb5c1;
  --error-wash: #402634;
  --shadow: 0 18px 45px rgba(0, 0, 0, .22);
}
[data-theme="dark"] body { background: radial-gradient(circle at 10% 0%, #1a2a47 0, transparent 28rem), var(--page); }
[data-theme="dark"] .container { box-shadow: 0 0 36px rgba(0, 0, 0, .25); }
[data-theme="dark"] .site-brand::before,
[data-theme="dark"] .quiz-category .logo::before,
[data-theme="dark"] .site-nav .nav-primary,
[data-theme="dark"] .quiz-category .tab.active,
[data-theme="dark"] .quiz-category .play-btn,
[data-theme="dark"] .result-container .play_now_btn,
[data-theme="dark"] .page-content .back-home,
[data-theme="dark"] .restart-btn,
[data-theme="dark"] .next-btn,
[data-theme="dark"] .progress-fill,
[data-theme="dark"] .ads-close-btn { background: #2554ad; color: #fff; }
[data-theme="dark"] .claim-button:not([data-loading="true"]),
[data-theme="dark"] .watch-btn:not([data-loading="true"]),
[data-theme="dark"] .btn.watch-btn:not([data-loading="true"]) { background: #2554ad; color: #fff; }
[data-theme="dark"] .site-nav .nav-primary:hover,
[data-theme="dark"] .result-container .play_now_btn:hover,
[data-theme="dark"] .page-content .back-home:hover,
[data-theme="dark"] .claim-button:not([data-loading="true"]):hover,
[data-theme="dark"] .watch-btn:not([data-loading="true"]):hover { background: #1d4289; color: #fff; }
[data-theme="dark"] .option,
[data-theme="dark"] #optionsContainer .option,
[data-theme="dark"] #play-quiz-wrapper .option,
[data-theme="dark"] .quiz-category .menu-btn,
[data-theme="dark"] .quiz-category .arrow,
[data-theme="dark"] .close-sidebar-btn,
[data-theme="dark"] .quiz-category .tab,
[data-theme="dark"] .quiz-category .quiz-card,
[data-theme="dark"] .quiz-category .sidebar,
[data-theme="dark"] .quiz-modal .popup-box,
[data-theme="dark"] .ads-popup,
[data-theme="dark"] .quiz-modal .skip-btn,
[data-theme="dark"] .round-summary { background: var(--paper); color: var(--ink); }
[data-theme="dark"] .show_modal .modal_body { background-color: var(--paper); color: var(--ink); }
[data-theme="dark"] .show_modal .modal_body .modal_content h3 { color: var(--ink); }
[data-theme="dark"] .show_modal .modal_body .close_modal_btn { color: var(--ink); }
[data-theme="dark"] .option:hover,
[data-theme="dark"] #optionsContainer .option:hover,
[data-theme="dark"] #play-quiz-wrapper .option:hover { background: var(--blue-wash); }
[data-theme="dark"] .progress-bar { background: var(--line); }
[data-theme="dark"] .bottom-content .feature-item,
[data-theme="dark"] .quiz-category .sidebar-footer,
[data-theme="dark"] #play-quiz-wrapper .question-box { background: #213149; border-color: var(--line); }
[data-theme="dark"] .bottom-content .fact_box { background: var(--gold-wash); border-color: #755b2b; }
[data-theme="dark"] .category-intro { background: linear-gradient(120deg, var(--blue-wash), var(--paper)); border-color: var(--line); }
[data-theme="dark"] .quiz-category .coins,
[data-theme="dark"] .quiz-modal .reward-highlight { border-color: #755b2b; }
[data-theme="dark"] .quiz-category .menu-btn:hover,
[data-theme="dark"] .quiz-category .arrow:hover,
[data-theme="dark"] .close-sidebar-btn:hover,
[data-theme="dark"] .quiz-category .tab:hover,
[data-theme="dark"] .quiz-modal .skip-btn:hover { background: var(--blue-wash); color: var(--blue-dark); }
[data-theme="dark"] .quiz-category .tab.active:hover { background: #1d4289; color: #fff; }
[data-theme="dark"] .quiz-category .quiz-card:hover { border-color: var(--blue); }
[data-theme="dark"] .question-counter,
[data-theme="dark"] #questionCounter,
[data-theme="dark"] #play-quiz-wrapper .question-count,
[data-theme="dark"] .answer-feedback,
[data-theme="dark"] .stat-item { border-color: var(--line); }
[data-theme="dark"] .result-container .open-reward-btn { border-color: var(--line); }
[data-theme="dark"] .result-container .open-reward-btn:hover { background: #36517a; }
[data-theme="dark"] .quiz-modal .skip-btn { border-color: var(--line); color: var(--blue-dark) !important; }
[data-theme="dark"] #play-quiz-wrapper .score-circle.correct { border-color: var(--success); }
[data-theme="dark"] #play-quiz-wrapper .score-circle.wrong { border-color: var(--error); }
[data-theme="dark"] .ads-label,
[data-theme="dark"] #adsPopup .ads-label,
[data-theme="dark"] .ads-loading { color: var(--muted); }
[data-theme="dark"] #custom-interstitial-popup .ads-label,
[data-theme="dark"] div#count-down-wrap { color: var(--ink) !important; }
[data-theme="dark"] #pageLoader { background: rgba(16, 24, 39, .78); }
[data-theme="dark"] .loader { border-color: var(--line); border-top-color: var(--blue); }

@media (max-width: 370px) {
  .quiz-category .top-bar { flex-wrap: wrap; gap: 4px; padding-inline: 2px; }
  .quiz-category .menu-btn { width: 40px; height: 40px; flex: none; }
  .quiz-category .logo { flex: 1 1 100px; min-width: 100px; font-size: .82rem; gap: 4px; }
  .quiz-category .logo::before { width: 28px; height: 28px; font-size: 1rem; }
  .quiz-category .coins { padding: 5px; font-size: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
