/* ============================================================
   MORLUP — /play mini oyunlar sayfası
   ============================================================ */
.play-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.play-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s, border-color 0.2s;
}
.play-card:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  border-color: var(--violet);
  box-shadow: 0 18px 40px rgba(139, 92, 246, 0.25);
}

/* Kapak: görsel varsa o, yoksa CSS ile çizilmiş mini tahta */
.play-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(ellipse at 50% 30%, rgba(139, 92, 246, 0.35), transparent 70%), var(--bg-soft-2);
  overflow: hidden;
}
.play-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.play-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pc-row { display: flex; gap: 6px; }
.pc-row span {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 19px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}
.pc-row .c { background: #8b5cf6; color: #fff; }
.pc-row .p { background: #f29e33; color: #17102e; }
.pc-row .a { background: #2a2347; color: #8f87b5; }
:root[data-theme="light"] .pc-row .a { background: #b9b1d0; color: #fff; }
.pc-wolf { position: absolute; right: 18px; bottom: 10px; font-size: 40px; animation: pc-bob 2.6s ease-in-out infinite; }
@keyframes pc-bob {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(4px, -6px) rotate(6deg); }
  75% { transform: translate(-4px, -6px) rotate(-6deg); }
}
.play-card:hover .pc-row span { animation: pc-flip 0.5s ease both; }
.play-card:hover .pc-row span:nth-child(2) { animation-delay: 0.06s; }
.play-card:hover .pc-row span:nth-child(3) { animation-delay: 0.12s; }
.play-card:hover .pc-row span:nth-child(4) { animation-delay: 0.18s; }
.play-card:hover .pc-row span:nth-child(5) { animation-delay: 0.24s; }
@keyframes pc-flip { 50% { transform: rotateX(90deg); } }

.play-info { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.play-tags { display: flex; gap: 8px; align-items: center; }
.play-tag { font-size: 12.5px; color: var(--ink-faint); }
.play-info h3 { font-size: 22px; color: var(--ink); }
.play-info p { margin: 0; color: var(--ink-dim); font-size: 15px; flex: 1; }
.play-btn { align-self: flex-start; margin-top: 8px; }

/* Kapak görseli yüklenemezse: büyük emoji */
.pc-emoji { font-size: 64px; animation: pc-bob 2.6s ease-in-out infinite; }

/* ============================================================
   Ana sayfa: yana kayan mini oyunlar listesi
   ============================================================ */
.mini-rail-wrap { position: relative; }
.mini-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 4px;
  padding: 8px 4px 12px;
  margin: -8px -4px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mini-rail::-webkit-scrollbar { display: none; }
.mini-rail > .play-card { flex: 0 0 min(320px, 76vw); scroll-snap-align: start; }
.mini-rail > .play-card:hover { transform: translateY(-6px); }


/* Kenarlarda yumuşak kararma: devamı olduğunu hissettirir */
.mini-rail-wrap::before, .mini-rail-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 30px; width: 60px; z-index: 4;
  pointer-events: none; opacity: 0; transition: opacity 0.25s;
}
.mini-rail-wrap::before { left: -4px; background: linear-gradient(90deg, var(--bg), transparent); }
.mini-rail-wrap::after { right: -4px; background: linear-gradient(270deg, var(--bg), transparent); }
.mini-rail-wrap.scrollable:not(.at-start)::before, .mini-rail-wrap.scrollable:not(.at-end)::after { opacity: 0.85; }

/* Listenin sonundaki "Tüm mini oyunları gör" kartı */
.play-more {
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 22px;
  text-align: center;
  border: 1.5px solid rgba(139, 92, 246, 0.55);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(139, 92, 246, 0.35), transparent 65%),
    linear-gradient(160deg, rgba(139, 92, 246, 0.14), rgba(242, 158, 51, 0.08)),
    var(--bg-soft);
  overflow: hidden;
}
.play-more:hover { border-color: var(--violet-bright); box-shadow: 0 18px 40px rgba(139, 92, 246, 0.3); }
.mini-rail > .play-more { flex-basis: min(260px, 70vw); }
.play-more b { font-family: "Fredoka", sans-serif; font-size: 21px; color: var(--ink); line-height: 1.2; }
.play-more > span:not(.pm-stack):not(.play-more-ic) { font-size: 14px; color: var(--ink-dim); }
.pm-stack { position: relative; width: 150px; height: 92px; margin-bottom: 6px; }
.pm-thumb {
  position: absolute; top: 6px; left: 50%;
  width: 104px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: var(--bg-soft-2);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  transform: translateX(calc(-50% + (var(--i) - 1) * 26px)) rotate(calc((var(--i) - 1) * 9deg));
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.pm-thumb:nth-child(2) { z-index: 2; top: 0; }
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-more:hover .pm-thumb { transform: translateX(calc(-50% + (var(--i) - 1) * 40px)) rotate(calc((var(--i) - 1) * 14deg)); }
.pm-count {
  position: absolute; right: -6px; bottom: 0; z-index: 3;
  min-width: 38px; height: 38px; padding: 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f29e33; color: #fff; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px;
  box-shadow: 0 0 0 3px var(--bg-soft), 0 6px 14px rgba(242, 158, 51, 0.45);
}
.play-more-ic {
  margin-top: 4px;
  width: 54px; height: 54px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, #a67bfb, #7c3aed);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.5);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.play-more-ic svg { width: 24px; height: 24px; }
.play-more:hover .play-more-ic { transform: translateX(6px) scale(1.08); }

/* Oklar: büyük, mor, parlak */
.rail-btn {
  display: none;
  position: absolute;
  top: calc(50% - 15px);
  z-index: 6;
  width: 54px; height: 54px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #a67bfb, #7c3aed);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.55), 0 0 0 6px rgba(139, 92, 246, 0.16);
  transform: translateY(-50%);
  transition: opacity 0.25s, transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s;
}
.rail-btn svg { width: 24px; height: 24px; }
.rail-btn.prev { left: -26px; }
.rail-btn.next { right: -26px; }
.rail-btn:hover:not(:disabled) { transform: translateY(-50%) scale(1.12); box-shadow: 0 14px 32px rgba(124, 58, 237, 0.7), 0 0 0 8px rgba(139, 92, 246, 0.22); }
.rail-btn.next:not(:disabled) { animation: rail-nudge 2.4s ease-in-out 1.5s 3; }
@keyframes rail-nudge { 0%, 70%, 100% { translate: 0 0; } 80% { translate: 6px 0; } 90% { translate: 0 0; } }
.rail-btn:active:not(:disabled) { transform: translateY(-50%) scale(0.95); }
.rail-btn:disabled { opacity: 0; pointer-events: none; transform: translateY(-50%) scale(0.6); }
@media (hover: hover) and (min-width: 700px) {
  .mini-rail-wrap.scrollable .rail-btn { display: inline-flex; align-items: center; justify-content: center; }
}

/* Altta noktalar */
.rail-dots { display: none; justify-content: center; gap: 8px; margin-top: 6px; }
.mini-rail-wrap.scrollable .rail-dots { display: flex; }
.rail-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px;
  background: var(--line); cursor: pointer;
  transition: width 0.3s, background 0.3s;
}
.rail-dots button.on { width: 28px; background: var(--violet); }

/* Kartlar alana tam sığsın: masaüstünde 3, tablette 2 kart; oklar her
   basışta tam bir kart kaydırır, sonda yarım/küçük kayma olmaz */
@media (min-width: 640px) {
  .mini-rail > .play-card, .mini-rail > .play-more { flex: 0 0 calc((100% - 20px) / 2); }
}
@media (min-width: 960px) {
  .mini-rail > .play-card, .mini-rail > .play-more { flex: 0 0 calc((100% - 40px) / 3); }
}
/* Kartlar tam sığdığında kenar karartmasına gerek yok (kartı soldurmasın) */
@media (min-width: 640px) {
  .mini-rail-wrap::before, .mini-rail-wrap::after { display: none; }
}

/* ============================================================
   /play: kategori çipleri + bölümler
   ============================================================ */
.play-cats {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: -6px 0 26px; min-height: 42px;
}
.play-cat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px 9px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg-soft); color: var(--ink-dim);
  font-family: "Fredoka", sans-serif; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}
.play-cat span { font-size: 16px; line-height: 1; }
.play-cat i { font-style: normal; font-size: 11.5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; background: rgba(139, 92, 246, 0.18); color: var(--violet-bright); }
.play-cat:hover { border-color: var(--violet); color: var(--ink); transform: translateY(-2px); }
.play-cat.active { background: linear-gradient(180deg, #a67bfb, #7c3aed); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4); }
.play-cat.active i { background: rgba(255, 255, 255, 0.25); color: #fff; }

.play-list { display: flex; flex-direction: column; gap: 40px; }
.play-list.swap { animation: play-swap 0.35s ease-out; }
@keyframes play-swap { from { opacity: 0; transform: translateY(10px); } }
.play-sec-title { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: "Fredoka", sans-serif; }
.play-sec-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; background: rgba(139, 92, 246, 0.16); border: 1px solid rgba(166, 123, 251, 0.35); }
.play-sec-title > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.2; }
.play-sec-title b { font-size: 22px; color: var(--ink); font-weight: 600; }
.play-sec-title small { font-family: "Manrope", sans-serif; font-size: 13.5px; font-weight: 500; color: var(--ink-dim); }
.play-sec-title em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--ink-faint); padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); }
.play-sec-title::after { content: ""; display: none; }

@media (max-width: 640px) {
  /* Telefonda çipler alt alta sarılır: hepsi tek bakışta görünür, kaydırma yok */
  .play-cats { flex-wrap: wrap; gap: 7px; margin: -10px 0 24px; }
  .play-cat { padding: 7px 11px 7px 9px; font-size: 13.5px; gap: 5px; border-width: 1px; }
  .play-cat span { font-size: 14px; }
  .play-cat i { min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; }
  .play-list { gap: 32px; }
  .play-sec-title b { font-size: 19px; }
  .play-sec-ic { width: 38px; height: 38px; font-size: 19px; }
}
