/* Rün taşları sayfası: astroloji.css'in üzerine. */

:root { --kehribar: #ffb347; --gumus: #c9d6e8; }

.run-cover { position: relative; width: min(100%, 440px); height: auto; border-radius: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(120, 170, 255, 0.18); }

/* --- Rün çizimi ve taş --- */
.rune-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rune-svg polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rune-svg .oyuk { stroke: rgba(10, 10, 14, 0.75); stroke-width: 6; }
.rune-svg .isik { stroke: var(--kehribar); stroke-width: 3.2; filter: drop-shadow(0 0 3px rgba(255, 179, 71, 0.95)) drop-shadow(0 0 9px rgba(255, 140, 40, 0.7)); }

.stone { position: relative; display: grid; place-items: center; aspect-ratio: 360 / 308; background: url(/run/tas.webp?v=1) center / contain no-repeat; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55)); }
.stone .rune-svg { width: 34%; height: 62%; }
.stone.ters .rune-svg { transform: rotate(180deg); }

/* --- Günün rünü --- */
.daily-rune { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: center; }
.pouch { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; color: var(--gold); background: none; font: inherit; font-weight: 800; cursor: pointer; }
.pouch img { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 40px rgba(255, 179, 71, 0.25); transition: transform 0.3s; }
.pouch:hover img { transform: scale(1.04) rotate(-2deg); }
.pouch.shake img { animation: shake 0.7s ease; }
@keyframes shake { 20%, 60% { transform: rotate(-6deg); } 40%, 80% { transform: rotate(6deg); } }
.daily-result { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; animation: rise 0.7s ease both; }
.daily-result .stone { width: 150px; animation: drop 0.8s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.daily-result h3 { font-size: 1.7rem; }
.daily-result p { color: #e3dff0; }
@keyframes drop { from { opacity: 0; transform: translateY(-60px) rotate(-30deg) scale(0.6); } to { opacity: 1; transform: none; } }

/* --- Açılım seçimi --- */
.spread-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.spread-tabs button { padding: 10px 16px; border: 1px solid var(--card-border); border-radius: 999px; color: var(--foreground); background: var(--card); font: inherit; font-weight: 700; cursor: pointer; }
.spread-tabs button[aria-selected="true"] { border-color: var(--gold); color: #070914; background: var(--gold); }
.spread-form { display: flex; flex-direction: column; gap: 12px; }
.spread-desc { color: #e3dff0; }
.spread-form .field { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; font-weight: 700; }
.spread-form textarea { box-sizing: border-box; width: 100%; padding: 11px 12px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; color: var(--foreground); background: rgba(255, 255, 255, 0.06); font: inherit; font-weight: 500; }
.spread-form textarea:focus { outline: none; border-color: var(--gold); }
.pick-note { color: var(--gold); font-weight: 800; }

/* --- Masa --- */
.table-wrap { margin-top: 14px; padding: 18px; border: 1px solid var(--card-border); border-radius: var(--radius); background: radial-gradient(ellipse at 50% 20%, rgba(120, 150, 210, 0.16), transparent 60%), linear-gradient(160deg, #1b1a24, #0d0d14); }
.stone-table { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px 8px; max-width: 720px; margin: 0 auto; padding: 0; list-style: none; }
.stone-table .stone { filter: brightness(0.82) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55)); }
.stone-table button { width: 100%; padding: 0; border: 0; background: none; cursor: pointer; transition: transform 0.25s, opacity 0.3s, filter 0.25s; }
.stone-table button .stone { transform: rotate(var(--aci, 0deg)); }
.stone-table button:hover:not(:disabled) { transform: translateY(-4px); }
.stone-table button.secili .stone { filter: brightness(1.05) drop-shadow(0 0 10px rgba(255, 179, 71, 0.9)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55)); }
.stone-table button.secili::after { content: attr(data-sira); position: absolute; top: -4px; right: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #1a1205; background: var(--kehribar); font-size: 0.78rem; font-weight: 800; }
.stone-table li { position: relative; }
.stone-table button:disabled { opacity: 0.35; cursor: default; }
.stone-table.cekiliyor button:not(.secili) { opacity: 0.15; }
.table-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }

/* --- Sonuç düzeni --- */
.result-head { text-align: center; animation: rise 0.6s ease both; }
.result-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.spread-layout { display: grid; gap: 14px; justify-content: center; margin-top: 22px; }
.spread-layout.n1 { grid-template-columns: 180px; }
.spread-layout.n3 { grid-template-columns: repeat(3, minmax(0, 180px)); }
.spread-layout.n5 { grid-template-columns: repeat(3, minmax(0, 150px)); grid-template-areas: ". c ." "b a d" ". e ."; }
.spread-layout.n5 .slot:nth-child(1) { grid-area: a; }
.spread-layout.n5 .slot:nth-child(2) { grid-area: b; }
.spread-layout.n5 .slot:nth-child(3) { grid-area: c; }
.spread-layout.n5 .slot:nth-child(4) { grid-area: d; }
.spread-layout.n5 .slot:nth-child(5) { grid-area: e; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.slot .norn { width: 100%; aspect-ratio: 1; border-radius: 16px; object-fit: cover; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5); }
.slot .stone { width: 100%; max-width: 150px; perspective: 600px; }
.slot .stone.flip { animation: flipIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.slot .stone.flip .rune-svg { opacity: 0; animation: carve 1.1s ease forwards; animation-delay: inherit; }
@keyframes flipIn { from { transform: rotateY(90deg) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes carve { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
.slot.ters-slot .stone.flip { animation-name: flipIn; }
.slot b { font-family: var(--serif); font-size: 1.3rem; }
.slot small { color: var(--muted); font-size: 0.78rem; }
.slot .pos { color: var(--gold); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

.stone-readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.stone-readings .card { display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: start; animation: rise 0.6s ease both; }
.stone-readings .stone { width: 70px; }
.stone-readings h3 { font-size: 1.15rem; }
.stone-readings .pos { color: var(--gold); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.stone-readings p { margin-top: 4px; color: #e3dff0; font-size: 0.93rem; }
.stone-readings .ters-etiket { margin-left: 6px; padding: 2px 8px; border-radius: 999px; color: #ffc4c4; background: rgba(255, 90, 90, 0.18); font-size: 0.72rem; font-weight: 800; }
.story p { color: #e3dff0; font-size: 1.02rem; line-height: 1.65; }
.story .advice { margin-top: 12px; padding: 12px 16px; border-left: 3px solid var(--kehribar); border-radius: 0 12px 12px 0; background: rgba(255, 179, 71, 0.06); font-family: var(--serif); font-size: 1.2rem; font-style: italic; }
#sonuc .expert { margin-top: 16px; }

/* --- Günlük --- */
.rune-journal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rune-journal li { position: relative; border: 1px solid var(--card-border); border-radius: 16px; background: var(--card); }
.rune-journal li.is-current { border-color: var(--gold); }
.rune-journal .open { display: block; width: 100%; padding: 14px 40px 14px 16px; border: 0; color: inherit; background: none; font: inherit; text-align: left; cursor: pointer; }
.rune-journal .mini { display: flex; gap: 4px; margin-bottom: 8px; }
.rune-journal .mini .stone { width: 44px; }
.rune-journal b { display: block; font-family: var(--serif); font-size: 1.15rem; }
.rune-journal small { color: var(--muted); font-size: 0.78rem; }
.rune-journal p { margin-top: 4px; color: #d8d3e8; font-size: 0.84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rune-journal .del { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; color: var(--muted); background: rgba(255, 255, 255, 0.06); cursor: pointer; }
.rune-journal .del:hover { color: #fff; background: rgba(255, 90, 90, 0.4); }
.journal-empty { color: var(--muted); }

/* --- Sözlük --- */
.aett { margin-bottom: 22px; }
.aett h3 { font-size: 1.3rem; }
.aett > p { margin-bottom: 10px; color: var(--muted); font-size: 0.9rem; }
.aett ul { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.aett button { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 10px 4px; border: 1px solid var(--card-border); border-radius: 14px; color: var(--foreground); background: var(--card); font: inherit; cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.aett button:hover { transform: translateY(-3px); border-color: var(--gold); }
.aett .stone { width: 100%; max-width: 76px; }
.aett b { font-size: 0.86rem; }
.aett small { color: var(--muted); font-size: 0.72rem; text-align: center; }

.rune-dialog { width: min(600px, calc(100vw - 24px)); }
.rune-detail { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: start; }
.rune-detail .stone { width: 150px; }
.rune-detail h2 { font-size: 2rem; }
.rune-detail p { margin: 8px 0; color: #e3dff0; }
.rune-detail .kw { color: var(--muted); font-size: 0.86rem; }
.rune-detail .ters-baslik { color: #ffc4c4; font-weight: 800; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .stone-table { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .aett ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rune-journal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .daily-rune, .daily-result, .rune-detail { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .stone-table { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stone-readings, .rune-journal { grid-template-columns: 1fr; }
  .spread-layout.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .spread-layout.n5 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .slot b { font-size: 1.05rem; }
}
