/* RoseSun Weather · Gelecek (Cadılar Bayramı) — tek, sabit Halloween görünümü.
 * Tema seçici yok. Dekorlar içerikle birlikte kayar ve yalnız boş alanlara
 * yerleşir: geniş ekranda içerik sütununun yanlarına, dar ekranda başlık
 * köşelerine ve sayfa altındaki ayrılmış banda. Yazı ile çakışmayı
 * tests/gelecek-e2e.test.mjs 9 genişlik x 3 dil x 2 durumda ölçer. */
:root {
  color-scheme: dark;
  --bg1: #120c1b; --bg2: #1f1330; --bg3: #2c1534;
  --panel: rgba(25, 17, 38, .86);
  --line: rgba(255, 255, 255, .14);
  --text: #fbf6ff; --muted: #d7cbe7;
  --orange: #ff9a3d; --orange2: #ffb35d;
  --focus: #ffcf8a;
  --err: #ffb4a8;
  --col: 345px; /* içerik sütununun yarısı (690 / 2) */
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; position: relative; min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 154, 61, .12), transparent 20%),
    radial-gradient(circle at 84% 16%, rgba(178, 107, 255, .14), transparent 26%),
    radial-gradient(circle at 76% 82%, rgba(255, 126, 85, .11), transparent 21%),
    linear-gradient(145deg, var(--bg1), var(--bg2) 54%, var(--bg3));
  background-color: var(--bg1);
}
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---- Dekor sahnesi ---------------------------------------------------- */
.scene { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.moon {
  position: absolute; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff4ce 0, #ffd890 38%, #ffb14d 72%, rgba(255, 177, 77, .12) 100%);
  box-shadow: 0 0 40px rgba(255, 191, 102, .25), 0 0 95px rgba(255, 154, 61, .16);
}
/* Sabit kutu (1.25em): çakışma ölçümü emoji fontundan bağımsız kalsın. */
.deco { position: absolute; display: grid; place-items: center; width: 1.25em; height: 1.25em; line-height: 1; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .28)); }
.bat { font-size: 34px; animation: float 7s ease-in-out infinite alternate; }
.b2 { animation-delay: -2s; } .b3 { animation-delay: -4s; }
.spider { font-size: 32px; animation: sway 5s ease-in-out infinite; }
.spider::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 600px; background: rgba(255, 255, 255, .22); }
.broom { font-size: 42px; transform: rotate(-16deg); }
.pumpkin { font-size: 46px; animation: glow 2.8s ease-in-out infinite alternate; }
.star { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff4cf; box-shadow: 0 0 8px #ffe4ac; animation: twinkle 4s ease-in-out infinite alternate; }
.s2 { animation-delay: -1s; } .s3 { animation-delay: -2s; } .s4 { animation-delay: -3s; } .s5 { animation-delay: -1.4s; }

/* Geniş ekran: dekorlar içerik sütununun (690 px) iki yanındaki boşlukta. */
@media (min-width: 1100px) {
  .moon { left: calc(50% + var(--col) + 48px); top: 96px; width: clamp(96px, calc(50vw - var(--col) - 100px), 170px); }
  .spider { right: max(12px, calc(50% - 546px)); top: 22px; }
  .b1 { right: calc(50% + var(--col) + 70px); top: 160px; }
  .b2 { right: calc(50% + var(--col) + 150px); top: 300px; }
  .b3 { left: calc(50% + var(--col) + 100px); top: 330px; }
  .broom { right: calc(50% + var(--col) + 70px); top: 500px; }
  .pumpkin { left: calc(50% + var(--col) + 70px); top: 560px; }
  .s1 { right: calc(50% + var(--col) + 36px); top: 118px; }
  .s2 { right: calc(50% + var(--col) + 170px); top: 228px; }
  .s3 { left: calc(50% + var(--col) + 36px); top: 410px; }
  .s4 { left: calc(50% + var(--col) + 150px); top: 470px; }
  .s5 { right: calc(50% + var(--col) + 120px); top: 430px; }
}
/* Dar ekran: üstte başlık satırının boş köşeleri, altta ayrılmış dekor bandı. */
@media (max-width: 1099.98px) {
  .moon { left: calc(50% + 36px); top: 12px; width: 52px; opacity: .9; }
  .spider { left: calc(50% - 64px); top: 26px; font-size: 26px; }
  .b1 { left: 27%; bottom: 44px; font-size: 28px; }
  .b2 { right: 27%; bottom: 50px; font-size: 26px; }
  .b3 { left: calc(50% - 14px); bottom: 20px; font-size: 26px; }
  .broom { left: 7%; bottom: 16px; font-size: 36px; }
  .pumpkin { right: 7%; bottom: 14px; font-size: 40px; }
  .s1 { left: calc(50% - 110px); top: 18px; }
  .s2 { left: calc(50% + 110px); top: 30px; }
  .s3 { left: 19%; bottom: 70px; }
  .s4 { right: 18%; bottom: 76px; }
  .s5 { left: 50%; bottom: 76px; }
}
@media (max-width: 639.98px) {
  .moon { left: 14px; top: 12px; width: 50px; opacity: .8; }
  .spider { left: auto; right: 16px; top: 22px; font-size: 24px; }
  .b1 { left: 5%; bottom: 40px; font-size: 24px; }
  .b2 { right: 6%; bottom: 52px; font-size: 22px; }
  .b3 { left: calc(50% - 12px); bottom: 18px; font-size: 22px; }
  .broom { left: 24%; bottom: 12px; font-size: 30px; }
  .pumpkin { right: 22%; bottom: 10px; font-size: 34px; }
  .s1 { left: 20px; top: 76px; }
  .s2 { right: 24px; top: 70px; }
  .s3 { left: 40%; bottom: 62px; }
  .s4 { right: 38%; bottom: 60px; }
  .s5 { left: 12%; bottom: 14px; }
}
/* Çok dar telefon (< 380 px): marka satırının yanında yer yok; ay ve örümcek
   dil düğmeleri satırının iki ucuna iner. */
@media (max-width: 379.98px) {
  .moon { left: 12px; top: 74px; width: 42px; }
  .spider { right: 14px; top: 76px; font-size: 22px; }
  .s1 { left: 16px; top: 34px; }
  .s2 { left: 64px; top: 104px; }
}

/* ---- Yerleşim ---------------------------------------------------------- */
.wrap { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 22px 22px 18px; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 850; letter-spacing: -.03em; border-radius: 16px; }
.brand-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange2), #ff7f50); box-shadow: 0 10px 24px rgba(255, 140, 61, .24); font-size: 24px; }
.brand-text { line-height: 1.08; }
.brand-text small { display: block; margin-top: 4px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #f8c799; }
.lang-switch { display: inline-flex; gap: 8px; }
.lang-btn { appearance: none; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--text); border-radius: 999px; min-width: 44px; min-height: 40px; padding: 9px 12px; font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .06em; cursor: pointer; }
.lang-btn[aria-pressed="true"] { background: linear-gradient(110deg, var(--orange), #ff7f50); color: #251825; border-color: transparent; }
main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 34px 0 26px; }
.hero { width: min(100%, 690px); text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 186, 117, .22); background: rgba(255, 154, 61, .09); color: #ffc888; font-size: 11px; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.spark { width: 7px; height: 7px; border-radius: 50%; background: var(--orange2); box-shadow: 0 0 10px var(--orange2); }
h1 { margin: 22px auto 14px; max-width: 680px; font-size: clamp(34px, 6.8vw, 62px); line-height: 1.08; letter-spacing: -.05em; font-weight: 950; text-wrap: balance; }
h1 .grad { display: block; background: linear-gradient(100deg, #ffd38b, #ff9d47 46%, #d0a3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 0 auto 28px; max-width: 510px; color: var(--muted); font-size: clamp(15px, 2.3vw, 17px); line-height: 1.65; }
.card { background: var(--panel); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: 28px; box-shadow: 0 28px 80px rgba(0, 0, 0, .44); padding: 28px 24px 24px; text-align: left; }

/* ---- Form -------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.field { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.field-label { display: block; padding: 0; margin-bottom: 10px; color: #f5edff; font-size: 14px; font-weight: 760; }
.control { width: 100%; min-height: 54px; border-radius: 15px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(10, 7, 18, .6); padding: 13px 14px; color: #fff; font: inherit; font-size: 16px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.control::placeholder { color: #a99dc0; }
.control:focus { border-color: var(--orange2); box-shadow: 0 0 0 3px rgba(255, 180, 93, .38); }
.control[aria-invalid="true"] { border-color: var(--err); }
.ico { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-fill { fill: currentColor; stroke: none; }
.error { margin: 8px 2px 0; color: var(--err); font-size: 13px; line-height: 1.4; }
.error:empty { display: none; }

/* Tarih: Geçmiş sitesindeki gibi Gün / Ay / Yıl metin kutuları (telefonda rakam
   klavyesi açılır) + takvim düğmesi (gizli yerel tarih seçiciyi açar). */
.date-row { display: flex; align-items: flex-end; gap: 8px; max-width: 460px; }
.date-part { display: flex; flex-direction: column; gap: 5px; flex: 1 1 0; min-width: 0; }
.date-part-year { flex: 1.6 1 0; }
.date-part-label { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-input { padding: 0 4px; text-align: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.date-sep { padding-bottom: 15px; color: var(--muted); font-weight: 800; }
.calendar-wrap { position: relative; flex: 0 0 auto; }
.icon-btn { display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border-radius: 15px; border: 1px solid rgba(255, 180, 93, .38); background: rgba(255, 154, 61, .12); color: var(--orange2); cursor: pointer; }
.icon-btn:hover { background: rgba(255, 154, 61, .2); }
.native-date { position: absolute; left: 0; bottom: 0; width: 54px; height: 54px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

/* Konum: seçilen yer çipi + arama + öneri listesi + "Konumumu kullan". */
.location-chip { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; padding: 11px 13px; border-radius: 15px; border: 1px dashed rgba(255, 255, 255, .22); background: rgba(10, 7, 18, .4); }
.location-chip .ico { color: var(--orange2); }
.location-chip[data-empty="false"] { border-style: solid; border-color: rgba(255, 180, 93, .45); }
.location-texts { display: flex; flex-direction: column; min-width: 0; }
.location-name { font-weight: 800; overflow-wrap: anywhere; }
.location-chip[data-empty="true"] .location-name { font-weight: 500; font-size: 14px; color: var(--muted); }
.location-coords { font-size: 12px; color: #b9abd0; font-variant-numeric: tabular-nums; }
.location-coords:empty { display: none; }
.search-row { display: flex; gap: 8px; }
.search-row .control { flex: 1 1 auto; min-width: 0; }
.secondary-btn { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 54px; padding: 0 16px; border-radius: 15px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.secondary-btn:hover { background: rgba(255, 255, 255, .14); }
.search-results { list-style: none; margin: 8px 0 0; padding: 4px; max-height: 300px; overflow-y: auto; border-radius: 15px; border: 1px solid rgba(255, 255, 255, .16); background: #1b1129; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.search-results li + li { border-top: 1px solid rgba(255, 255, 255, .08); }
.result-option { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.result-option:hover, .result-option:focus-visible { background: rgba(255, 154, 61, .14); }
.result-name { font-weight: 800; overflow-wrap: anywhere; }
.result-detail { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.status-line { margin: 8px 2px 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.status-line:empty { display: none; }
.ghost-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 180, 93, .38); background: transparent; color: var(--orange2); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.ghost-btn:hover { background: rgba(255, 154, 61, .1); }
.ghost-btn:disabled { opacity: .6; cursor: progress; }
.ghost-btn .ico { width: 18px; height: 18px; }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 12px 16px; border: 0; border-radius: 15px; background: linear-gradient(108deg, var(--orange2), #ff7f50 76%); color: #251421; box-shadow: 0 12px 28px rgba(255, 127, 80, .25); font: inherit; font-size: 16px; font-weight: 850; text-align: center; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.primary:hover { transform: translateY(-1px); }
.primary:disabled { opacity: .68; cursor: progress; transform: none; }

/* ---- Bekleme ve sonuç --------------------------------------------------- */
.loading, .result { text-align: center; animation: reveal .45s cubic-bezier(.18, .76, .26, 1) both; }
.loading { padding: 26px 8px 12px; }
.loading p { margin: 18px 0 0; color: var(--muted); }
.cauldron { position: relative; width: 72px; height: 72px; margin: 0 auto; display: grid; place-items: center; }
.spinner { position: absolute; inset: 0; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .11); border-top-color: var(--orange2); animation: spin 1s linear infinite; }
.cauldron-emoji { font-size: 30px; line-height: 1; animation: bob .9s ease-in-out infinite alternate; }
.result { padding: 6px 2px 2px; }
.result-badge { margin: 0 0 8px; color: #ffd396; font-size: 12px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.result-emoji { display: grid; place-items: center; width: 112px; height: 112px; margin: 2px auto 12px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 169, 57, .26), transparent 75%); font-size: 76px; line-height: 1; animation: pop .75s ease-out .1s both; }
.result h2 { margin: 0 auto 14px; max-width: 560px; font-size: clamp(28px, 5.4vw, 46px); line-height: 1.14; letter-spacing: -.04em; font-weight: 950; text-wrap: balance; }
.result h2:focus { outline: none; }
.result h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; border-radius: 8px; }
.result-text { margin: 0 auto; max-width: 480px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.wish { margin: 18px auto 18px; color: #ffd28f; font-weight: 850; font-size: 17px; text-wrap: balance; }
.home { max-width: 420px; margin: 0 auto; }
.minor { display: flex; justify-content: center; gap: 6px 18px; flex-wrap: wrap; margin-top: 14px; }
.minor-btn { appearance: none; background: none; border: 0; min-height: 40px; padding: 8px 6px; color: #d9cbee; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; border-radius: 8px; }
.minor-btn:hover { color: #fff; }
.share-note { min-height: 1.2em; margin: 4px 0 0; color: #bfe8c0; font-size: 13px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { to { transform: translateY(-4px); } }
@keyframes float { to { transform: translate(8px, -8px); } }
@keyframes sway { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }
@keyframes glow { to { filter: drop-shadow(0 0 18px rgba(255, 154, 61, .45)); } }
@keyframes twinkle { to { opacity: 1; transform: scale(1.6); } }
@keyframes reveal { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: translateY(14px) scale(.76); } 70% { opacity: 1; transform: translateY(-5px) scale(1.06); } 100% { opacity: 1; transform: none; } }

@media (max-width: 1099.98px) {
  .wrap { padding-bottom: 96px; }
}
@media (max-width: 639.98px) {
  .wrap { padding: 16px 16px 84px; }
  .topbar { flex-direction: column; justify-content: center; gap: 14px; }
  main { padding: 26px 0 18px; }
  .card { padding: 22px 18px 20px; border-radius: 24px; }
  .date-row { gap: 6px; }
  .icon-btn, .native-date { width: 50px; }
  .secondary-btn { padding: 0 13px; }
  .lead { margin-bottom: 22px; }
  .wish { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
