@import url(fonts/fonts.css);
:root { --bg: #fff3d6; --kart: #ffffff; --yazi: #14213d; --soluk: #4a5672; --hat: #14213d; --sari: #ffd400; --deniz: #1668d6; }
* { box-sizing: border-box; }
body {
  margin: 0 auto; max-width: 1440px; padding: 0 16px 32px; color: var(--yazi);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image: linear-gradient(#14213d0a 1px, transparent 1px), linear-gradient(90deg, #14213d0a 1px, transparent 1px);
  background-size: 16px 16px;
}
body::before { /* dört takım şeridi */
  content: ""; position: fixed; inset: 0 0 auto 0; height: 8px; z-index: 5;
  background: linear-gradient(90deg, #d0021b 0 12.5%, #fdb912 0 25%, #0b2a6f 0 37.5%, #ffe600 0 50%, #111 0 62.5%, #fff 0 75%, #8c1d40 0 87.5%, #5fbfee 0);
}
h1, .skor b, .skor span, .takim, #dik, .ust a, .ust button, .sayfa h2, .buyuk { font-family: "Pixelify Sans", "Courier New", monospace; }

.ust { display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; }
.ust a, .ust button {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border: 3px solid var(--hat); border-radius: 0;
  background: #fff; color: var(--yazi); font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--hat);
}
.ust a:active, .ust button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--hat); }
.ust button[aria-pressed="true"] { background: var(--sari); }

header { text-align: center; padding: 14px 0 6px; }
h1 { margin: 0; font-size: clamp(38px, 9vw, 72px); font-weight: 700; line-height: 1; letter-spacing: 3px; color: var(--yazi); text-shadow: 4px 4px 0 #5fbfee; }
h1 span { color: #d0021b; text-shadow: 4px 4px 0 #fdb912; }
h1 a { color: inherit; text-decoration: none; }
.alt { margin: 10px 0 0; font-weight: 700; color: var(--soluk); }

#skor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.skor {
  background: var(--a); color: var(--b); border: 3px solid var(--hat); box-shadow: 5px 5px 0 var(--hat);
  padding: 10px 8px 8px; text-align: center; display: grid; gap: 2px;
}
.skor b { font-size: 44px; line-height: 1; }
.skor span { font-size: 17px; font-weight: 700; }
.skor small { font-size: 13px; opacity: .9; }
.skor.lider { animation: zipla 1.6s ease-in-out infinite; }
@keyframes zipla { 50% { transform: translateY(-4px); box-shadow: 5px 9px 0 var(--hat); } }

#secim { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.etiket { margin: 0; font-weight: 700; }
#takimlar { display: flex; gap: 10px; flex-wrap: wrap; }
.takim {
  min-height: 46px; padding: 0 16px 0 10px; display: flex; gap: 8px; align-items: center; cursor: pointer;
  background: var(--a); color: var(--b); border: 3px solid var(--hat); border-radius: 0; font-size: 18px; font-weight: 700;
  box-shadow: 3px 3px 0 var(--hat);
}
.takim i { width: 18px; height: 18px; background: var(--b); border: 2px solid var(--hat); }
.takim[aria-pressed="true"] { opacity: 1; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--hat); outline: 3px solid var(--sari); outline-offset: 2px; }

.gorunum { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 700; }
.gorunum button { min-height: 38px; padding: 0 12px; border: 3px solid var(--hat); background: #fff; color: var(--yazi); font: 700 15px "Pixelify Sans", monospace; cursor: pointer; }
.gorunum button[aria-pressed="true"] { background: var(--yazi); color: #fff; }
.harita-kutu { position: relative; background: var(--deniz); border: 3px solid var(--hat); box-shadow: 6px 6px 0 var(--hat); padding: 4px; }
#kaydir { overflow: auto; max-height: 72vh; -webkit-overflow-scrolling: touch; }
#sahne { position: relative; width: max-content; }
canvas { display: block; image-rendering: pixelated; cursor: crosshair; touch-action: manipulation; }
#imlec { position: absolute; outline: 2px solid #fff; box-shadow: 0 0 0 2px #000, 0 0 14px 4px #fff; pointer-events: none; animation: yanip 0.8s steps(2) infinite; }
@keyframes yanip { 50% { outline-color: #ffd400; } }
.zoom { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.zoom button { width: 44px; height: 44px; border: 3px solid var(--hat); background: #fff; color: var(--yazi); font-size: 26px; font-weight: 700; cursor: pointer; box-shadow: 3px 3px 0 var(--hat); }

#panel { background: var(--kart); border: 3px solid var(--hat); box-shadow: 6px 6px 0 var(--hat); padding: 14px; margin-top: 18px; display: grid; gap: 10px; }
#panel p { margin: 0; }
#bilgi { min-height: 2.9em; font-size: 17px; }
.dagilim { display: flex; height: 14px; overflow: hidden; background: #e8e2d2; margin-top: 6px; border: 2px solid var(--hat); }
#dik {
  min-height: 54px; border: 3px solid var(--hat); border-radius: 0; font-size: 22px; font-weight: 700; cursor: pointer;
  background: var(--a, var(--sari)); color: var(--b, var(--yazi)); box-shadow: 4px 4px 0 var(--hat);
}
#dik:not(:disabled):hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--hat); }
#dik:disabled { background: #e8e2d2; color: var(--soluk); cursor: not-allowed; box-shadow: none; }
#durum { color: var(--soluk); font-weight: 600; }
footer { color: var(--soluk); font-size: 13px; margin-top: 24px; }
button:focus-visible, a:focus-visible { outline: 3px solid #d0021b; outline-offset: 3px; }
@media (max-width: 560px) { #skor { grid-template-columns: repeat(2, 1fr); } .skor b { font-size: 36px; } }
@media (prefers-reduced-motion: reduce) { .skor.lider, #imlec { animation: none; } }

/* Nasıl oynanır */
.sayfa { background: var(--kart); border: 3px solid var(--hat); box-shadow: 6px 6px 0 var(--hat); padding: 8px 20px 24px; margin-top: 18px; }
.sayfa h2 { font-size: 24px; margin: 22px 0 8px; color: #d0021b; }
.sayfa ol, .sayfa ul { padding-left: 22px; }
.sayfa li { margin: 6px 0; }
.renkler { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; padding: 0 !important; }
.renkler li { display: flex; gap: 8px; align-items: center; padding: 6px 12px; background: var(--a); color: var(--b); border: 3px solid var(--hat); font-weight: 700; }
.renkler i { width: 14px; height: 14px; background: var(--b); border: 2px solid var(--hat); }
.buyuk { display: inline-block; margin-top: 18px; padding: 12px 20px; background: var(--sari); color: var(--yazi); border: 3px solid var(--hat); box-shadow: 4px 4px 0 var(--hat); font-size: 20px; font-weight: 700; text-decoration: none; }

/* Canlı akış (yan panel) */
.duzen { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .duzen { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .yan { position: sticky; top: 16px; } }
.yan { display: grid; gap: 16px; margin-top: 18px; }
.kutu { background: var(--kart); border: 3px solid var(--hat); box-shadow: 5px 5px 0 var(--hat); padding: 12px 14px; }
.kutu h2 { margin: 0 0 8px; font: 700 20px "Pixelify Sans", monospace; display: flex; align-items: center; gap: 8px; }
.kucuk { margin: 0 0 8px; font-size: 14px; color: var(--soluk); }
.canli-nokta { width: 12px; height: 12px; background: #e10600; border: 2px solid var(--hat); animation: canli 1.2s steps(2) infinite; }
@keyframes canli { 50% { opacity: .25; } }
.sutunlar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; height: 130px; align-items: end; }
.sutun { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.sutun i { width: 100%; min-height: 3px; border: 2px solid; border-bottom: 0; transition: height .5s; }
.sutun b, .sutun span { font: 700 14px "Pixelify Sans", monospace; }
.pay { display: flex; height: 22px; border: 3px solid var(--hat); overflow: hidden; }
.pay i { transition: width .5s; }
.pay-yazi { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-weight: 700; font-size: 14px; }
.pay-yazi span { display: flex; align-items: center; gap: 5px; }
.pay-yazi i, #akis i { width: 14px; height: 14px; background: var(--a); border: 2px solid var(--b); outline: 1px solid var(--hat); flex: none; }
.akis-kutu { max-height: 460px; overflow: hidden; display: flex; flex-direction: column; }
#akis { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
#akis li { display: grid; grid-template-columns: 14px 44px 1fr auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 2px dashed #e8e2d2; font-size: 15px; }
#akis li b { font: 700 15px "Pixelify Sans", monospace; }
#akis li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#akis li time { font-size: 12px; color: var(--soluk); }
#akis li.yeni { animation: gir .6s ease-out; background: color-mix(in srgb, var(--a) 16%, #fff); }
@keyframes gir { from { transform: translateX(30px); opacity: 0; } }
.nabiz { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 3px solid var(--a); box-shadow: 0 0 0 2px #000; pointer-events: none; animation: nabiz 1.5s ease-out forwards; }
@keyframes nabiz { to { transform: scale(7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #akis li.yeni, .nabiz, .canli-nokta { animation: none; } }
