/* ============================================================
   MORLUP — yeni mini oyunlar için ortak görünüm (g- önekli)
   2048 Kurt Evrimi, Kayan Yapboz, Boyama bu dosyayı kullanır.
   ============================================================ */
.g-page { padding: 16px 16px 40px; display: flex; justify-content: center; }
.g-wrap { width: 100%; max-width: 640px; display: flex; flex-direction: column; align-items: center; }
.g-head { width: 100%; display: grid; grid-template-columns: 76px 1fr 76px; align-items: center; gap: 8px; }
.g-head > .icon-btn { justify-self: start; }
.g-titles { text-align: center; }
.g-titles h1 { font-size: 28px; margin: 0; }
.g-titles p { margin: 4px 0 0; color: var(--ink-dim); font-size: 14px; }
.g-statsbox {
  justify-self: end;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink);
  font-family: "Fredoka", sans-serif; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.g-statsbox:hover { border-color: var(--violet); transform: translateY(-2px); }
.g-statsbox span { font-size: 15px; white-space: nowrap; }
.g-statsbox b { color: #ffcc33; }
.g-statsbox small { font-size: 11px; color: var(--ink-dim); }

/* Sekmeler (seviye / mod) */
.g-tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.g-tab {
  position: relative; display: inline-flex; align-items: baseline; gap: 5px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-dim);
  font-family: "Fredoka", sans-serif; font-size: 14px; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.g-tab small { font-size: 11px; opacity: 0.7; }
.g-tab:hover { border-color: var(--violet); color: var(--ink); }
.g-tab.active { background: var(--violet); border-color: var(--violet); color: #fff; }
.g-tab-stars { position: absolute; top: -9px; right: 6px; font-style: normal; font-size: 10px; letter-spacing: -1px; color: #ffcc33; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }

/* Üst bilgi */
.g-hud { width: 100%; max-width: 520px; display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: center; gap: 10px; margin: 14px 0 12px; }
.g-stat { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.g-stat small { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.g-stat b { font-family: "Fredoka", sans-serif; font-size: 22px; color: var(--ink); }
.g-btn-dash {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px dashed var(--violet); background: transparent; color: var(--violet-bright);
  font-family: "Fredoka", sans-serif; font-size: 14px; cursor: pointer;
}
.g-btn-dash:hover:not(:disabled) { background: var(--badge-bg); }
.g-btn-dash:disabled { opacity: 0.4; cursor: default; }

/* Bildirim */
.g-toast {
  position: fixed; top: 96px; left: 50%; transform: translate(-50%, -10px); z-index: 4600;
  background: var(--ink); color: var(--bg);
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 15px;
  padding: 10px 18px; border-radius: 12px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; text-align: center; max-width: 90vw;
}
.g-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Pencereler */
.g-modal { position: fixed; inset: 0; z-index: 4500; background: rgba(6, 4, 14, 0.78); display: flex; align-items: center; justify-content: center; padding: 16px; animation: g-fade 0.25s ease-out; }
@keyframes g-fade { from { opacity: 0; } }
.g-card {
  position: relative; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.25), transparent 70%), var(--bg-soft);
  border: 1px solid var(--line); border-radius: 22px; padding: 24px 22px 20px; text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: g-card-in 0.35s cubic-bezier(.34,1.56,.64,1);
  scrollbar-width: thin; scrollbar-color: var(--violet) transparent;
}
@keyframes g-card-in { from { transform: scale(0.85); opacity: 0; } }
.g-card.end { animation: g-end-in 0.6s cubic-bezier(.22, 1.2, .36, 1) both; }
@keyframes g-end-in { 0% { transform: scale(1.9); opacity: 0; filter: blur(6px); } 60% { opacity: 1; filter: blur(0); } 100% { transform: scale(1); opacity: 1; } }
.g-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink-dim); cursor: pointer; z-index: 2; }
.g-card h3 { font-size: 24px; margin: 6px 0 8px; }
.g-card p { color: var(--ink-dim); font-size: 14.5px; margin: 0 0 12px; }
.g-how { list-style: none; padding: 0; margin: 12px 0 16px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.g-how li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-dim); font-size: 14.5px; }
.g-how li span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--violet); color: #fff; font-family: "Fredoka", sans-serif; font-size: 14px; }
.g-go { font-size: 17px; padding: 13px 32px; }

