:root {
  --puzzle-text: #f7fbff;
  --puzzle-muted: #c9d7e5;
  --puzzle-surface: rgba(10, 25, 43, 0.78);
  --puzzle-border: rgba(255, 255, 255, 0.16);
}

html {
  min-height: 100%;
  background: #07131f;
}

body {
  min-height: 100%;
  margin: 0;
  background: #07131f;
}

.puzzle-home,
.puzzle-home *,
.puzzle-home *::before,
.puzzle-home *::after {
  box-sizing: border-box;
}

.puzzle-topbar {
  height: 68px;
  padding: 0 20px;
  background: rgba(6, 18, 31, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.puzzle-topbar .hamburger {
  width: 43px;
  height: 43px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
  line-height: 43px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.puzzle-topbar .hamburger:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.04);
}

.puzzle-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.puzzle-brand:hover,
.puzzle-brand:focus {
  color: #fff;
  text-decoration: none;
}

.puzzle-brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  box-shadow: 0 8px 22px rgba(56, 189, 248, 0.28);
}

.puzzle-sidebar {
  z-index: 1300;
  display: flex;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.2), transparent 28%),
    linear-gradient(180deg, #0b1b2d 0%, #07131f 100%);
  box-shadow: 18px 0 55px rgba(0, 0, 0, 0.46);
}

.puzzle-sidebar-header {
  position: relative;
  display: flex;
  width: 288px;
  min-height: 92px;
  padding: 19px 48px 17px 17px;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.puzzle-sidebar-logo {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  box-shadow: 0 8px 22px rgba(56, 189, 248, 0.25);
  color: #fff;
  font-size: 18px;
}

.puzzle-sidebar-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.puzzle-sidebar-title strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
}

.puzzle-sidebar-title small {
  margin-top: 3px;
  color: #8fa7bc;
  font-size: 11px;
}

.puzzle-sidebar .closebtn {
  position: absolute;
  top: 27px;
  right: 13px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #dceaf5;
  font-size: 25px;
  font-weight: 300;
  line-height: 30px;
  box-shadow: none;
}

.puzzle-sidebar .closebtn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #7dd3fc;
}

.puzzle-sidebar-content {
  width: 288px;
  padding: 16px 12px 22px;
  flex: 1;
}

.puzzle-sidebar a {
  text-decoration: none;
}

.puzzle-sidebar-home {
  display: flex !important;
  padding: 11px 12px !important;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 13px;
  background: rgba(14, 116, 144, 0.18);
  color: #e6f7ff !important;
  font-size: 13px !important;
}

.puzzle-sidebar-home span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  font-size: 16px;
}

.puzzle-sidebar-home:hover,
.puzzle-sidebar-home:focus {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 116, 144, 0.3) !important;
}

.puzzle-sidebar-label {
  display: block;
  margin: 22px 10px 9px;
  color: #6f879d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.puzzle-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.puzzle-sidebar-menu > a {
  position: relative;
  display: flex;
  min-height: 46px;
  padding: 7px 34px 7px 8px;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #c8d7e4;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.puzzle-sidebar-menu > a::before {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  content: "A";
  font-size: 14px;
  font-weight: 800;
}

.puzzle-sidebar-menu > a::after {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #587087;
  content: "›";
  font-size: 20px;
  font-weight: 400;
  transform: translateY(-52%);
}

.puzzle-sidebar-menu > a:hover,
.puzzle-sidebar-menu > a:focus {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transform: translateX(3px);
}

.puzzle-sidebar-menu > a:nth-of-type(2)::before {
  background: rgba(52, 211, 153, 0.14);
  color: #34d399;
  content: "⌕";
}

.puzzle-sidebar-menu > a:nth-of-type(3)::before {
  background: rgba(167, 139, 250, 0.16);
  color: #a78bfa;
  content: "▦";
}

.puzzle-sidebar-menu > a:nth-of-type(4)::before {
  background: rgba(244, 114, 182, 0.15);
  color: #f472b6;
  content: "✦";
}

.puzzle-sidebar-menu > a:nth-of-type(5)::before {
  background: rgba(251, 113, 133, 0.15);
  color: #fb7185;
  content: "◎";
}

