@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Roboto+Condensed:wght@400;500;600;700;800&display=swap');

/* Oyun Arası oyun sayfaları için ortak iskelet.
   Her oyunun kendi styles.css dosyasından sonra yüklenir; ana sayfanın renklerini,
   yazı tiplerini ve logosunu oyunlara taşır. Oyunun vurgu rengi <body data-game>
   üzerinden gelir ve oyunların kullandığı --green / --deep değişkenlerine bağlanır. */
html { background: #f8f4ec; }

body.game-page {
  --accent: #0a2fb5;
  --accent-deep: #07227f;
  --accent-soft: #e4e9fb;
  --orange: #f25a1d;
  --paper: #f8f4ec;
  --ink: #0d1b4c;
  --muted: #59607c;
  --surface: #fffdf8;
  --line: #e7e2d6;
  --green: var(--accent);
  --deep: var(--accent);
  --mint: var(--accent-soft);
  --lime: #fecf40;
  --shadow: 0 18px 44px rgb(13 27 76 / .1);
  background: var(--paper);
  color: var(--ink);
  font-family: 'Roboto Condensed', system-ui, sans-serif;
}
body[data-game='2048'] { --accent: #0a2fb5; --accent-deep: #07227f; --accent-soft: #e4e9fb; }
body[data-game='mayin-tarlasi'] { --accent: #1768a0; --accent-deep: #0f4c77; --accent-soft: #dcf1fb; }
body[data-game='hafiza'] { --accent: #6a3dc2; --accent-deep: #4f2a99; --accent-soft: #efe6fc; }
body[data-game='xox'] { --accent: #0a2fb5; --accent-deep: #07227f; --accent-soft: #e4e9fb; }
body[data-game='sudoku'] { --accent: #b86e00; --accent-deep: #7d4a00; --accent-soft: #fdf0d2; }
body[data-game='tetris'] { --accent: #5b2bb5; --accent-deep: #3d1c7c; --accent-soft: #ece3fb; }
body[data-game='soliter'] { --accent: #0f7a55; --accent-deep: #0a5239; --accent-soft: #dcf2e9; }
body[data-game='mahjong'] { --accent: #2f7d3a; --accent-deep: #1f5527; --accent-soft: #e2f1e3; }
body[data-game='kelime-avi'] { --accent: #c2185b; --accent-deep: #85103e; --accent-soft: #fbe1ec; }
body[data-game='araba'] { --accent: #d6362b; --accent-deep: #93221a; --accent-soft: #fde2df; }
body[data-game='sekil'] { --accent: #c43d78; --accent-deep: #892852; --accent-soft: #fbe2ee; }
body[data-game='harfane'] { --accent: #1f7a4d; --accent-deep: #14553f; --accent-soft: #e0f2e8; --green-dark: #14553f; }
body[data-game='tavla'] { --accent: #b5462f; --accent-deep: #7a2c1c; --accent-soft: #f8e4db; }
body[data-game='okey'] { --accent: #9f3eaa; --accent-deep: #602665; --accent-soft: #f3e2f5; }
body[data-game='pisti'] { --accent: #d65338; --accent-deep: #963a29; --accent-soft: #f9e6dd; }

.game-page a { text-decoration: none; }
.game-page :is(a, button, select, input, [tabindex]):focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.game-page :is(kbd, input, select, textarea) { font-family: inherit; }
.game-page :is(.heading h1, .game-heading h1, .home-heading h1, .game-intro h1, .how-to h2, .modal h2,
  .score-card > strong, .stats strong, .counters strong, .scoreboard strong, .turn-card strong, .progress-copy > strong,
  .mode-card strong, .streak-card strong, .stat strong, #countdown, .tile, .cell, .how-icon) {
  font-family: 'Fredoka', 'Roboto Condensed', sans-serif;
  letter-spacing: -.01em;
}
.game-page :is(.heading h1, .game-heading h1, .home-heading h1, .game-intro h1) { font-weight: 700; letter-spacing: -.02em; }
.game-page :is(.heading h1, .game-heading h1) > span { color: var(--orange); }

.game-page .back-link { color: var(--ink); font-size: 14px; font-weight: 500; }
.game-page .back-link:hover { color: var(--accent); }
.game-page :is(.account-button, .auth-button) { white-space: nowrap; }
.game-page .account-button { border-color: var(--line); background: var(--surface); color: var(--ink); font-size: 14px; }
.game-page .account-button:hover { border-color: var(--accent); color: var(--accent); }
.game-page .account-eyebrow, .game-page .account-switch { color: var(--accent); }
.game-page .account-submit { background: var(--ink); }
.game-page .account-form input:focus { border-color: var(--accent); outline-color: color-mix(in srgb, var(--accent) 20%, transparent); }



/* readable minimum sizes */
.game-page .eyebrow { font-size: 12px; letter-spacing: .12em; }
.game-page .intro, .game-page .intro-copy { font-size: 15px; }
.game-page :is(.stats span, .counters span, .scoreboard span, .score-card > span, .level-picker, .aside-label, .footer-label) { font-size: 11px; }
.game-page :is(.status, .message) { font-size: 14px; }
.game-page :is(.help, .board-help, .save-state, .best, .how-to p) { font-size: 13px; line-height: 1.6; }
.game-page .board-footer { font-size: 11px; }
.game-page kbd { font-size: 12px; }
.game-page .level-picker select { font-size: 14px; }

/* buttons */
.game-page .button { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.game-page :is(.primary, .button-primary) { border-color: var(--accent); background: var(--accent); color: #fff; }
.game-page :is(.primary, .button-primary):hover:not(:disabled) { border-color: var(--accent-deep); background: var(--accent-deep); }
.game-page .button-primary span { color: var(--lime); }
.game-page :is(.quiet, .button-quiet) { border-color: var(--line); background: var(--surface); color: var(--ink); }
.game-page :is(.quiet, .button-quiet):hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.game-page .quiet[aria-pressed='true'] { border-color: var(--orange); background: #ffe7dc; color: #9a3208; }

/* surfaces */
.game-page :is(.score-card, .stats > div, .counters > div, .scoreboard > div, .turn-card) { border-color: var(--line); background: var(--surface); }
.game-page .best-card { background: var(--accent-soft); }

.play-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; align-items: start; margin: 32px 0 30px; }
.play-extras > .how-card, .play-extras > .goal-card, .play-extras > .more-card { grid-area: auto; }
.play-extras .goal-equation b { min-width: 52px; height: 52px; font-size: 26px; }
.goal-equation .goal-green { background: #2f9e62; color: #fff; }
.goal-equation .goal-yellow { background: #f4c84f; color: var(--ink); }
.goal-equation .goal-gray { background: #8f9892; color: #fff; }
@media (max-width: 1099px) { .play-extras { grid-template-columns: repeat(2, minmax(0, 1fr)); } .play-extras .how-card { grid-column: 1 / -1; } }
@media (max-width: 760px) { .play-extras { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; } .play-extras > * { width: 100%; } }
body[data-game='harfane'] .share-button:disabled { opacity: .45; cursor: not-allowed; }

/* more games + footer */
.more-games { margin: 8px 0 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.more-games-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.more-games h2 { margin: 0; color: var(--ink); font: 700 22px / 1 'Roboto Condensed', sans-serif; letter-spacing: -.01em; }
.more-games-all { color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.more-games-all:hover { color: var(--accent); }
.more-games-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.more-tile { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 6px 6px 10px; border-radius: 16px; background: #fff; box-shadow: 0 3px 10px rgb(13 27 76 / .1); transition: transform .18s, box-shadow .18s; }
.more-art { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 11px; background: #e4dfd3; }
.more-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.more-tile.wide .more-art img { object-position: left center; }
.more-cover { display: grid; grid-template-columns: repeat(var(--cols), 1fr); align-content: center; justify-content: center; gap: 5%; height: 100%; padding: 16%; background: var(--c); }
.more-cover i { display: grid; place-items: center; aspect-ratio: 1; border-radius: 18%; background: #fff; color: var(--t, var(--ink)); font: 700 clamp(12px, 2.2vw, 20px) / 1 'Fredoka', sans-serif; font-style: normal; box-shadow: 0 2px 0 rgb(0 0 0 / .12); }
.more-cover[style*='--t'] i { background: rgb(255 255 255 / .16); }
.more-cover[style*='--cols: 4'] { gap: 4%; padding: 14% 9%; }
.more-cover i:empty { opacity: .7; }
.more-cover i[data-tone='g'] { background: #3fb56f; color: #fff; }
.more-cover i[data-tone='y'] { background: #f4c84f; color: var(--ink); }
.more-cover i[data-tone='x'] { background: #8f9892; color: #fff; }
.more-cover i[data-tone='r'] { background: #f0503a; color: #fff; }
.more-cover i[data-tone='b'] { background: #2f6fe0; color: #fff; }
.more-cover i[data-tone='c'] { background: #33c3e6; color: #fff; }
.more-cover i[data-tone='p'] { background: #a066ec; color: #fff; }
.more-cover i[data-tone='o'] { background: #ff9a2e; color: #fff; }
.more-cover i[data-tone='n'] { background: rgb(255 255 255 / .16); box-shadow: none; }
.more-cover i[data-tone='w'] { background: #fff; color: var(--ink); }
.more-cover i[data-tone='h'] { background: #fff; color: #d62f3a; }
.more-cover i[data-tone='j'] { background: #fff; color: #1f8a3c; }
.more-text { display: grid; gap: 2px; padding: 0 4px; }
.more-text strong { color: var(--ink); font: 700 16px / 1.15 'Roboto Condensed', sans-serif; }
.more-text small { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
a.more-tile:hover, a.more-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 22px rgb(13 27 76 / .18); }
.game-page .footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0 22px; border-top: 1px solid var(--line); align-items: center; border-top-color: var(--line); color: var(--muted); font-size: 13px; }
.game-page .footer .logo-word { color: transparent; font-size: 20px; }

@media (max-width: 600px) {
  .game-page .back-link { font-size: 13px; }
  .more-games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-page .stats > div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .game-page .scoreboard > div { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@media (max-width: 520px) {
  body[data-game='harfane'] .back-link { display: none; }
}
@media (max-width: 380px) {
  .game-page .back-link { font-size: 12px; }
  body[data-game='harfane'] .topbar-actions { gap: 4px; }
  body[data-game='harfane'] .topbar-actions .auth-button { padding: 4px 3px; font-size: 9px; }
  body[data-game='harfane'] .topbar-actions .icon-button { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .more-tile { transition: none; }
  a.more-tile:hover, a.more-tile:focus-visible { transform: none; }
}

/* Favori düğmesi (konum çubuğunun sağında) */
.favorite-toggle { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 7px 14px 7px 11px; border: 1.5px solid var(--line, #e2ddd0); border-radius: 999px; background: #fff; color: var(--ink, #0d1b4c); font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; transition: border-color .15s, background .15s; }
.crumbs .favorite-toggle svg { width: 18px; height: 18px; fill: none; stroke: #e0405f; stroke-width: 2; }
.favorite-toggle[aria-pressed='true'] { border-color: #f4b6c3; background: #fff0f3; }
.crumbs .favorite-toggle[aria-pressed='true'] svg { fill: #e0405f; }
.favorite-toggle:hover { border-color: #e0405f; }
@media (max-width: 760px) { .favorite-toggle span { display: none; } .favorite-toggle { padding: 7px 9px; } }
