/* ==========================================================================
   CrosV simülatörü — piksel sahne + uygulama penceresi
   Renkler ve düzen CrosV uygulamasının kendi arayüzünden alınmıştır.
   ========================================================================== */
.sim {
  --s-bg: #0f1117; --s-bg2: #151924; --s-card: #1a1f2c; --s-card2: #212739; --s-line: #2b3247; --s-muted: #8f97ad;
  position: relative; overflow: hidden; border-radius: 20px; background: var(--s-bg); color: #e8ebf3; font-size: 14px; line-height: 1.45;
  border: 1px solid var(--line-2); box-shadow: 0 60px 120px -50px rgba(0, 0, 0, .9), 0 0 140px -50px rgba(124, 92, 255, .55);
}

/* Sahne */
.sim-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #8fcaff; container-type: inline-size; isolation: isolate; }
.sim-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: crisp-edges; image-rendering: pixelated; }
.sim-hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-px); color: #fff; text-shadow: .25cqw .25cqw 0 #14121a; }
.sim-hearts { position: absolute; top: 2.4cqw; left: 2.4cqw; display: flex; gap: .5cqw; }
.sim-hearts svg { width: 3.4cqw; height: 3.4cqw; image-rendering: pixelated; filter: drop-shadow(.25cqw .25cqw 0 #14121a); transition: opacity .2s, filter .2s; }
.sim-hearts svg.lost { opacity: .22; filter: grayscale(1) drop-shadow(.25cqw .25cqw 0 #14121a); }
.sim-xp { position: absolute; top: 1.8cqw; left: 50%; width: 34cqw; transform: translateX(-50%); display: grid; justify-items: center; gap: .2cqw; }
.sim-xp .lv { font-weight: 700; font-size: 3.2cqw; line-height: 1; color: #8cf06a; text-shadow: .3cqw .3cqw 0 #14121a, -.2cqw 0 0 #14121a, 0 -.2cqw 0 #14121a; }
.sim-xp .bar { position: relative; width: 100%; height: 1.7cqw; background: #1b1822; border: .45cqw solid #0e0d13; box-shadow: inset 0 .3cqw 0 #2a2633; }
.sim-xp .fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, #7ee05a 0 1.4cqw, #5cc23c 1.4cqw 1.6cqw); box-shadow: inset 0 .4cqw 0 #b8f59a, inset 0 -.3cqw 0 #3f9a2a; transition: width .35s steps(8); }
.sim-xp .tk { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - .4cqw), #0e0d13 calc(10% - .4cqw) 10%); }
.sim-tomb { position: absolute; top: 2cqw; right: 2.4cqw; display: flex; align-items: center; gap: .8cqw; padding: .6cqw 1.2cqw .6cqw .8cqw; background: rgba(34, 31, 43, .86); border: .4cqw solid #0e0d13; box-shadow: inset .4cqw .4cqw 0 #3d3850, inset -.4cqw -.4cqw 0 #16141d; }
.sim-tomb svg { width: 3.2cqw; height: 3.6cqw; image-rendering: pixelated; }
.sim-tomb b { font-size: 2.6cqw; line-height: 1; color: #f4e27a; min-width: 1.2ch; text-align: center; }
.sim-tomb.hit { animation: sim-shake .5s steps(6); }
.sim-banner { position: absolute; left: 50%; top: 11.5cqw; transform: translate(-50%, -8px); opacity: 0; display: inline-flex; align-items: center; gap: 1cqw; padding: .8cqw 1.8cqw; max-width: 82cqw; white-space: nowrap; font-weight: 700; font-size: 2.7cqw; background: rgba(15, 17, 23, .72); border: .35cqw solid rgba(0, 0, 0, .8); box-shadow: inset .3cqw .3cqw 0 rgba(255, 255, 255, .12); transition: opacity .25s, transform .25s steps(4); }
.sim-banner.show { opacity: 1; transform: translate(-50%, 0); }
.sim-banner .who { color: #ffd66b; }
.sim-banner .arrow { color: #aab; }
.sim-flash { position: absolute; inset: 0; background: #fff; opacity: 0; mix-blend-mode: screen; }
.sim-flash.go { animation: sim-flash .55s ease-out; }
.sim-vig { position: absolute; inset: 0; opacity: 0; background: radial-gradient(70% 70% at 50% 50%, transparent 40%, rgba(255, 70, 40, .55)); transition: opacity .2s; }
.sim-vig.go { opacity: 1; }
@keyframes sim-flash { 0% { opacity: .9; } 100% { opacity: 0; } }
@keyframes sim-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px) rotate(-2deg); } 40% { transform: translateX(6px) rotate(2deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* Küçük akış (mini mod) */
.sim-mini-feed { position: absolute; left: 2.2cqw; bottom: 2.2cqw; width: 36cqw; display: grid; gap: .8cqw; pointer-events: none; }
.sim-mini-feed .row { display: flex; align-items: center; gap: 1cqw; padding: .8cqw 1.2cqw; background: rgba(15, 17, 23, .78); border: 1px solid rgba(255, 255, 255, .1); border-radius: 1.2cqw; font: 500 1.9cqw/1.2 var(--font-body); animation: sim-in .4s var(--ease); white-space: nowrap; overflow: hidden; backdrop-filter: blur(4px); }
.sim-mini-feed .row b { color: #fff; font-weight: 600; }
.sim-mini-feed .row .res { color: var(--mint-2); margin-left: auto; padding-left: 1cqw; font-weight: 600; }
.sim-mini-feed .row .em { font-size: 2.4cqw; }
@keyframes sim-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* Uygulama penceresi (tam mod) */
.simwin-bar { display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: var(--s-bg2); border-bottom: 1px solid var(--s-line); }
.simwin-dots { display: flex; gap: 6px; }
.simwin-dots i { width: 11px; height: 11px; border-radius: 50%; background: #343b50; }
.simwin-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
.simwin-brand img { width: 22px; height: 22px; border-radius: 6px; }
.simwin-brand small { display: block; font-weight: 400; font-size: 11px; color: var(--s-muted); line-height: 1; margin-top: 2px; }
.simwin-tabs { display: flex; gap: 2px; margin-left: 8px; overflow: hidden; }
.simwin-tabs span { padding: 7px 12px; border-radius: 8px; color: var(--s-muted); font-size: 13px; white-space: nowrap; }
.simwin-tabs span.on { color: #fff; background: var(--s-card2); box-shadow: inset 0 -2px 0 #22d3a6; }
.simwin-status { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 9px 16px; background: var(--s-bg2); border-bottom: 1px solid var(--s-line); font-size: 12px; color: var(--s-muted); }
.simwin-status span { display: inline-flex; align-items: center; gap: 8px; }
.simwin-status b { font-weight: 600; color: #e8ebf3; padding: 2px 9px; border-radius: 999px; background: rgba(52, 211, 153, .14); color: #34d399; }
.simwin-body { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr); gap: 14px; padding: 14px; align-items: start; }
.sim-card { background: var(--s-card); border: 1px solid var(--s-line); border-radius: 12px; overflow: hidden; }
.sim-card > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--s-line); font-weight: 600; font-size: 13px; }
.sim-card > header small { color: var(--s-muted); font-weight: 400; font-size: 11.5px; }
.sim-col { display: grid; gap: 14px; min-width: 0; }
.sim-card .sim-stage { border-radius: 0; }

/* Canlı akış */
.sim-feed { height: 236px; padding: 6px 8px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28%); mask-image: linear-gradient(180deg, transparent 0, #000 28%); } /* yeni satır altta, eskiler yukarıda solar */
.sim-feed .row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 9px; background: rgba(255, 255, 255, .025); animation: sim-in .35s var(--ease); font-size: 13px; }
.sim-feed .row .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.sim-feed .row .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-feed .row .tx b { font-weight: 600; }
.sim-feed .row .tx span { color: var(--s-muted); }
.sim-feed .row .res { font-size: 12px; font-weight: 600; color: #22d3a6; background: rgba(34, 211, 166, .1); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.sim-feed .row .res.warn { color: #fbbf24; background: rgba(251, 191, 36, .1); }
.c0 { background: #7c5cff; } .c1 { background: #22a6d3; } .c2 { background: #e8435a; } .c3 { background: #3fae5a; } .c4 { background: #d9822b; } .c5 { background: #a347b8; }

/* Kurallar */
.sim-rules { padding: 6px; display: grid; gap: 4px; }
.sim-rule { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .025); border: 1px solid transparent; transition: background .2s, border-color .2s; text-align: left; width: 100%; }
.sim-rule:hover, .sim-rule.is-hot { background: rgba(34, 211, 166, .07); border-color: rgba(34, 211, 166, .35); }
.sim-rule .em { font-size: 20px; line-height: 1; text-align: center; }
.sim-rule .rt { min-width: 0; font-size: 13px; }
.sim-rule .rt b { font-weight: 600; }
.sim-rule .rt small { display: block; color: var(--s-muted); font-size: 11.5px; }
.sim-rule .try { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px; background: #22d3a6; color: #04241c; transition: transform .2s var(--ease), filter .2s; }
.sim-rule:hover .try { transform: translateY(-1px); filter: brightness(1.08); }
.sim-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--s-line); }
.sim-stats > div { background: var(--s-card); padding: 12px 14px; display: grid; gap: 4px; }
.sim-stats b { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sim-stats span { font-size: 11.5px; color: var(--s-muted); }
@media (max-width: 520px) { .sim-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sim-auto { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--s-muted); cursor: pointer; user-select: none; }
.sim-auto input { appearance: none; width: 30px; height: 17px; border-radius: 999px; background: #343b50; position: relative; transition: background .2s; cursor: pointer; }
.sim-auto input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.sim-auto input:checked { background: #22d3a6; }
.sim-auto input:checked::after { transform: translateX(13px); }
.sim-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--s-line); color: var(--s-muted); font-size: 12px; }

@media (max-width: 880px) {
  .simwin-body { grid-template-columns: minmax(0, 1fr); }
  /* Dar ekranda sütunlar çözülür; sıra: oyun görünümü → canlı akış → kurallar → istatistik */
  .sim-col { display: contents; }
  .c-game { order: 1; } .c-feed { order: 2; } .c-rules { order: 3; } .c-stats { order: 4; }
  .simwin-tabs { display: none; }
  .sim-feed { height: 190px; }
}
@media (max-width: 520px) { .simwin-dots { display: none; } .simwin-status { gap: 6px 14px; } }
@media (prefers-reduced-motion: reduce) { .sim-feed .row, .sim-mini-feed .row { animation: none; } }