.puzzle-sidebar-menu > a:nth-of-type(6)::before {
  background: rgba(96, 165, 250, 0.16);
  color: #60a5fa;
  content: "9";
}

.puzzle-sidebar-menu > a:nth-of-type(7)::before {
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  content: "◉";
}

.puzzle-sidebar-menu > a:nth-of-type(8)::before {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  content: "?";
}

.puzzle-sidebar-menu > a[target="_blank"]::after {
  content: "↗";
  font-size: 13px;
}

.puzzle-sidebar-footer {
  width: 288px;
  padding: 14px 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.puzzle-sidebar-footer a {
  display: flex;
  min-height: 42px;
  padding: 10px 12px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #aebfd0;
  font-size: 12px;
  font-weight: 700;
}

.puzzle-sidebar-footer a:hover,
.puzzle-sidebar-footer a:focus {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.sidebar-backdrop {
  position: fixed;
  z-index: 1250;
  inset: 0;
  visibility: hidden;
  padding: 0;
  border: 0;
  background: rgba(1, 8, 15, 0.58);
  box-shadow: none;
  opacity: 0;
  cursor: default;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.is-visible {
  visibility: visible;
  opacity: 1;
}

.puzzle-home {
  position: relative;
  min-height: 100vh;
  padding: 108px 20px 54px;
  overflow: hidden;
  background-color: #07131f;
  background-image: url("../resimler/arka-plan.jpg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  isolation: isolate;
}

.puzzle-home::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 14, 26, 0.52) 0%, rgba(4, 14, 26, 0.78) 65%, rgba(4, 14, 26, 0.94) 100%),
    radial-gradient(circle at 50% 12%, rgba(56, 189, 248, 0.17), transparent 38%);
  content: "";
}

.puzzle-home::after {
  position: absolute;
  z-index: -1;
  top: 120px;
  left: 50%;
  width: 720px;
  height: 360px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.14);
  filter: blur(80px);
  content: "";
  transform: translateX(-50%);
}

.puzzle-shell {
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  margin: 0 auto;
}

.puzzle-hero {
  max-width: 780px;
  margin: 0 auto 34px;
  color: var(--puzzle-text);
  text-align: center;
}

.puzzle-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 13px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.22);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.puzzle-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.2px;
  text-shadow: 0 5px 24px rgba(0, 0, 0, 0.35);
}

.puzzle-hero > p {
  max-width: 660px;
  margin: 18px auto 0;
  color: var(--puzzle-muted);
  font-size: 17px;
  line-height: 1.65;
}

.puzzle-summary {
  display: flex;
  margin-top: 20px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.puzzle-summary span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(5, 18, 31, 0.48);
  color: #d9e7f3;
  font-size: 13px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.puzzle-summary strong {
  color: #7dd3fc;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}

.game-card {
  --card-color: 56, 189, 248;
  position: relative;
  display: flex;
  min-height: 220px;
  padding: 22px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--puzzle-border);
  border-radius: 22px;
  background:
    linear-gradient(150deg, rgba(var(--card-color), 0.2), transparent 55%),
    var(--puzzle-surface);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.game-card::before {
  position: absolute;
  top: -55px;
  right: -48px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(var(--card-color), 0.2);
  content: "";
  filter: blur(3px);
  transition: transform 0.25s ease;
}

.game-card:hover,
.game-card:focus {
  border-color: rgba(var(--card-color), 0.72);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(var(--card-color), 0.16);
  color: #fff;
  text-decoration: none;
  transform: translateY(-6px);
}

.game-card:hover::before,
.game-card:focus::before {
  transform: scale(1.18);
}

.game-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.game-card-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--card-color), 0.52);
  border-radius: 17px;
  background: rgba(var(--card-color), 0.2);
  color: rgb(var(--card-color));
  font-size: 25px;
}

.game-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.game-card-body strong {
  color: #fff;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.2;
}

.game-card-body small {
  display: block;
  margin-top: 8px;
  color: #c9d7e5;
  font-size: 13px;
  line-height: 1.5;
}