/* Sonuç penceresi */
.g-end-stars { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.g-end-stars i { font-style: normal; font-size: 46px; line-height: 1; color: rgba(255, 255, 255, 0.15); }
.g-end-stars i:nth-child(2) { font-size: 58px; transform: translateY(-6px); }
.g-end-stars i.on { color: #ffcc33; text-shadow: 0 0 16px rgba(255, 204, 51, 0.6); animation: g-star 0.5s cubic-bezier(.34,1.8,.64,1) both; animation-delay: calc(0.45s + var(--i) * 0.22s); }
@keyframes g-star { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
.g-end-sub { color: var(--violet-bright) !important; font-family: "Fredoka", sans-serif; font-size: 14px; }
.g-end-big { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: 10px; }
.g-end-big b { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 50px; line-height: 1; color: var(--ink); }
.g-end-big span { color: var(--ink-dim); font-size: 15px; }
.g-end-big em { font-style: normal; font-family: "Fredoka", sans-serif; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #4abf8c; color: #fff; align-self: center; }
.g-end-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.g-end-stats div { display: flex; flex-direction: column; align-items: center; }
.g-end-stats b { font-family: "Fredoka", sans-serif; font-size: 19px; color: var(--ink); }
.g-end-stats span { font-size: 12px; color: var(--ink-faint); }
.g-end-main { display: flex; gap: 10px; margin-bottom: 10px; }
.g-end-main .btn { flex: 1 1 0; justify-content: center; padding-left: 10px; padding-right: 10px; }
.g-end-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-sub {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: rgba(139, 92, 246, 0.08);
  color: var(--ink); font-family: "Fredoka", sans-serif; font-size: 14.5px; line-height: 1.15;
  text-decoration: none; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.g-sub svg { flex: none; width: 18px; height: 18px; color: var(--violet-bright); }
.g-sub:hover { border-color: var(--violet); background: rgba(139, 92, 246, 0.2); transform: translateY(-2px); }

/* Geçmiş penceresi */
.g-card.history { width: min(480px, 100%); display: flex; flex-direction: column; overflow: hidden; padding-bottom: 14px; }
.g-h-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.g-h-sum div { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 14px; background: var(--bg-soft-2); border: 1px solid var(--line); }
.g-h-sum b { font-family: "Fredoka", sans-serif; font-size: 22px; color: var(--ink); line-height: 1.1; }
.g-h-sum span { font-size: 12px; color: var(--ink-faint); }
.g-h-sum .gold { border-color: rgba(255, 204, 51, 0.6); background: linear-gradient(180deg, rgba(255, 204, 51, 0.16), rgba(255, 204, 51, 0.04)); }
.g-h-sum .gold b { color: #ffcc33; }
.g-h-scroll {
  text-align: left;
  max-height: min(58vh, 520px); overflow-y: auto; overscroll-behavior: contain;
  margin: 0 -10px; padding: 0 10px 8px;
  scrollbar-width: thin; scrollbar-color: var(--violet) transparent;
  will-change: transform; transform: translateZ(0);
}
.g-h-scroll::-webkit-scrollbar, .g-card::-webkit-scrollbar { width: 8px; }
.g-h-scroll::-webkit-scrollbar-track { background: rgba(139, 92, 246, 0.08); border-radius: 99px; }
.g-h-scroll::-webkit-scrollbar-thumb, .g-card::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #a67bfb, #7c3aed); border-radius: 99px; }
.g-h-title { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 8px; font-family: "Fredoka", sans-serif; font-size: 15.5px; color: var(--ink); }
.g-h-title small { font-size: 12px; color: var(--ink-faint); font-weight: 500; }
.g-st { display: inline-flex; gap: 1px; }
.g-st i { font-style: normal; font-size: 15px; line-height: 1; color: rgba(255, 255, 255, 0.16); }
.g-st i.on { color: #ffcc33; }
.g-hday { margin: 12px 0 6px; font-family: "Fredoka", sans-serif; font-size: 13px; letter-spacing: 0.04em; color: var(--violet-bright); }
.g-hday:first-child { margin-top: 0; }
.g-row {
  display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 6px; border-radius: 13px;
  background: var(--bg-soft-2); border: 1px solid var(--line);
  font-family: "Fredoka", sans-serif;
}
.g-row time { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.g-row-main { font-size: 15px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.g-row-main img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex: none; }
.g-row-main small { font-size: 11.5px; color: var(--ink-faint); }
.g-row-n { text-align: right; font-size: 14px; color: var(--ink); line-height: 1.15; }
.g-row-n small { font-size: 11.5px; color: var(--ink-faint); }
.g-row.top { border-color: rgba(255, 204, 51, 0.55); background: linear-gradient(90deg, rgba(255, 204, 51, 0.12), rgba(255, 204, 51, 0.02)); }
.g-h-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; text-align: center; }
.g-h-empty img { width: 90px; height: 90px; object-fit: contain; }
.g-h-empty p { margin: 0; color: var(--ink-dim); font-size: 14.5px; }

/* Seçilme olmasın */
.page:has(.g-wrap) main, .g-wrap, .g-wrap *, .g-modal, .g-modal * { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.g-modal [class$="-share-preview"] { -webkit-user-select: text; user-select: text; }

@media (max-width: 640px) {
  .g-page { padding-top: 10px; }
  .g-head { grid-template-columns: 64px 1fr 64px; }
  .g-titles h1 { font-size: 22px; }
  .g-titles p { display: none; }
  .g-tabs { margin-top: 8px; }
  .g-tab { padding: 5px 11px; font-size: 13px; }
  .g-hud { margin: 12px 0 8px; gap: 6px; }
  .g-stat b { font-size: 19px; }
  .g-row { grid-template-columns: 42px 1fr auto auto; gap: 8px; padding: 8px 10px; }
  body:has(.g-wrap) .egg-moon { display: none; }
}
@media (prefers-reduced-motion: reduce) { .g-card, .g-card.end, .g-end-stars i.on { animation: none; } }
/* Resimler basılı tutunca sürüklenmesin / büyüteç çıkmasın */
.g-wrap img, .g-modal img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.g-modal button img, .g-wrap button img { pointer-events: none; }

/* Geçmiş: en üstte sabit rekor satırı */
.g-row.g-rec { border-color: rgba(255, 204, 51, 0.8); background: linear-gradient(90deg, rgba(255, 204, 51, 0.2), rgba(255, 204, 51, 0.05)); box-shadow: 0 0 18px rgba(255, 204, 51, 0.15); margin-bottom: 6px; }
.g-row.g-rec .g-row-n { color: #ffcc33; font-weight: 600; }
.g-toast { max-width: min(460px, 90vw); line-height: 1.4; } .g-toast.show { pointer-events: auto; cursor: pointer; }
