:root {
  --bg0: #0e0a18;
  --bg1: #1c1430;
  --bg2: #2a1d3d;
  --gold: #e8c87e;
  --gold-deep: #caa45a;
  --cream: #f3ead9;
  --muted: #a99fc0;
  --line: rgba(232, 200, 126, 0.18);
  --glass: rgba(28, 20, 48, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Marcellus", ui-serif, Georgia, serif;
  color: var(--cream);
  background:
    radial-gradient(120% 90% at 50% -10%, #34244f 0%, var(--bg1) 38%, var(--bg0) 75%);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Yıldız alanı */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: .5; animation: tw 4s infinite ease-in-out;
}
@keyframes tw { 0%,100% { opacity: .15; } 50% { opacity: .8; } }

/* Üst bar */
.topbar { position: relative; z-index: 2; padding: 20px 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--gold); font-size: 22px; }
.brand-name {
  font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 22px;
  letter-spacing: .5px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Sahne */
.stage {
  position: relative; z-index: 1; flex: 1;
  display: grid; place-items: center; padding: 12px 22px 48px;
}
.screen {
  display: none; width: 100%; max-width: 480px; text-align: center;
  animation: rise .6s ease both;
}
.screen.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Tipografi */
.display {
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(30px, 7vw, 44px); line-height: 1.12; letter-spacing: .3px;
  margin-bottom: 14px;
}
.display.sm { font-size: clamp(26px, 5.5vw, 34px); margin-bottom: 22px; }
.sub { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 380px; margin: 0 auto 28px; }
.tiny { color: var(--muted); font-size: 12.5px; margin-top: 18px; opacity: .8; }

/* Fincan + duman */
.cup-art { position: relative; width: 180px; margin: 8px auto 24px; }
.cup { width: 100%; filter: drop-shadow(0 18px 30px rgba(202,164,90,.18)); }
.steam { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; }
.steam span {
  width: 5px; height: 34px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(243,234,217,.55), transparent);
  filter: blur(2px); animation: steam 3.4s infinite ease-in-out;
}
.steam span:nth-child(2) { animation-delay: .6s; height: 42px; }
.steam span:nth-child(3) { animation-delay: 1.2s; }
@keyframes steam {
  0% { opacity: 0; transform: translateY(8px) scaleY(.7); }
  40% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-18px) scaleY(1.2); }
}

/* Butonlar */
.btn {
  font-family: "Marcellus", serif; font-size: 16px; letter-spacing: .4px;
  cursor: pointer; border: none; border-radius: 999px; padding: 14px 30px;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  color: #241a0c; font-weight: 600;
  background: linear-gradient(135deg, #f6e7c1, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 10px 28px rgba(202,164,90,.32);
}
.btn.primary:disabled { opacity: .4; box-shadow: none; cursor: default; }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); }
.actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; }

/* Yükleme */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 30px 20px; border: 1.5px dashed var(--line); border-radius: 20px;
  background: var(--glass); cursor: pointer; transition: .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: rgba(42,29,61,.7); }
.dz-icon { font-size: 30px; color: var(--gold); }
.dz-text { font-size: 16px; }
.dz-hint { font-size: 13px; color: var(--muted); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.thumb { position: relative; width: 76px; height: 76px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb b {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; font-weight: 400; font-size: 14px;
  display: grid; place-items: center; cursor: pointer;
}
.field-label { display: block; text-align: left; color: var(--muted); font-size: 14px; margin: 24px 4px 8px; }
.niyet {
  width: 100%; min-height: 84px; resize: vertical; border-radius: 16px; padding: 14px 16px;
  background: var(--glass); border: 1px solid var(--line); color: var(--cream);
  font-family: inherit; font-size: 15px;
}
.niyet::placeholder { color: rgba(169,159,192,.6); }
.niyet:focus { outline: none; border-color: var(--gold); }

/* Okuma ritüeli */
.orb { position: relative; width: 180px; height: 180px; margin: 10px auto 30px; display: grid; place-items: center; }
.orb-glow {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,200,126,.35), transparent 65%);
  animation: pulse 2.6s infinite ease-in-out;
}
@keyframes pulse { 0%,100% { transform: scale(.92); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }
.swirl {
  position: absolute; width: 140px; height: 140px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--gold); border-right-color: rgba(232,200,126,.4);
  animation: spin 1.5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.orb-cup { font-size: 50px; filter: drop-shadow(0 0 16px rgba(232,200,126,.5)); }
.reading-line {
  font-family: "Cormorant Garamond", serif; font-size: 22px; color: var(--gold);
  min-height: 30px; transition: opacity .4s; letter-spacing: .3px;
}

/* Sonuç */
.fortune {
  text-align: left; background: var(--glass); border: 1px solid var(--line);
  border-radius: 20px; padding: 24px 22px; font-size: 17px; line-height: 1.78;
  color: var(--cream); white-space: pre-wrap;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.fortune .cursor { color: var(--gold); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: rgba(42,29,61,.95); border: 1px solid var(--line); color: var(--cream);
  padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 9; opacity: 0;
  transition: opacity .3s, transform .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
