/* ==========================================================================
   Groyt — Animasyonlu komut önizlemeleri, 4 Ekim (js/previews-r5.js)
   Sahne kabı .r4s (previews-r4.css): sabit yükseklik, en yeni mesaj altta.
   ========================================================================== */
.r5s { position: relative; }
.r4s.r5s { height: 370px; }

/* Discord mesaj kutusu + yazılan komut */
.r5-input {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 34px; margin-top: 4px;
  padding: 7px 10px; border-radius: 8px; background: #1e2130; border: 1px solid rgba(255, 255, 255, .06);
  font-size: 11.5px; color: var(--text-primary);
}
.r5-typed { color: var(--blue-bright); font-weight: 600; white-space: nowrap; }
.r5-typed:empty::before { content: 'Mesaj gönder…'; color: var(--text-tertiary); font-weight: 400; }
.r5-caret { width: 1.5px; height: 14px; background: var(--text-primary); animation: r5Caret 1s steps(1) infinite; }
@keyframes r5Caret { 50% { opacity: 0; } }
.r5-optchip { padding: 2px 7px; border-radius: 5px; font-size: 10.5px; color: var(--text-secondary); background: rgba(255, 255, 255, .08); animation: r4Pop .25s ease; }
.r5-optchip b { color: #fff; }
.r5-optchip[hidden] { display: none; }

/* İmleç */
.r5-cursor {
  position: absolute; left: 0; top: 0; z-index: 5; width: 16px; height: 20px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 20'%3E%3Cpath d='M1 1v15l4-3.6 2.6 5.8 2.6-1.2L7.6 11.3H13z' fill='%23fff' stroke='%23111' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0 / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6));
  transition: transform .55s cubic-bezier(.45, .05, .25, 1);
}
.r5-cursor::after { content: ''; position: absolute; left: -7px; top: -7px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #FFC107; opacity: 0; }
.r5-cursor.is-click::after { animation: r5Click .5s ease-out; }
@keyframes r5Click { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.7); } }

