:root {
  --night: #1b2a4a;
  --night-deep: #121d34;
  --parchment: #f2e8d5;
  --pomegranate: #b23a2e;
  --saffron: #d9a02c;
  --walnut: #2b1b12;
  --olive: #6b7a3a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--night);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(217,160,44,0.08), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(178,58,46,0.10), transparent 45%);
  font-family: 'Noto Sans Arabic', sans-serif;
  color: var(--walnut);
  padding: 32px 16px;
}

.xane {
  max-width: 560px;
  margin: 0 auto;
}

.xane__frame {
  background:
    repeating-linear-gradient(45deg, rgba(178,58,46,0.05) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(-45deg, rgba(107,122,58,0.05) 0 2px, transparent 2px 22px),
    var(--parchment);
  border-radius: 4px;
  padding: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
}

.xane__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  padding: 6px;
  background:
    repeating-linear-gradient(45deg, var(--pomegranate) 0 8px, var(--saffron) 8px 16px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.xane__hero {
  position: relative;
  min-height: 300px;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.xane__hero--sm { min-height: 160px; align-items: center; }

.xane__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.xane__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,15,30,0.15) 0%, rgba(10,15,30,0.55) 55%, rgba(10,15,30,0.92) 100%);
}

.xane__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 24px 22px;
  width: 100%;
}

.xane__eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--saffron);
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.xane__title {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-weight: 900;
  font-size: 38px;
  margin: 0;
  color: #fff;
  text-shadow: 0 3px 14px rgba(0,0,0,0.7);
}

.xane__sub {
  color: #f0e6d2;
  font-size: 14px;
  margin: 10px 0 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.kilim-divider {
  height: 14px;
  margin: 16px 28px 0;
  background: repeating-linear-gradient(
    -45deg, var(--saffron) 0 7px, transparent 7px 14px
  ),
  repeating-linear-gradient(
    45deg, var(--pomegranate) 0 7px, transparent 7px 14px
  );
  opacity: 0.85;
}

.xane__banner {
  margin: 20px 28px 0;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.xane__banner--ok   { background: rgba(107,122,58,0.15); color: var(--olive); }
.xane__banner--no    { background: rgba(178,58,46,0.12); color: var(--pomegranate); }
.xane__banner--warn { background: rgba(217,160,44,0.18); color: #8a6413; }

.xane__closed {
  text-align: center;
  padding: 5px 50px 80px;
  color: #6b5a49;
}
.xane__closed-sub { font-size: 13px; color: #8a7a68; }

.xane__winnerbadge {
  margin: 18px 28px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(155deg, var(--night) 0%, var(--night-deep) 100%);
  border: 1px solid rgba(217,160,44,0.5);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}
.xane__winnerbadge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(217,160,44,0.05) 0 6px, transparent 6px 16px);
  pointer-events: none;
}
.xane__winnerbadge-medal {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe6a3, var(--saffron) 65%, #a8730f);
  border: 2px solid #fff3cf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  animation: xane-bounce 1.6s ease-in-out infinite;
  z-index: 1;
}
.xane__winnerbadge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1;
  text-align: right;
}
.xane__winnerbadge-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--saffron);
  text-transform: uppercase;
}
.xane__winnerbadge-name {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
}
.xane__winnerbadge-sub {
  font-size: 11.5px;
  color: #cbb98f;
}

.xane__roundlabel {
  margin: 16px 28px 0;
  text-align: center;
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--night);
}

/* ژمارەی بەدواداچوونی کرانەوە */
.xane__countdown {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: -10px;
}
.xane__countdown-box {
  background: linear-gradient(160deg, var(--night) 0%, var(--night-deep) 100%);
  border: 1px solid rgba(217,160,44,0.35);
  border-radius: 12px;
  padding: 14px 10px 10px;
  min-width: 62px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}
.xane__countdown-box span {
  display: block;
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--saffron);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.xane__countdown-box small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--parchment);
  opacity: 0.75;
}
.xane__countdown-sep {
  align-self: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--saffron);
  opacity: 0.5;
  margin-top: -6px;
}

/* ژمارەرای پرسیار و کاتژمێری هەر پرسیارێک */
.xane__qbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 28px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--night);
}
.xane__qtimer { color: var(--pomegranate); }
.xane__timerTrack {
  margin: 6px 28px 0;
  height: 6px;
  border-radius: 999px;
  background: #e3d6bc;
  overflow: hidden;
}
.xane__timerFill {
  height: 100%;
  background: var(--pomegranate);
  width: 100%;
  transition: width 1s linear;
}

