
/* === HOMEPAGE DARK MINIMALIST === */

body.home-body {
  background: url("../images/background.png") center/cover no-repeat fixed;
  font-family: 'Inter', sans-serif;
  color: #fff;
  margin: 0;
  padding: 40px 0;
  display: flex;
  justify-content: center;
  overflow-y: auto;
}



/* Layout container */
.home-container {
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
  text-align: center;
}

/* Header */
.home-header h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
  font-weight: 600;
  color: #ffffff;
}

.home-header p {
  font-size: 1rem;
  color: #9ca3af;
  margin-bottom: 45px;
}

/* Game Grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 32px;
  padding: 10px 0;
}

/* Game Card */
.game-card {
  background: #161b22;
  padding: 1.4rem;
  border-radius: 14px;
  text-decoration: none;
  color: white;
  transition: 0.25s ease-out;
  border: 1px solid rgba(255,255,255,0.06);
  display: block;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 12px 24px rgba(0,0,0,0.45);
}

/* Thumbnail Area */
.game-thumb {
  height: 200px;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #262a33;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Coming Soon thumbnail */
.game-thumb.placeholder {
  background: linear-gradient(145deg, #2a2f38, #1a1d23);
  opacity: 0.4;
  border-style: dashed;
}

/* Title */


.game-card h2 {
  font-size: 1rem;
  padding: 14px 16px;
  margin: 0;
  background: rgba(0,0,0,0.35);  /* keeps it readable */
  color: #ffffff !important;
}


/* Footer */
.home-footer {
  margin-top: 60px;
  font-size: 0.75rem;
  color: #6b7280;
}


/* === PIXEL GLIDER — COMPLETE PAGE STYLING === */

/* Prevent scrolling & ensure full height */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

/* Main page layout */
.pg-body {
  background: url("../images/background.png") center/cover no-repeat fixed;
  font-family: 'Inter', sans-serif;
  color: #fff;
  overflow: hidden;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}



/* === PAGE TITLE === */
.pg-title {
  font-size: 1.4rem;          /* smaller so it fits */
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255,255,255,0.25);
  position: relative;
  z-index: 10;                /* <-- keep above the game */
}

/* === GAME WRAPPER === */
.game-wrapper {
  position: relative;
  top: -2px;                 /* was -40px — now moved down slightly */
  width: 480px;
  text-align: center;
  margin: 0 auto;
  z-index: 1;                 /* sits behind the title */
}


/* === GAME CANVAS === */
canvas {
  border-radius: 14px;
  border: 4px solid #2b3038;
  box-shadow: 0 10px 25px rgba(0,0,0,0.45);
  background: #87CEEB;
  display: block;
  margin: 0 auto;
}

/* === HUD (score + level) === */
.hud {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 0.9rem;
  color: #e5e7eb;
  font-weight: 600;
}

/* === GAME OVER SCREEN === */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.gameover-box {
  background: #161b22;
  border: 2px solid #2d323b;
  padding: 2rem;
  width: 260px;
  border-radius: 12px;
  color: #f87171;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.45);
}

.gameover-box h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* Restart Button */
#restartBtn {
  margin-top: 1rem;
  padding: 10px 22px;
  background: #22c55e;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s ease-out;
}

#restartBtn:hover {
  background: #16a34a;
  transform: scale(1.05);
}

/* === SCREEN FADE EFFECTS === */
.fade-in {
  animation: fadeInScreen 1s ease forwards;
}

.fade-out {
  animation: fadeOutScreen 0.7s ease forwards;
}

@keyframes fadeInScreen {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOutScreen {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.05); }
}

/* Flash effect used by shield impact */
.flash {
  animation: flashEffect 0.2s ease;
}

@keyframes flashEffect {
  0% { filter: brightness(2); }
  100% { filter: brightness(1); }
}

/* === HOME BUTTON === */
.home-btn {
  position: absolute;
  top: 22px;            /* adjust if title moves */
  left: 22px;
  width: 38px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1b1f24;
  border: 1px solid #2d323b;
  border-radius: 10px;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  transition: all 0.2s ease;
  z-index: 20;          /* always above the canvas */
}

.home-btn:hover {
  background: #2a2f36;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.home-icon {
  width: 22px;
  height: 22px;
  color: #ffffff;
}

/* === GAME CARD === */
.game-card {
  background: #14181f;
  padding: 0;                    /* no padding around thumbnail */
  border-radius: 14px;
  text-decoration: none;
  color: white;
  overflow: hidden;              /* ensures rounded corners apply to the thumbnail */
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  border: 1px solid rgba(255,255,255,0.05);
}

/* === THUMBNAIL === */
.game-thumb {
  width: 100%;
  height: 180px;                 /* adjust thumbnail height */
  background: #1f1f1f;
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;             /* fills entire area without distortion */
  display: block;
}

/* === TITLE UNDER THUMBNAIL === */
.game-card h2 {
  font-size: 1rem;
  padding: 14px 16px;            /* creates bottom title bar area */
  margin: 0;
  background: rgba(0,0,0,0.2);   /* optional: subtle dark strip */
  color: #fbbf24;
}

/* === UNIVERSAL DARK OVERLAY FOR BACKGROUND IMAGES === */
.home-body,
.pg-body {
  position: relative;
  background: url("../images/background.png") center/cover no-repeat fixed;
}

/* Overlay */
.home-body::before,
.pg-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35); /* adjust darkness 0.3–0.8 */
  backdrop-filter: blur(1px);   /* optional smoothness */
  z-index: -1;                   /* sits behind content */
}