.game-card-action {
  position: relative;
  z-index: 1;
  display: flex;
  margin-top: 17px;
  align-items: center;
  justify-content: space-between;
  color: rgb(var(--card-color));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.game-card-action i {
  transition: transform 0.2s ease;
}

.game-card:hover .game-card-action i {
  transform: translateX(4px);
}

.game-card-badge {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(4, 14, 25, 0.66);
  color: #dceaf5;
  font-size: 10px;
  font-weight: 700;
}

.game-card--hidden-word { --card-color: 52, 211, 153; }
.game-card--kimbilir { --card-color: 251, 191, 36; }
.game-card--crossword { --card-color: 167, 139, 250; }
.game-card--word-hunt { --card-color: 244, 114, 182; }
.game-card--slingshot { --card-color: 251, 113, 133; }
.game-card--sudoku { --card-color: 96, 165, 250; }
.game-card--hidden-object { --card-color: 45, 212, 191; }

.puzzle-footer {
  display: flex;
  margin-top: 78px;
  padding: 22px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background: rgba(5, 18, 31, 0.7);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  color: #fff;
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
}

.puzzle-footer-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.puzzle-footer-brand > span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.24);
}

.puzzle-footer-brand div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.puzzle-footer-brand strong {
  color: #fff;
  font-size: 16px;
}

.puzzle-footer-brand small {
  margin-top: 3px;
  color: #9fb2c4;
  font-size: 12px;
}

.puzzle-footer-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.puzzle-footer-nav a,
.pwa-install-button {
  display: inline-flex;
  min-height: 42px;
  padding: 10px 15px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 12px;
  background: rgba(14, 116, 144, 0.2);
  color: #dff5ff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.puzzle-footer-nav a:hover,
.puzzle-footer-nav a:focus,
.pwa-install-button:hover,
.pwa-install-button:focus {
  border-color: rgba(125, 211, 252, 0.65);
  background: rgba(14, 116, 144, 0.38);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.pwa-install-status {
  width: 100%;
  margin-top: -10px;
  color: #b9cad8;
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

@media (max-width: 980px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-card {
    min-height: 205px;
  }
}

@media (max-width: 620px) {
  .puzzle-topbar {
    height: 62px;
  }

  .puzzle-brand {
    font-size: 18px;
  }

  .puzzle-brand-mark {
    width: 32px;
    height: 32px;
  }

  .puzzle-home {
    width: 100%;
    max-width: 100vw;
    padding: 92px 14px 36px;
    overflow-x: hidden;
    background-attachment: scroll;
  }

  .puzzle-hero {
    margin-bottom: 25px;
  }

  .puzzle-hero h1 {
    max-width: 100%;
    font-size: 32px;
    letter-spacing: -0.7px;
    overflow-wrap: break-word;
  }

  .puzzle-hero > p {
    font-size: 15px;
  }

  .game-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .game-card {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 18px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 15px;
  }

  .game-card-icon {
    width: 52px;
    height: 52px;
    margin: 0;
    grid-row: 1 / span 2;
  }

  .game-card-body {
    padding-right: 2px;
  }

  .game-card-body strong {
    font-size: 18px;
  }

  .game-card-body small {
    font-size: 12px;
  }

  .game-card-action {
    margin-top: 12px;
    grid-column: 2;
  }

  .game-card-badge {
    top: 12px;
    right: 12px;
  }

  .puzzle-footer {
    margin-top: 62px;
    padding: 20px;
    align-items: stretch;
    flex-direction: column;
  }

  .puzzle-footer-nav {
    justify-content: stretch;
  }

  .puzzle-footer-nav a {
    justify-content: center;
    flex: 1 1 auto;
  }

  .pwa-install-button {
    justify-content: center;
    flex: 1 1 auto;
  }

  .pwa-install-status {
    margin-top: -8px;
    text-align: left;
  }

  .puzzle-sidebar-header,
  .puzzle-sidebar-content,
  .puzzle-sidebar-footer {
    width: min(288px, 88vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-card,
  .game-card::before,
  .game-card-action i,
  .puzzle-topbar .hamburger,
  .puzzle-footer-nav a,
  .pwa-install-button,
  .puzzle-sidebar-menu > a,
  .sidebar-backdrop {
    transition: none;
  }
}