/* 3 sütunlu bilgi kutuları (kalın sayılar) */
.r5-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.r5-box { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 5px 6px; border-radius: 6px; background: rgba(255, 255, 255, .05); }
.r5-box small { font-size: 9px; color: var(--text-tertiary); overflow-wrap: anywhere; }
/* Dar sahnede (≈360 px) değerler kesilmesin, alt satıra geçsin. */
.r5-box b { font-size: 12px; font-weight: 800; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
.r5-box span { font-size: 9px; color: var(--text-secondary); overflow-wrap: anywhere; }
.r5-box .cp-code { font-size: 9.5px; padding: 0 3px; }
.r5-joins { margin-top: 5px; font-size: 10px; color: var(--text-secondary); }
.r5-joins b { color: #fff; }
.r5-gicon { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; font: 800 9px 'Orbitron', sans-serif; background: #FFC107; color: #1a1400; }
.r5-swap { animation: r4In .4s cubic-bezier(.16, 1, .3, 1) both; }

/* Seçim menüsü (sayfa menüsü, rol seçimi) */
.r5-menu { position: relative; }
.r5-menu.is-open > span { cursor: default; }
.r5-menu .is-cur { color: #fff; }
.r5-menu.is-press, .r5-pick span.is-press { animation: r4Press .45s ease; }
.r5-pick { margin: 0 0 4px; }
.r5-pick span { display: flex; align-items: center; gap: 6px; }
.r5-rdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.r5-pick span.is-hl, .r5-menu span.is-hl { background: rgba(255, 193, 7, .2); box-shadow: inset 0 0 0 1px rgba(255, 193, 7, .6); color: #fff; }

/* Rol kartı */
.r5-role-head { display: flex; align-items: center; gap: 9px; }
.r5-role-head small { display: block; font-size: 9.5px; color: var(--text-tertiary); }
.r5-role-orb { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #d4843d, #ffde90); box-shadow: 0 0 14px rgba(212, 132, 61, .55); }
.r5-role-name { font-size: 14px; font-weight: 800; background: linear-gradient(90deg, #d4843d, #ffde90); -webkit-background-clip: text; background-clip: text; color: transparent; }
.r5-grad { display: inline-block; width: 100%; max-width: 60px; height: 8px; margin: 3px 0 1px; border-radius: 99px; background: linear-gradient(90deg, #d4843d, #ffde90); }
.r5-btnwrap { position: relative; }
.r5-tip {
  position: absolute; right: 0; bottom: calc(100% + 4px); padding: 4px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600; white-space: nowrap;
  color: #fff; background: #111320; border: 1px solid rgba(255, 193, 7, .55); box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .3s ease;
}
.r5-tip.is-on { opacity: 1; transform: none; }

/* Minecraft başarım görseli */
.r5-mc-wrap { margin: 4px 0; }
.r5-mc {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; max-width: 280px;
  padding: 8px 10px; background: #212121;
  /* piksel çerçeve: dış siyah + iç açık/koyu kenar */
  box-shadow: 0 0 0 2px #000, inset 2px 2px 0 #555, inset -2px -2px 0 #0d0d0d;
  image-rendering: pixelated;
  opacity: 0; transform: translateX(-40px);
}
.r5-mc.is-in { animation: r5Slide .6s cubic-bezier(.16, 1, .3, 1) forwards; }
@keyframes r5Slide { to { opacity: 1; transform: none; } }
.r5-mc-item { width: 32px; height: 32px; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .5)); }
.r5-mc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; font: 700 11px/1.25 ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .02em; text-shadow: 2px 2px 0 #3f3f00; }
.r5-mc-text b { color: #ffff55; }
.r5-mc-text span { color: #ffff55; text-shadow: 2px 2px 0 #3f3f00; overflow-wrap: anywhere; }

/* Sistem satırı */
.r5-sys { font-size: 10.5px; color: var(--text-tertiary); padding-left: 4px; }
.r5-sys b { color: #86efac; }

/* İlerleme */
.r5-prog { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.r5-prog .r4-bar { margin: 0; }
.r5-prog .r4-bar i { transition: width .3s ease; }
.r5-prog b { font: 800 11px 'Orbitron', sans-serif; color: #fff; font-variant-numeric: tabular-nums; }

/* Pencere (modal) */
.r5-modal { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 10px; background: rgba(4, 5, 10, .72); animation: r4In .3s ease both; }
.r5-modal-card { display: flex; flex-direction: column; gap: 7px; width: min(260px, 100%); padding: 12px; border-radius: 10px; background: #1b1e2b; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .9); }
.r5-modal-card > b { font-size: 12.5px; color: #fff; }
.r5-modal-card > small { font-size: 10px; color: var(--text-tertiary); }
.r5-users { display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .3); }
.r5-users span { display: flex; align-items: center; gap: 7px; padding: 6px 8px; font-size: 11px; color: var(--text-secondary); transition: background .25s ease; }
.r5-users span + span { border-top: 1px solid rgba(255, 255, 255, .06); }
.r5-users em { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 9px; font-weight: 700; color: #cfd6ee; background: #3a4160; }
.r5-check { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid rgba(255, 255, 255, .35); flex-shrink: 0; }
.r5-users span.is-on { background: rgba(255, 193, 7, .14); color: #fff; }
.r5-users span.is-on .r5-check { background: #FFC107 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%231a1400' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% no-repeat; border-color: #FFC107; }
.r5-users span.is-press { animation: r4Press .45s ease; }
.r5-modal-btns { display: flex; justify-content: flex-end; gap: 6px; }
.r5-modal-btns i { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 4px 10px; border-radius: 5px; color: var(--text-secondary); }
.r5-modal-btns i.is-primary { background: #5865f2; color: #fff; }
.r5-modal-btns i.is-press { animation: r4Press .45s ease; }

@media (prefers-reduced-motion: reduce) {
  .r5s *, .r5s *::before, .r5s *::after { animation: none !important; transition: none !important; }
  .r5-mc { opacity: 1; transform: none; }
}

/* Katalog kartındaki "YENİ" rozeti (js/main.js → isNew) */
.cmd-new {
  margin-left: 6px; padding: 1px 6px; border-radius: 4px; font: 800 9px 'Orbitron', sans-serif; letter-spacing: .1em;
  color: #1a1400; background: linear-gradient(120deg, var(--blue), var(--blue-bright));
}