.xane__card {
  padding: 24px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.xane__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.xane__fields input {
  padding: 12px 14px;
  border: 1.5px solid #e3d6bc;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.xane__fields input:focus {
  outline: 2px solid var(--saffron);
  outline-offset: 1px;
}

.xane__submit {
  background: var(--pomegranate);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}
.xane__submit:hover { background: #8f2e24; }
.xane__submit:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

.xane__note {
  text-align: center;
  font-size: 12px;
  color: #9a8a78;
  margin: 0;
}

.xane__formnote {
  color: #5a4a3a;
  font-size: 15px;
  margin: 0 0 4px;
  text-align: center;
}

/* ژمارەی زیندوو */
.xane__live {
  margin: 16px 28px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--night);
  background: rgba(107,122,58,0.12);
  border-radius: 999px;
  padding: 6px 14px;
}

/* لیستی ١٠ پرسیار */
.xane__quiz {
  padding: 20px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.xane__q {
  background: #fff;
  border: 1.5px solid #e3d6bc;
  border-radius: 10px;
  padding: 16px;
  display: none;
}
.xane__q--active { display: block; }

.xane__qnum {
  display: inline-block;
  background: var(--night);
  color: var(--parchment);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.xane__qtext {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--night);
  line-height: 1.5;
}

.xane__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xane__option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fdfbf6;
  border: 1.5px solid #e3d6bc;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.xane__option:has(input:checked) {
  border-color: var(--pomegranate);
  background: rgba(178,58,46,0.06);
}
.xane__option input { accent-color: var(--pomegranate); }

.xane__result {
  text-align: center;
  padding: 24px 28px 40px;
}

/* پیرۆزبایی بۆ براوە */
.xane__celebrate {
  position: relative;
  background: linear-gradient(160deg, #fff8e6 0%, #fdecc8 100%);
  border: 2px solid var(--saffron);
  border-radius: 16px;
  padding: 32px 20px 26px;
  overflow: hidden;
}

.xane__gift {
  font-size: 56px;
  animation: xane-bounce 1.1s ease-in-out infinite;
  display: inline-block;
}

@keyframes xane-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-4deg); }
}

.xane__celebrate-title {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 30px;
  font-weight: 900;
  color: var(--pomegranate);
  margin: 10px 0 6px;
}

.xane__celebrate-text {
  font-size: 15px;
  color: var(--walnut);
  margin: 0;
  position: relative;
  z-index: 1;
}

.xane__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.xane__confetti span {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  animation: xane-fall 2.6s linear infinite;
}
.xane__confetti span:nth-child(1)  { left: 5%;  background: var(--pomegranate); animation-delay: 0s; }
.xane__confetti span:nth-child(2)  { left: 15%; background: var(--saffron);     animation-delay: .3s; }
.xane__confetti span:nth-child(3)  { left: 25%; background: var(--olive);       animation-delay: .6s; }
.xane__confetti span:nth-child(4)  { left: 35%; background: var(--night);      animation-delay: .1s; }
.xane__confetti span:nth-child(5)  { left: 45%; background: var(--saffron);     animation-delay: .8s; }
.xane__confetti span:nth-child(6)  { left: 55%; background: var(--pomegranate); animation-delay: .4s; }
.xane__confetti span:nth-child(7)  { left: 65%; background: var(--olive);       animation-delay: .2s; }
.xane__confetti span:nth-child(8)  { left: 75%; background: var(--saffron);     animation-delay: .9s; }
.xane__confetti span:nth-child(9)  { left: 85%; background: var(--pomegranate); animation-delay: .5s; }
.xane__confetti span:nth-child(10) { left: 95%; background: var(--night);      animation-delay: .7s; }
.xane__confetti span:nth-child(11) { left: 40%; background: var(--pomegranate); animation-delay: 1.1s; }
.xane__confetti span:nth-child(12) { left: 65%; background: var(--saffron);     animation-delay: 1.3s; }

@keyframes xane-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(220px) rotate(280deg); opacity: 0; }
}

@media (max-width: 420px) {
  .xane__title { font-size: 32px; }
  .xane__head, .xane__card, .xane__closed, .xane__quiz, .xane__result { padding-left: 18px; padding-right: 18px; }
}
