/* ==========================================================================
   Groyt — Animasyonlu komut önizlemeleri (js/previews-r4.js)
   Sabit yükseklikli sahne: Discord gibi en yeni mesaj altta, eskiler yukarı kayar.
   ========================================================================== */
.r4s {
  position: relative; height: 330px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px);
          mask-image: linear-gradient(180deg, transparent 0, #000 22px);
}
.r4-scene { display: flex; flex-direction: column; gap: 8px; min-width: 0; animation: r4In .45s var(--ease-out, ease) both; }
.r4-slide { animation: r4Up .45s var(--ease-out, ease) both; }
@keyframes r4In { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes r4Up { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.r4s .dc-msg { gap: 8px; }
.r4s .dc-av { flex-basis: 28px; width: 28px; height: 28px; font-size: 12px; }
.r4s .dc-meta b { font-size: 12.5px; }
.r4s .r4-e { max-width: 100%; padding: 9px 10px 9px 12px; gap: 6px; }
.r4s .cp-text { font-size: 11.5px; line-height: 1.45; }
.r4s .cp-etitle { font-size: 12.5px; }
.r4s .cp-btns i { font-size: 10.5px; padding: 4px 8px; transition: transform .15s ease, filter .15s ease; }
.r4s .cp-btns i.is-press { animation: r4Press .45s ease; }
@keyframes r4Press { 0% { transform: scale(1); } 35% { transform: scale(.9); filter: brightness(1.5); box-shadow: 0 0 0 6px rgba(255, 193, 7, .25); } 100% { transform: scale(1); } }
.r4-chan { font: 700 11px 'Orbitron', sans-serif; letter-spacing: .06em; color: var(--text-tertiary); padding: 2px 0 2px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); }

/* komut satırı + seçenek çipleri */
.r4-cmdline { display: flex; flex-direction: column; gap: 5px; }
.r4-opts { display: flex; flex-wrap: wrap; gap: 4px; padding-left: 4px; }
.r4-opts span { font-size: 10.5px; padding: 2px 7px; border-radius: 5px; background: rgba(255, 255, 255, .07); color: var(--text-secondary); }
.r4-opts b { color: #fff; }
.r4-flash { animation: r4Flash .5s ease 3; }
@keyframes r4Flash { 50% { background: rgba(255, 193, 7, .55); color: #1a1400; } }
.r4-casebar { font-size: 11px; padding: 5px 8px; border-radius: 6px; background: rgba(255, 193, 7, .1); color: #ffe08a; }
.r4-3col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.r4-3col .cp-f b { font-size: 10px; }
.r4-3col .cp-f span { font-size: 11px; }

/* sicil kartı */
.r4-sicil { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: linear-gradient(160deg, #1d1322, #11131d); border: 1px solid rgba(239, 68, 68, .35); }
.r4-sicil-top { display: flex; align-items: center; gap: 8px; }
.r4-sicil-top b { display: block; color: #fff; font-size: 13px; }
.r4-sicil-top small { color: var(--text-tertiary); font-size: 10px; }
.r4-avring { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: #3a4160; box-shadow: 0 0 0 2px #f97316, 0 0 14px rgba(249, 115, 22, .6); }
.r4-dikkat { margin-left: auto; font: 800 9.5px 'Orbitron', sans-serif; letter-spacing: .12em; padding: 3px 7px; border-radius: 5px; background: #f97316; color: #1a0e00; animation: r4Pulse 1.4s ease-in-out infinite; }
@keyframes r4Pulse { 50% { box-shadow: 0 0 12px rgba(249, 115, 22, .8); } }
.r4-pts-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.r4-pts-l b { font: 800 14px 'Orbitron', sans-serif; color: #fff; }
.r4-pts small { font-size: 10px; color: var(--text-tertiary); }
.r4-bar { position: relative; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); margin-bottom: 4px; }
.r4-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22c55e, #FFC107 60%, #f97316); transition: width 1.4s cubic-bezier(.16, 1, .3, 1); }
.r4-bar em { position: absolute; top: -2px; width: 2px; height: 12px; background: rgba(255, 255, 255, .55); animation: r4Glow 1.6s ease-in-out infinite; }
@keyframes r4Glow { 50% { background: #FFC107; box-shadow: 0 0 6px #FFC107; } }
.r4-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.r4-counts div { display: flex; flex-direction: column; align-items: center; padding: 5px 2px; border-radius: 6px; background: rgba(255, 255, 255, .05); }
.r4-counts b { font: 800 14px 'Orbitron', sans-serif; color: #fff; }
.r4-counts span { font-size: 9.5px; color: var(--text-secondary); }
.r4-recent small { font: 700 9px 'Orbitron', sans-serif; letter-spacing: .14em; color: var(--text-tertiary); }
.r4-rv { display: flex; align-items: center; gap: 6px; font-size: 10.5px; padding: 3px 0; opacity: 0; transform: translateX(-8px); transition: opacity .35s ease, transform .35s ease; }
.r4-rv.is-on { opacity: 1; transform: none; }
.r4-rv b { font-size: 9.5px; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; }
.r4-rv span:last-child { color: var(--text-tertiary); }
.r4-rv.is-revoked b, .r4-list .is-revoked { text-decoration: line-through; opacity: .55; }
.is-ban { background: rgba(239, 68, 68, .2); color: #fca5a5; }
.is-timeout { background: rgba(91, 141, 239, .2); color: #a9c3ff; }
.is-warn { background: rgba(255, 193, 7, .18); color: #ffe08a; }
.r4-cid { font: 700 9.5px 'Orbitron', sans-serif; color: #1a1400; background: #FFC107; padding: 1px 5px; border-radius: 99px; }
.r4-list { display: flex; flex-direction: column; gap: 3px; font-size: 11px; }
.r4-list > div { padding: 3px 6px; border-radius: 5px; background: rgba(255, 255, 255, .03); transition: background .25s ease; }
.r4-list small { color: var(--text-tertiary); }
.r4-list .is-hl, .r4-pl-card.is-hl, .r4-select span.is-hl { background: rgba(255, 193, 7, .2); box-shadow: inset 0 0 0 1px rgba(255, 193, 7, .6); }
.r4-form { font-size: 10.5px; color: var(--text-secondary); }
.r4-form > div { display: flex; gap: 4px; margin-top: 4px; }
.r4-form span { flex: 1; padding: 4px 6px; border-radius: 5px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .1); }
.r4-form b { color: #fff; }
.r4-thr, .r4-auto { font-size: 11.5px; padding: 5px 8px; border-radius: 6px; opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.r4-thr { background: rgba(255, 193, 7, .12); color: #ffe08a; }
.r4-thr b { color: #FFC107; }
.r4-auto { background: rgba(34, 197, 94, .1); color: #bbf7d0; }
.r4-thr.is-on, .r4-auto.is-on { opacity: 1; transform: none; }
.r4-toast {
  position: absolute; left: 6px; right: 6px; top: 8px; z-index: 2; padding: 9px 10px; border-radius: 10px; font-size: 11px; color: #fff;
  background: linear-gradient(120deg, #3b1d0e, #1d1408); border: 1px solid rgba(249, 115, 22, .6); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .8);
  animation: r4Toast .5s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes r4Toast { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* çalma listeleri */
.r4-select { display: flex; flex-direction: column; margin-top: 4px; border-radius: 6px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .12); font-size: 11px; overflow: hidden; }
.r4-select > span { padding: 6px 9px; color: var(--text-secondary); }
.r4-select i { position: absolute; }
.r4-select:not(.is-open) { flex-direction: row; justify-content: space-between; align-items: center; padding-right: 8px; }
.r4-select:not(.is-open) i { position: static; font-style: normal; }
.r4-select.is-open > span + span { border-top: 1px solid rgba(255, 255, 255, .06); }
.r4-np-bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.r4-np-bar i { display: block; height: 100%; width: 8%; background: #FFC107; animation: r4Np 6s linear forwards; }
@keyframes r4Np { to { width: 42%; } }
.r4-pl-card { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, .04); font-size: 11px; transition: background .25s ease; }
.r4-pl-card b { color: #fff; }
.r4-pl-card span { color: var(--text-secondary); }
.r4-pl-card.is-dim { opacity: .6; }
.is-bump { display: inline-block; color: #FFC107; animation: r4Bump .5s ease; }
@keyframes r4Bump { 40% { transform: scale(1.5); } }

/* liste görünümlü sıralama */
.r4-lb { display: flex; flex-direction: column; gap: 2px; }
.r4-lb-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; font-size: 10.5px; animation: r4Up .4s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--d) * 80ms); }
.r4-lb-rank { font-size: 11px; }
.r4-lb-name { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r4-lb-bar { color: #FFC107; letter-spacing: -1px; font-size: 9px; clip-path: inset(0 100% 0 0); animation: r4Fill .7s ease forwards; animation-delay: calc(var(--d) * 80ms + .2s); }
@keyframes r4Fill { to { clip-path: inset(0 0 0 0); } }
.r4-lb-row b { font-size: 10.5px; color: #fff; }
.r4-lb-sub { font-size: 9.5px; color: var(--text-tertiary); padding-left: 32px; margin-top: -2px; animation: r4Up .4s ease both; animation-delay: calc(var(--d) * 80ms); }
.r4-lb-me { font-size: 10.5px; padding: 5px 7px; border-radius: 6px; background: rgba(255, 193, 7, .1); color: #ffe08a; animation: r4Pulse2 1.6s ease-in-out 1s 2; }
@keyframes r4Pulse2 { 50% { box-shadow: 0 0 12px rgba(255, 193, 7, .5); } }
.r4-lb-end { font-size: 11px; color: #fff; animation: r4Hop .6s cubic-bezier(.3, 1.6, .5, 1) .3s both; }
@keyframes r4Hop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.r4-lbimg { padding: 10px; border-radius: 10px; background: linear-gradient(150deg, #2a2108, #0f1220 70%); border: 1px solid rgba(255, 193, 7, .35); }
.r4-lbimg-head { font: 700 10px 'Orbitron', sans-serif; letter-spacing: .1em; color: #FFC107; margin-bottom: 7px; }
.r4-lbimg-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.r4-lbimg-grid div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border-radius: 6px; background: rgba(255, 255, 255, .05); min-width: 0; }
.r4-lbimg-grid span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 800 9px 'Orbitron', sans-serif; background: #3a4160; color: #fff; }
.r4-lbimg-grid .is-top-1 span { background: #FFC107; color: #1a1400; }
.r4-lbimg-grid .is-top-2 span { background: #8fd6ff; color: #04202c; }
.r4-lbimg-grid .is-top-3 span { background: #ff7a45; color: #2a0e00; }
.r4-lbimg-grid b { font-size: 9px; color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r4-lbimg-grid small { font-size: 8px; color: var(--text-tertiary); white-space: nowrap; }

/* mayın tarlası */
.r4-mine-wrap { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; }
.r4-board {
  position: relative; display: grid; grid-template-columns: 12px repeat(10, 16px); grid-auto-rows: 16px; gap: 1px;
  padding: 5px; border-radius: 8px; background: #11131c; border: 1px solid rgba(255, 255, 255, .08);
}
.r4-board.is-shake { animation: r4Shake .45s ease 2; }
@keyframes r4Shake { 20% { transform: translate(-3px, 1px); } 40% { transform: translate(3px, -1px); } 60% { transform: translate(-2px, 2px); } 80% { transform: translate(2px, -1px); } }
.r4-mh { font: 700 7.5px 'Orbitron', sans-serif; color: var(--text-tertiary); display: grid; place-items: center; font-style: normal; }
.r4-mc { border-radius: 3px; background: linear-gradient(180deg, #3b4258, #2b3044); font-style: normal; font: 800 9px/16px 'Orbitron', sans-serif; text-align: center; transition: background .2s ease, transform .2s ease; }
.r4-mc.is-open { background: rgba(255, 255, 255, .06); animation: r4Pop .25s ease; }
@keyframes r4Pop { from { transform: scale(.6); } to { transform: none; } }
.r4-mc[data-n="1"] { color: #60a5fa; } .r4-mc[data-n="2"] { color: #4ade80; } .r4-mc[data-n="3"] { color: #f87171; } .r4-mc[data-n="4"] { color: #c084fc; }
.r4-mc.is-flag { background: #3b2a12; font-size: 8px; }
.r4-mc.is-mine { background: #2a1214; font-size: 8px; animation: r4Pop .25s ease; }
.r4-mc.is-boom { background: #ef4444; font-size: 9px; box-shadow: 0 0 12px #ef4444; }
.r4-region {
  position: absolute; pointer-events: none; border: 2px solid #FFC107; border-radius: 5px; box-shadow: 0 0 10px rgba(255, 193, 7, .6);
  left: 16px; top: 20px; width: 88px; height: 88px; transition: left .45s cubic-bezier(.16, 1, .3, 1), top .45s cubic-bezier(.16, 1, .3, 1);
}
.r4-region.is-right { left: 101px; }
.r4-region.is-down { top: 105px; }
.r4-radar {
  position: absolute; pointer-events: none; border: 2px dashed #22d3ee; border-radius: 5px; background: rgba(34, 211, 238, .1);
  left: calc(16px + var(--c, 0) * 17px); top: calc(20px + var(--r, 0) * 17px); width: 54px; height: 54px; animation: r4Pop .3s ease;
}
.r4-radar b { position: absolute; right: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: #22d3ee; color: #052e35; font: 800 9px/16px 'Orbitron', sans-serif; text-align: center; }
.r4-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.r4-side > b { font: 800 10px 'Orbitron', sans-serif; letter-spacing: .14em; color: #FFC107; }
.r4-side > div { display: flex; flex-direction: column; padding: 3px 5px; border-radius: 5px; background: rgba(255, 255, 255, .05); }
.r4-side small { font-size: 7.5px; letter-spacing: .1em; color: var(--text-tertiary); }
.r4-side span { font: 700 10.5px 'Orbitron', sans-serif; color: #fff; }
.r4-side .r4-prog { height: 5px; padding: 0; overflow: hidden; }
.r4-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22c55e, #FFC107); transition: width .8s ease; }
.r4-mini-board { display: grid; grid-template-columns: repeat(5, 18px); gap: 2px; }
.r4-mini-board i { height: 18px; border-radius: 3px; font-style: normal; font-size: 9px; text-align: center; line-height: 18px; }
.r4-mini-board .is-open { background: rgba(34, 197, 94, .18); }
.r4-mini-board .is-flag { background: #3b2a12; }
.r4-record { animation: r4Hop .6s cubic-bezier(.3, 1.6, .5, 1) .3s both; }

/* 📥 Spotify'dan aktar */
.r4-sp {
  display: inline-block; flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin-right: 4px;
  background: #1DB954 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9.2c4-1.3 8.6-1 12 .9'/%3E%3Cpath d='M7 12.6c3.2-1 6.7-.7 9.4.8'/%3E%3Cpath d='M8 15.8c2.4-.7 4.8-.5 6.8.6'/%3E%3C/svg%3E") center / 76% no-repeat;
}
.r4-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r4-link.is-on { box-shadow: inset 0 0 0 1px rgba(29, 185, 84, .6); }
.r4-link .r4-sp { animation: r4Pop .3s ease; }
.r4-thinking { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-tertiary); font-style: italic; }
.r4-thinking .dc-typing { padding: 0; }
.r4-imp-ok { font-size: 11.5px; line-height: 1.45; padding: 6px 8px; border-radius: 6px; background: rgba(34, 197, 94, .12); color: #d1fae5; }
.r4-imp-sub { font-size: 10px; color: var(--text-tertiary); margin-top: -3px; }
.r4-imp-meta { font-size: 10px; font-weight: 500; color: var(--text-tertiary); margin-left: 4px; }
.r4-imp-list { display: flex; flex-direction: column; gap: 2px; }
.r4-imp-row {
  display: grid; grid-template-columns: 12px auto minmax(0, 1fr) auto; grid-template-areas: "n s t d" "n s a d"; column-gap: 4px; align-items: center;
  padding: 2px 5px; border-radius: 5px; background: rgba(255, 255, 255, .03); font-size: 10.5px; line-height: 1.25;
  animation: r4Up .35s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--d) * 60ms + .15s);
}
.r4-imp-row > span:first-child { grid-area: n; color: var(--text-tertiary); font-size: 9.5px; }
.r4-imp-row .r4-sp { grid-area: s; margin: 0; }
.r4-imp-row b { grid-area: t; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r4-imp-row small { grid-area: a; font-size: 9.5px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r4-imp-row em { grid-area: d; font-style: normal; font-size: 9.5px; color: var(--text-tertiary); }
.r4-imp-more { font-size: 10px; color: var(--text-tertiary); padding: 2px 5px; animation: r4Up .35s ease both; animation-delay: calc(var(--d) * 60ms + .15s); }

/* erişilebilirlik: kayma/dolma yok, adımlar anlık */
@media (prefers-reduced-motion: reduce) {
  .r4s *, .r4s *::before, .r4s *::after { animation: none !important; transition: none !important; }
  .r4-lb-bar { clip-path: none; }
}
