:root{
  --ok:#22c55e;
  --no:#ef4444;
  --bg:#f7f7fb;
  --card:#ffffff;
  --ink:#0f172a;
  --brand:#3b5998;   /* header + Yeni Tur */
  --accent:#34A853;  /* Kontrol Et + Tam Ekran */
  --header-h:70px;
  --content-max:1000px;
  --wrap-pad:24px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; padding:0; }
html
body{ 
  font-family:'Mulish', ui-sans-serif, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
               'Noto Color Emoji','Twemoji Mozilla','Segoe UI Emoji','Apple Color Emoji';
  background:linear-gradient(180deg,#ffffff,var(--bg));
  color:var(--ink);
  overflow:hidden; /* scroll gizlendi */
}

/* İçerik alanı tam ortada */
.page-content{
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
}
body.fullscreen-active .page-content{
  margin-top: 0;
  min-height: 100vh;
}

/* ========== SABİT HEADER ========== */
.fixed-header{
  position:fixed;
  top:0; left:0; width:100%;
  height: var(--header-h);
  z-index:1000;
  background: var(--brand);
  color:#fff;
  box-shadow:0 2px 5px rgba(0,0,0,0.2);

  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 20px;
}
.fixed-header .logo{
  font-size:1.5em;
  font-weight:800;
  letter-spacing:.2px;
}
.home-button{
  background-color:#4CAF50;
  color:#fff;
  border:none; border-radius:5px;
  padding:8px 15px;
  font-size:1em;
  cursor:pointer;
  display:flex; align-items:center; gap:6px;
  transition:background-color .3s ease, transform .15s ease;
  font-family:inherit;
}
.home-button:hover{ background-color:#45a049; transform:translateY(-1px); }

/* --- MOBİL UYARISI --- */
.mobile-not-supported-message{
  display:none;
  justify-content:center; align-items:center;
  position:fixed; inset:0;
  z-index:9999;
  background-color:#e0f2f7;
}
.mobile-not-supported-message .message-content{
  background:#fff;
  border-radius:10px;
  box-shadow:0 4px 15px rgba(0,0,0,0.2);
  padding:40px 24px;
  max-width:500px;
  width:calc(100% - 40px);
  margin:0 20px;
  color:#333;
  font-family:'Mulish', sans-serif;
  text-align:center;
}
.mobile-not-supported-message h2{ font-size:2em; color:#3b5998; margin-bottom:20px; }
.mobile-not-supported-message p{ font-size:1.2em; line-height:1.6; margin-bottom:10px; }
@media (max-width:768px){
  html,body{ overflow:hidden!important; height:100%; margin:0; padding:0; }
  .mobile-not-supported-message{ display:flex!important; }
}

/* ---------- Oyun Alanı ---------- */
.wrap{
  width:100%;
  max-width: var(--content-max);
  padding: var(--wrap-pad);
  margin:0 auto;
  display:flex; justify-content:center;
}
.game-area{
  position:relative;
  display:inline-block;
  padding:0 10px;
  margin:0 auto;
}
.grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
  font-family:'Mulish', sans-serif;
}
@media (max-width:900px){
  .grid{ grid-template-columns:repeat(3,1fr); gap:18px; }
}
@media (max-width:640px){
  .game-area{ padding:0; display:flex; flex-direction:column; align-items:center; gap:16px; }
  .grid{ gap:16px; }
  .round-btn{ position:static; transform:none; width:80px; height:80px; font-size:13px; margin:0 6px; }
}

/* Kartlar (yatay dikdörtgen) */
.card{
  background:var(--card);
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:12px;
  box-shadow:0 8px 20px rgba(2,6,23,.08);

  min-width:180px;
  min-height:140px;

  display:flex; flex-direction:column; align-items:center; justify-content:space-between;
  transition:transform .1s ease, box-shadow .2s ease, outline-color .2s ease;
  font-family:'Mulish', sans-serif;
}
.card:active{ transform:scale(.98); }
.card.selected{ outline:3px solid var(--brand); }
.card.correct { outline:3px solid var(--ok); }
.card.wrong   { outline:3px solid var(--no); }
.card.disabled{ pointer-events:none; opacity:.7; }

.img{
  width:90px; height:90px;
  border-radius:14px; background:#f3f4f6;
  display:grid; place-items:center;
  margin:4px auto 8px;
  font-size:48px;
}
.card.selected .img{ background:#eef2ff; }
.label{
  font-size:18px;
  font-weight:800;
  text-align:center;
  font-family:'Mulish', sans-serif;
}

/* Yan Yuvarlak Butonlar */
.round-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:100px; height:100px;
  border-radius:50%;
  border:none; color:#fff;
  font-size:15px; font-weight:800;
  text-align:center; line-height:1.2;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  transition:transform .15s ease, filter .2s ease;
  display:flex; align-items:center; justify-content:center;
  padding:10px; user-select:none; white-space:pre-line;
}
.right-btn{ right:-120px; background:var(--accent); }
.left-btn { left:-120px;  background:var(--brand);  }
.round-btn:hover{ filter:brightness(.95); transform:translateY(-50%) scale(1.08); }
.round-btn:active{ transform:translateY(-50%) scale(.92); }

/* Sağ altta sabit Tam Ekran butonu (dikdörtgen) */
.fullscreen-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  min-width: 140px;
  height: 50px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, filter 0.2s ease;
  padding: 0 16px;
}
.fullscreen-btn:hover { filter: brightness(0.95); transform: scale(1.05); }
.fullscreen-btn:active { transform: scale(0.92); }

/* Telif yazısı en altta */
.info-text {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  text-align: center;
  font-size: 0.9em;
  color: #666;
  z-index: 0;
  padding: 5px 10px;
  box-sizing: border-box;
}
body.fullscreen-active .info-text {
  bottom: 100px;
}
.info-text p { margin: 0; }

/* Shake */
.shake-card{ animation:shake-card .28s ease; }
@keyframes shake-card{
  0%{transform:translateX(0)}
  25%{transform:translateX(-6px)}
  50%{transform:translateX(6px)}
  75%{transform:translateX(-6px)}
  100%{transform:translateX(0)}
}
.shake-btn{ animation:shake-btn .28s ease; }
@keyframes shake-btn{
  0%{transform:translateY(-50%) translateX(0)}
  25%{transform:translateY(-50%) translateX(-6px)}
  50%{transform:translateY(-50%) translateX(6px)}
  75%{transform:translateY(-50%) translateX(-6px)}
  100%{transform:translateY(-50%) translateX(0)}
}

/* Modal */
.overlay{
  position:fixed; inset:0;
  background:rgba(15,23,42,.4);
  display:grid; place-items:center;
  z-index:50;
  backdrop-filter:blur(4px);
}
.dialog{
  width:min(92vw,420px);
  background:#fff;
  border-radius:20px;
  padding:22px;
  text-align:center;
  box-shadow:0 10px 32px rgba(2,6,23,.2);
  animation:pop .18s ease-out;
}
@keyframes pop{ from{transform:scale(.96);opacity:0} to{transform:scale(1);opacity:1} }
.result-emoji{ font-size:64px; line-height:1; margin-bottom:10px; }
.result-text{ font-size:20px; font-weight:800; margin-bottom:14px; }
.dialog-actions{ display:flex; justify-content:center; gap:10px; }
.dialog-actions .btn{
  min-width:120px; padding:12px 16px;
  border:none; border-radius:12px; font-weight:800; font-size:15px;
  cursor:pointer; box-shadow:0 6px 16px rgba(0,0,0,.15);
  transition:transform .12s ease, filter .2s ease, box-shadow .2s ease;
  font-family:inherit;
}
.dialog-actions .btn:hover{ filter:brightness(.97); transform:translateY(-1px); }
.dialog-actions .btn:active{ transform:translateY(0); }
#tryAgain.btn{ background:var(--no); color:#fff; }
#nextRound.btn{ background:var(--ok); color:#fff; }

body.modal-open{ overflow:hidden; }
img.emoji{ height:1.8em; width:1.8em; vertical-align:-0.3em; }
