* {
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: #496474;
  background: linear-gradient(
    to bottom,
    #8faec2 0%,
    #a7c0d0 25%,
    #bdd1dd 50%,
    #d6e2ea 75%,
    #f8fbfd 100%
  );
  background-attachment: fixed;
}

h1,
h2,
h3,
p {
  margin: 0;
}

#page-shell {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding-top: 14px;
  padding-bottom: 24px;
}

#site-header {
  background: transparent;
}

#topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px 12px;
  background: linear-gradient(to bottom, #e3eff5 0%, #d4e5ee 100%);
  border-radius: 14px 14px 0 0;
}

#logo {
  width: 100%;
  text-align: center;
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.5px;
  color: #4c7ea8;
  text-transform: uppercase;
}

#logo span {
  color: #89b1cd;
}

#category-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 10px 8px 12px;
  background: linear-gradient(to bottom, #dcebf2 0%, #d1e3ec 100%);
  border-radius: 0 0 14px 14px;
}

#category-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #648293;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  padding: 4px 0;
}

.nav-icon {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #8aaabd;
  opacity: 0.95;
}

#content-panel {
  background: linear-gradient(to bottom, #dcebf2 0%, #d4e5ee 100%);
  margin-top: 10px;
  padding: 10px 8px 18px;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90, 110, 120, 0.08);
}

#game-area {
  width: 100%;
  margin: 0;
  position: relative;
}

#game-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1.78 / 1;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: #5f002f;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-container canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0) 58%,
    rgba(0, 0, 0, 0.18) 100%
  );
  z-index: 8;
  opacity: 1;
  transition: opacity 1s ease;
}

#play-btn,
#difficulty-btn {
  position: absolute;
  image-rendering: pixelated;
  z-index: 20;
  transition:
    transform 0.25s ease,
    filter 0.25s ease;
}

#play-btn {
  top: 10%;
  left: 20%;
  width: 300px;
  transform: translateX(-350%);
}

#difficulty-btn {
  top: 40%;
  left: 26%;
  width: 250px;
  transform: translateX(-50%) translateX(-350%);
}

#play-btn.active,
#difficulty-btn.active {
  transform: translateX(-50%) translateX(0);
}

#play-btn.active.hovered,
#difficulty-btn.active.hovered {
  transform: translateX(-50%) translateX(0) scale(1.05);
  filter: brightness(1.15);
}

#play-btn.active.pressed,
#difficulty-btn.active.pressed {
  transform: translateX(-50%) translateX(0) scale(0.95);
}

#play-btn img,
#difficulty-btn img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  transform: translateY(-25%);
}

.hitbox {
  position: absolute;
  cursor: pointer;
  background: rgba(255, 0, 0, 0);
  z-index: 30;
}

.play-hitbox {
  top: 15%;
  left: 35%;
  width: 30%;
  height: 14%;
}

.difficulty-hitbox-easy {
  top: 25%;
  left: 20%;
  width: 13%;
  height: 6%;
}

.difficulty-hitbox-medium {
  top: 25%;
  left: 39%;
  width: 21%;
  height: 6%;
}

.difficulty-hitbox-hard {
  top: 25%;
  left: 66%;
  width: 16%;
  height: 6%;
}

.blur {
  filter: blur(6px);
  transition: filter 0.5s ease;
}

#blur-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(6px);
  z-index: 5;
  pointer-events: none;
}

#fade-overlay {
  position: absolute;
  inset: 0;
  background: black;
  z-index: 10;
  opacity: 1;
  transition: opacity 5s ease;
}

#game-list-section {
  min-height: 170px;
  background: transparent;
}

#game-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 8px;
}

#current-game {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #607785;
  font-size: 13px;
  font-weight: 500;
}

#panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#fullscreen-btn {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background-color: rgba(96, 119, 133, 0.15);
  color: #5f7684;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

#fullscreen-btn:hover {
  background-color: rgba(96, 119, 133, 0.24);
}

#fullscreen-btn:active {
  transform: scale(0.98);
}

.thumb {
  width: 72px;
  height: 54px;
  border-radius: 3px;
  margin-bottom: 6px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(135deg, #d9eaf5, #7da6c2);
}

.thumb.small {
  width: 32px;
  height: 24px;
  margin-bottom: 0;
}

#controls-box {
  padding: 8px 14px 18px;
  color: #5f7684;
  font-size: 14px;
  line-height: 1.9;
}

#controls-box p {
  text-align: left;
}

#footer {
  margin-top: 14px;
}

#footer-box {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96) 0%, rgba(241, 247, 251, 0.96) 100%);
  border-radius: 16px;
  padding: 14px 18px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(90, 110, 120, 0.12);
}

#watermark {
  margin-bottom: 8px;
  color: #6a7f8e;
  font-size: 13px;
}

#github {
  color: #5f7f95;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  word-break: break-all;
}

#github img {
  width: 15px;
  height: 15px;
  display: block;
}

:fullscreen body * {
  visibility: hidden;
}

:fullscreen #game-wrapper,
:fullscreen #game-wrapper * {
  visibility: visible;
}

:fullscreen #game-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  z-index: 9999;
}

@media (max-width: 760px) {
  #page-shell {
    max-width: 100%;
    padding: 0 10px 20px;
  }

  #topbar {
    border-radius: 0;
  }

  #category-nav {
    border-radius: 0;
  }

  #content-panel {
    border-radius: 0;
    margin-top: 0;
  }

  #logo {
    font-size: 22px;
  }

  #controls-box {
    font-size: 13px;
  }

  #play-btn {
    width: 220px;
  }

  #difficulty-btn {
    width: 190px;
  }
}

.about-page {
  background: linear-gradient(to bottom, #dcebf2 0%, #d4e5ee 100%);
}

.about-hero,
.about-section {
  margin-bottom: 18px;
}

.about-hero h1,
.about-section h2 {
  margin-bottom: 10px;
  color: #5e7f94;
  font-weight: 700;
}

.about-hero h1 {
  font-size: 28px;
  text-align: center;
}

.about-section h2 {
  font-size: 20px;
}

.about-hero p {
  color: #607785;
  font-size: 15px;
  line-height: 1.8;
  text-align: center;
  padding: 0 8px;
}

.info-card {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92) 0%, rgba(241, 247, 251, 0.92) 100%);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(90, 110, 120, 0.08);
}

.info-card p {
  color: #607785;
  font-size: 15px;
  line-height: 1.8;
}

.tools-list {
  margin: 14px 0 0;
  padding-left: 22px;
  color: #607785;
}

.tools-list li {
  margin-bottom: 8px;
  line-height: 1.7;
}

#category-nav a[href="./about.html"] {
  position: relative;
}

#category-nav a[href="./about.html"] span:last-child {
  color: #4c7ea8;
}

@media (max-width: 760px) {
  .about-hero h1 {
    font-size: 23px;
  }

  .about-section h2 {
    font-size: 18px;
  }

  .info-card p,
  .about-hero p,
  .tools-list li {
    font-size: 14px;
  }
}
