:root {
  --bg: #f7f2e8;
  --card: #fffdf8;
  --soft: #efe7d8;
  --ink: #1e2b27;
  --muted: #6c7a74;
  --line: #e4d9c6;
  --green: #2d7566;
  --green-dark: #235d51;
  --green-soft: #e4efe9;
  --gold: #c9973f;
  --silver: #9aa5ad;
  --bronze: #b8743f;
  --danger: #b84a3e;
  --danger-soft: #f8e6e2;
  --radius: 14px;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); line-height: 1.7; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
[hidden] { display: none !important; }

.site-header { position: sticky; top: 0; z-index: 20; background: #f7f2e8e6; backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 104px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; padding-inline-start: 12px; border-inline-start: 1px solid var(--line); line-height: 1.35; }
.brand-text strong { font-size: 14px; font-weight: 700; }
.brand-text span { font-size: 12px; color: var(--green); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 14px; }
.nav a:hover, .nav a.active { background: var(--soft); color: var(--ink); }
.nav .btn { margin-inline-start: 8px; color: #fff; }
.nav .btn:hover { background: var(--green-dark); color: #fff; }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); place-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 12px; border: 1px solid transparent; font-weight: bold; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .2s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-danger { background: var(--danger-soft); border-color: #ecc4bc; color: var(--danger); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: default; }

.hero { padding: 20px 0 26px; }
.banner { position: relative; overflow: hidden; isolation: isolate; min-height: 440px; display: flex; align-items: center; padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 64px); border-radius: 28px; color: #fff; background: radial-gradient(ellipse 60% 70% at 25% 10%, #1f9a7466, transparent 70%), radial-gradient(ellipse 50% 60% at 90% 100%, #0c3d3255, transparent 70%), linear-gradient(180deg, #0f3d33, #0a2b24 55%, #071f1a); box-shadow: 0 24px 60px #0d2f2740; }
.banner::before { content: ""; position: absolute; inset: 0 0 45% 0; z-index: -1; background: linear-gradient(90deg, #7ff0c00a 1px, transparent 1px) 0 0 / 46px 46px, linear-gradient(#7ff0c00a 1px, transparent 1px) 0 0 / 46px 46px; }
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: -1; overflow: hidden; perspective: 280px; perspective-origin: 50% 0; }
.floor::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #4fe0a8aa 20% 80%, transparent); box-shadow: 0 0 22px #4fe0a8; }
.floor-grid { position: absolute; left: -100%; right: -100%; top: 0; height: 260%; transform: rotateX(64deg); transform-origin: top; background: linear-gradient(90deg, #4fe0a838 1px, transparent 1px) 0 0 / 60px 60px, linear-gradient(#4fe0a82e 1px, transparent 1px) 0 0 / 60px 60px; animation: floor 3.5s linear infinite; -webkit-mask-image: linear-gradient(#000, transparent 70%); mask-image: linear-gradient(#000, transparent 70%); }
@keyframes floor { to { background-position: 0 0, 0 60px; } }
.ring { position: absolute; z-index: -1; top: 6%; left: 18%; width: 520px; height: 150px; border-radius: 50%; border: 2px solid #9fe6c84d; box-shadow: 0 0 30px #4fe0a822, inset 0 0 30px #4fe0a81a; transform: rotate(-12deg); animation: ring 10s ease-in-out infinite; }
.ring::after { content: ""; position: absolute; inset: 18px 60px; border-radius: 50%; border: 1px solid #9fe6c82e; }
@keyframes ring { 50% { transform: rotate(-6deg) scale(1.06); opacity: .7; } }
.orb { position: absolute; z-index: -1; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #fff3e0, #ff9a5c 45%, transparent 70%); box-shadow: 0 0 22px 8px #ff8a4d66; animation: orb 8s ease-in-out infinite; }
.orb.green { background: radial-gradient(circle, #f0fff7, #5ff0b4 45%, transparent 70%); box-shadow: 0 0 22px 8px #5ff0b455; }
.o1 { top: 12%; left: 24%; }
.o2 { top: 40%; left: 22%; width: 18px; height: 18px; animation-delay: -2s; }
.o3 { top: 62%; left: 28%; animation-delay: -4s; }
.o4 { top: 26%; left: 32%; width: 10px; height: 10px; background: radial-gradient(circle, #f0fff7, #5ff0b4 45%, transparent 70%); box-shadow: 0 0 22px 8px #5ff0b455; animation-delay: -1s; }
.o5 { top: 70%; left: 8%; width: 8px; height: 8px; animation-delay: -5s; }
.o6 { top: 18%; left: 52%; width: 9px; height: 9px; background: radial-gradient(circle, #f0fff7, #5ff0b4 45%, transparent 70%); box-shadow: 0 0 18px 6px #5ff0b444; animation-delay: -3s; }
@keyframes orb { 0%, 100% { transform: translate(0, 0); opacity: 1; } 50% { transform: translate(14px, -18px); opacity: .55; } }
.hero-row { position: relative; display: flex; align-items: center; gap: clamp(20px, 4vw, 40px); width: 100%; }
.hero-logo { width: 150px; height: 64px; object-fit: contain; flex: none; padding-inline-end: clamp(20px, 4vw, 40px); border-inline-end: 2px solid #5ff0b4aa; box-sizing: content-box; filter: drop-shadow(0 0 18px #5ff0b433); }
.hero-copy { position: relative; }
.pill { display: inline-block; margin: 0 0 16px; padding: 8px 18px; border-radius: 100px; background: #c8f08f; color: #12332a; font-size: 15px; font-weight: 700; box-shadow: 0 6px 20px #c8f08f33; }
.hero h1 { margin: 0; font-size: clamp(38px, 6.5vw, 66px); line-height: 1.2; font-weight: 700; }
.hero h1 span { white-space: nowrap; background: linear-gradient(90deg, #8ef5c9, #3fd69a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 20px #3fd69a55); }
.hero p.lead { margin: 8px 0 0; color: #d8eee4; font-size: clamp(16px, 2.2vw, 20px); }
.countdown { display: flex; gap: 10px; margin-top: 26px; }
.countdown button { position: relative; overflow: hidden; min-width: 82px; padding: 14px 8px 10px; border-radius: 18px; border: 1px solid #ffffff2e; background: linear-gradient(160deg, #ffffff1f, #ffffff08); backdrop-filter: blur(6px); color: #fff; box-shadow: 0 10px 24px #0006, inset 0 1px 0 #ffffff26; cursor: pointer; transition: transform .15s ease, box-shadow .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.countdown button:hover { transform: translateY(-3px); border-color: #5ff0b488; box-shadow: 0 14px 30px #0007, 0 0 24px #5ff0b433; }
.countdown button:active, .countdown button.pressed { transform: scale(.9); box-shadow: 0 4px 12px #0006, 0 0 30px #5ff0b466; }
.countdown strong { display: block; font-size: 32px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown strong.tick { animation: tick .4s ease; }
@keyframes tick { 0% { transform: translateY(-40%); opacity: 0; } 100% { transform: none; opacity: 1; } }
.countdown span { font-size: 12px; color: #bfe3d3; }
.ripple { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #5ff0b466; transform: translate(-50%, -50%) scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(22); opacity: 0; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn-mint { position: relative; overflow: hidden; background: linear-gradient(135deg, #8ef5c9, #3fd69a); color: #0b2b24; box-shadow: 0 10px 26px #3fd69a44; }
.btn-mint::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, #ffffff8c 50%, transparent 65%); transform: translateX(-120%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 60%, 100% { transform: translateX(120%); } }
.btn-mint:hover { filter: brightness(1.06); }
.btn-glass { background: #ffffff12; border-color: #ffffff38; color: #fff; }
.btn-glass:hover { background: #ffffff22; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 6px 14px; border-radius: 100px; font-size: 13px; background: #ffffff12; border: 1px solid #ffffff26; color: #d8eee4; }
.status-pill.closed { color: #ffd6cf; }
.code-chip { position: absolute; left: clamp(20px, 4vw, 56px); bottom: 26px; padding: 10px 18px; border-radius: 12px; border: 1px solid #c8f08f55; background: #0a2b24cc; color: #c8f08f; font: 600 15px/1.4 monospace; direction: ltr; animation: orb 9s ease-in-out infinite; }
.code-chip b { color: #8ef5c9; font-weight: normal; }


.section { padding: 40px 0 60px; }
.section-head { max-width: 620px; margin: 0 auto 26px; text-align: center; }
.section-head .kicker { color: var(--green); font-size: 13px; font-weight: bold; }
.section-head h2 { margin: 4px 0 6px; font-size: clamp(26px, 4vw, 36px); line-height: 1.3; }
.section-head p { margin: 0; color: var(--muted); }

.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid #ead7ae; background: #fbf3e2; color: #7a5a1c; font-size: 14px; }
.note .icon { margin-top: 3px; color: var(--gold); }
.contest-note { max-width: 620px; margin: 0 auto 24px; }

.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.entry { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.entry.highlight { border-color: var(--green); box-shadow: 0 0 0 3px #2d756626; }
.entry-top { display: flex; align-items: center; gap: 12px; }
.rank { position: absolute; top: 12px; left: 14px; font-size: 12px; color: var(--muted); }
.avatar { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: bold; font-size: 18px; color: var(--green); background: var(--green-soft); }
.entry h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.entry .links { display: flex; gap: 8px; flex-wrap: wrap; }
.entry .links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--green); text-decoration: none; padding: 5px 10px; border-radius: 8px; background: var(--green-soft); }
.votes-bar { height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.votes-bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); width: 0; transition: width .8s ease; }
.entry-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vote-count { font-size: 14px; color: var(--muted); }
.vote-count strong { color: var(--ink); font-size: 18px; margin-inline-end: 4px; }
.empty { padding: 36px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--card); grid-column: 1 / -1; }

.podium-wrap { margin-bottom: 40px; padding: 30px 16px 0; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.trophy { display: block; width: 72px; height: 72px; margin: 0 auto 6px; color: var(--gold); }
.trophy .icon { width: 100%; height: 100%; stroke-width: 1.5; fill: #c9973f1f; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 12px; max-width: 760px; margin: 0 auto; }
.place { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.place.first { order: 2; }
.place.second { order: 1; }
.place.third { order: 3; }
.place .medal { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; font-weight: bold; color: #fff; }
.first .medal { width: 66px; height: 66px; font-size: 26px; background: var(--gold); }
.second .medal { background: var(--silver); }
.third .medal { background: var(--bronze); }
.place h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.place .vote-count { font-size: 13px; }
.place a { font-size: 13px; color: var(--green); }
.block { width: 100%; margin-top: 6px; border-radius: 12px 12px 0 0; display: grid; place-items: start center; padding-top: 12px; font-size: 28px; font-weight: bold; }
.first .block { height: 140px; background: #f3e4c4; color: var(--gold); }
.second .block { height: 100px; background: #e7eaec; color: var(--silver); }
.third .block { height: 76px; background: #f1dfcf; color: var(--bronze); }
.results-section { padding: 10px 0 30px; }
.results-title { text-align: center; margin: 0 0 4px; font-size: clamp(24px, 4vw, 34px); }
.results-sub { text-align: center; color: var(--muted); margin: 0 0 24px; }

.site-footer { margin-top: 30px; padding: 26px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-row img { width: 90px; height: 38px; object-fit: contain; }

.modal { width: min(440px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px #3a2f1a33; }
.modal::backdrop { background: #1e2b2766; }
.modal-body { padding: 24px 22px 20px; }
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.modal p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 14px; font-weight: bold; }
.field > label em, .field > .label em { color: var(--danger); font-style: normal; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field input[type="password"], .field input[type="search"], .field input[type="datetime-local"], .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px #2d75661f; }
.field input[dir="ltr"] { text-align: right; }
.field .error { display: none; color: var(--danger); font-size: 13px; }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .drop { border-color: var(--danger); }
.field.invalid .error { display: block; }
.hint { color: var(--muted); font-size: 12px; font-weight: normal; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label:has(input:checked) { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: bold; }
.choices label:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.field.invalid .choices label { border-color: #e2b3aa; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 16px; text-align: center; border: 1.5px dashed #c9bda6; border-radius: 14px; background: #fff; cursor: pointer; }
.drop:hover, .drop.drag { border-color: var(--green); background: var(--green-soft); }
.drop .icon { width: 28px; height: 28px; color: var(--green); }
.drop strong { font-size: 15px; overflow-wrap: anywhere; }
.drop small { color: var(--muted); }
.drop input { display: none; }
.drop.has-file { border-style: solid; border-color: var(--green); }

.toast { position: fixed; z-index: 60; bottom: 20px; left: 50%; transform: translate(-50%, 20px); opacity: 0; padding: 12px 20px; border-radius: 100px; background: var(--ink); color: #fff; font-size: 14px; font-weight: bold; transition: .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ffffff66; border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .menu-toggle { display: grid; }
  .nav { position: absolute; top: 66px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 16px 40px #3a2f1a26; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 6px 0 0; }
  .brand-text { display: none; }
  .hero-actions .btn { flex: 1; }
  .banner { border-radius: 22px; min-height: 0; text-align: center; padding-bottom: 80px; }
  .hero-row { flex-direction: column; gap: 18px; }
  .hero-logo { padding: 0 0 18px; border: 0; border-bottom: 2px solid #5ff0b4aa; width: 130px; height: 56px; }
  .pill { font-size: 13px; padding: 7px 14px; }
  .countdown { justify-content: center; }
  .hero h1 { font-size: 34px; }
  .countdown button { min-width: 0; flex: 1; padding: 12px 4px 8px; }
  .countdown strong { font-size: 26px; }
  .hero-actions { justify-content: center; }
  .ring { width: 340px; height: 100px; left: -20%; top: 4%; }
  .code-chip { left: 50%; transform: translateX(-50%); bottom: 20px; font-size: 13px; white-space: nowrap; animation: none; }
  .podium { gap: 6px; }
  .place h3 { font-size: 13px; }
  .first .block { height: 110px; }
  .second .block { height: 80px; }
  .third .block { height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.hl { position: relative; display: inline-block; }
.squiggle { position: absolute; left: 2%; right: 2%; bottom: -14px; width: 96%; height: 18px; overflow: visible; }
.squiggle path { fill: none; stroke: #c8f08f; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 340; animation: scribble 1.2s .5s ease-out forwards; }
@keyframes scribble { to { stroke-dashoffset: 0; } }
.tone-0 { --tone: #2d7566; --tone-2: #194a3f; --tone-soft: #e4efe9; }
.tone-1 { --tone: #3f6fa0; --tone-2: #27476b; --tone-soft: #e3ecf6; }
.tone-2 { --tone: #b07a2a; --tone-2: #7c5218; --tone-soft: #f6ead6; }
.tone-3 { --tone: #9a4f6b; --tone-2: #6a3247; --tone-soft: #f4e3ea; }
.tone-4 { --tone: #5b5fa8; --tone-2: #3c3f78; --tone-soft: #e8e8f6; }
.avatar[class*="tone-"] { background: var(--tone-soft); color: var(--tone); }
