:root {
  --bg: #0e0c0c;
  --panel: #1b1717;
  --panel2: #2b2222;
  --text: #f6f0f0;
  --muted: #b5a8a8;
  --accent: #e5262b;
  --accent2: #7d0f14;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }

/* Üst menü */
.top { position: sticky; top: 0; z-index: 10; background: rgba(14, 12, 12, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid #ffffff12; }
.top-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.logo img { width: 34px; height: 34px; border-radius: 10px; }
.logo b { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top nav { margin-left: auto; display: flex; gap: 18px; color: var(--muted); font-size: 0.95rem; }
.top nav a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent2), var(--accent)); min-height: 220px; display: flex; align-items: center; }
.hero img { position: absolute; right: 0; top: 0; height: 100%; width: 55%; object-fit: cover; opacity: 0.55; mask-image: linear-gradient(to left, #000 40%, transparent); -webkit-mask-image: linear-gradient(to left, #000 40%, transparent); }
.hero-text { position: relative; z-index: 1; padding: 28px; max-width: 560px; }
.hero h2 { margin: 8px 0; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; }
.hero p { margin: 0 0 16px; color: #ffffffdd; }
.badge { background: #00000040; padding: 4px 12px; border-radius: 99px; font-size: 0.8rem; font-weight: 600; }

.btn { display: inline-block; background: #fff; color: #1a1730; border: 0; padding: 10px 20px; border-radius: 99px; font-weight: 700; cursor: pointer; font-size: 0.95rem; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: var(--panel2); color: var(--text); }

/* Arama + kategori */
.tools { margin: 22px 0 10px; display: flex; flex-direction: column; gap: 14px; }
#search { width: 100%; background: var(--panel); border: 1px solid #ffffff1a; color: var(--text); padding: 13px 18px; border-radius: 99px; font-size: 1rem; outline: none; }
#search:focus { border-color: var(--accent); }
.chips, .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--panel); color: var(--muted); border: 1px solid #ffffff14; padding: 6px 14px; border-radius: 99px; font-size: 0.88rem; cursor: pointer; font: inherit; font-size: 0.88rem; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
.sec-head h2 { margin: 0; font-size: 1.25rem; }
.sec-head span { color: var(--muted); font-size: 0.9rem; }

/* Oyun kartları */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.card { background: var(--panel); border-radius: 14px; overflow: hidden; display: block; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px #00000066; }
.thumb { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--panel2), var(--accent2)); display: grid; place-items: center; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .initial { font-size: 2.4rem; font-weight: 800; opacity: 0.5; }
.meta { padding: 10px 12px 12px; }
.meta h3 { margin: 0; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat { color: var(--muted); font-size: 0.8rem; }
.empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 40px 0; }
.more-wrap { text-align: center; margin-top: 22px; }
[hidden] { display: none !important; }

/* Oyun sayfası */
.stage { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; max-height: 78vh; width: 100%; }
.stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.notfound { height: 100%; display: grid; place-content: center; text-align: center; gap: 16px; padding: 40px 16px; aspect-ratio: auto; }
.info { margin-top: 18px; }
.info h1 { margin: 0 0 10px; font-size: clamp(1.4rem, 4vw, 2rem); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.desc { color: #d9d5f5; max-width: 760px; }
.note { color: var(--muted); font-size: 0.85rem; }

/* Metin sayfaları */
.doc { max-width: 760px; }
.doc h1 { font-size: 2rem; margin-top: 8px; }
.doc h2 { margin-top: 28px; font-size: 1.2rem; }
.doc p, .doc li { color: #d9d5f5; }
.doc a { color: var(--accent); text-decoration: underline; }

/* Alt bilgi */
footer { border-top: 1px solid #ffffff12; color: var(--muted); font-size: 0.88rem; padding: 22px 16px; text-align: center; }
footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
footer a:hover { color: var(--text); }

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero img { opacity: 0.3; width: 100%; }
  .stage { aspect-ratio: 4 / 5; max-height: 80vh; }
  .top nav { gap: 12px; font-size: 0.85rem; }
}

/* Oyun uzayı (3D) */
.space-title { margin: 6px 0 4px; font-size: clamp(1.5rem, 4vw, 2.2rem); }
.space-hint { margin: 0 0 14px; color: var(--muted); max-width: 720px; }
.space-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: 0.92rem; }
.space-controls select { background: var(--panel); color: var(--text); border: 1px solid #ffffff1a; border-radius: 10px; padding: 7px 10px; margin-left: 6px; font: inherit; }
.space-wrap { position: relative; height: min(72vh, 720px); min-height: 420px; border-radius: var(--radius); overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #2a1414 0%, #120a0a 55%, #070505 100%); border: 1px solid #ffffff12; }
.space-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline-offset: -3px; }
.space-wrap canvas.grab { cursor: grabbing; }
.tip { position: absolute; width: 176px; background: #1b1717f2; border: 1px solid #ffffff22; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; z-index: 2; font-size: 0.85rem; }
.tip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.tip span { color: var(--muted); font-size: 0.78rem; }
.space-status { color: var(--muted); font-size: 0.85rem; margin: 8px 0 12px; }
.space-chips { margin-bottom: 8px; }
.chip .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
@media (max-width: 560px) { .space-wrap { height: 66vh; min-height: 380px; } }

/* Galeri evi (3D) */
.ev-body { margin: 0; overflow: hidden; background: #8fd0ff; overscroll-behavior: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.ev-home { position: fixed; top: 10px; left: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; background: #140f0fcc; border-radius: 12px; padding: 5px 12px 5px 6px; color: #fff; }
.ev-home img { width: 28px; height: 28px; border-radius: 7px; }
.ev-hud { position: fixed; top: 10px; right: 10px; z-index: 5; background: #140f0fcc; color: #fff; border-radius: 12px; padding: 7px 12px; font-size: 0.85rem; max-width: 55vw; }
.ev-cross { position: fixed; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #000a; z-index: 4; pointer-events: none; }
.ev-prompt { position: fixed; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); z-index: 4; background: #140f0fe6; color: #fff; padding: 7px 14px; border-radius: 10px; font-weight: 600; max-width: 86vw; text-align: center; pointer-events: none; }
.ev-loading, .ev-err { position: fixed; inset: 0; display: grid; place-content: center; z-index: 8; background: #140f0f; color: #fff; font-size: 1.1rem; text-align: center; padding: 20px; }
.ev-start { position: fixed; inset: 0; z-index: 7; display: grid; place-items: center; background: #140f0fb0; padding: 14px; overflow: auto; }
.ev-card { background: var(--panel, #1b1717); color: #fff; border: 1px solid #ffffff22; border-radius: 18px; padding: 22px; max-width: 520px; }
.ev-card h1 { margin: 0 0 8px; font-size: 1.6rem; }
.ev-card ul { padding-left: 18px; color: #d9d5f5; line-height: 1.7; }
.ev-card kbd { background: #ffffff1c; border-radius: 5px; padding: 1px 6px; font-size: 0.85em; }
.ev-msg { color: #ffb3b3; font-weight: 600; }
.ev-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ev-overlay { position: fixed; inset: 0; z-index: 9; background: #000; display: flex; flex-direction: column; }
.ev-bar { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: #140f0f; color: #fff; }
.ev-bar b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-frame { flex: 1; min-height: 0; }
.ev-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.ev-touch { position: fixed; inset: auto 0 0 0; height: 0; z-index: 6; }
.ev-stick { position: fixed; left: 22px; bottom: 26px; width: 120px; height: 120px; border-radius: 50%; background: #ffffff30; border: 2px solid #ffffff66; display: grid; place-items: center; touch-action: none; }
.ev-nub { width: 52px; height: 52px; border-radius: 50%; background: #ffffffcc; pointer-events: none; }
.ev-btns { position: fixed; right: 18px; bottom: 26px; display: flex; gap: 12px; align-items: flex-end; }
.ev-btns button { width: 58px; height: 58px; border-radius: 50%; border: 2px solid #ffffff88; background: #140f0fb0; color: #fff; font-size: 1.3rem; touch-action: none; }
.ev-btns button.use { width: 74px; height: 74px; background: #e5262b99; }
.ev-btns button.use.ready { background: #e5262b; box-shadow: 0 0 0 4px #ffffff66; }
