/* ============================================================
   GLOBAL RESET + BASE DARK THEME
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background: #000;
  color: #eee;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   GLOBAL LAYOUT
   ============================================================ */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ============================================================
   HEADER + NAV (centered logo + centered nav)
   ============================================================ */
.site-header {
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid #222;
  text-align: center;
  background: #000;
}

.site-title h1 {
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  color: #ffcc00;
}

.site-subtitle {
  font-size: 0.85rem;
  color: #bbb;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav a {
  color: #ddd;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffcc00;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: #777;
  border-top: 1px solid #222;
  margin-top: 3rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary {
  background-color: #ffcc00;
  color: #000;
}

.btn-primary:hover {
  background-color: #ffd633;
}

.btn-secondary {
  background-color: #333;
  color: #fff;
  margin-left: 0.5rem;
}

.btn-secondary:hover {
  background-color: #555;
}
.button-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-primary {
  padding: 12px 20px;
  background: #ffcc00;
  color: #000;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.2s;
}

.btn-primary:hover {
  background: #ffdd33;
}


/* ============================================================
   HOME PAGE
   ============================================================ */
.home-hero {
  text-align: center;
  padding: 3rem 1rem;
}

.home-hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ffcc00;
}

.home-hero p {
  max-width: 700px;
  margin: 0.5rem auto 1.5rem;
  color: #ccc;
}

/* ============================================================
   GALLERY PAGE (layout only — flip logic preserved below)
   ============================================================ */
.gallery-body .main-container {
  padding-top: 2rem;
}

.gallery-body h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #ffcc00;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

/* ============================================================
   GALLERY FLIP (ISOLATED)
   ============================================================ */
.gallery-body .gallery-card {
  perspective: 1000px;
  cursor: pointer;
}

.gallery-body .gallery-card-inner {
  position: relative;
  width: 100%;
  padding-top: 140%;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}

.gallery-body .gallery-card.flipped .gallery-card-inner {
  transform: rotateY(180deg);
}

.gallery-body .gallery-front,
.gallery-body .gallery-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(0,0,0,0.8);
}

.gallery-body .gallery-back {
  transform: rotateY(180deg);
}

.gallery-body .gallery-front img,
.gallery-body .gallery-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   FLIPBOOK PAGE
   ============================================================ */
.flipbook-body h2 {
  text-align: center;
  margin: 2rem 0 1rem;
  color: #ffcc00;
}

.flipbook-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.flipbook-container img {
  width: 300px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

/* ============================================================
   SHOP PAGE
   ============================================================ */
.shop-page h2 {
  text-align: center;
  margin: 2rem 0 1rem;
  color: #ffcc00;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.shop-grid img {
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0,0,0,0.8);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-body h2 {
  text-align: center;
  margin: 2rem 0 1rem;
  color: #ffcc00;
}

.about-body p {
  max-width: 800px;
  margin: 0.5rem auto;
  color: #ccc;
  text-align: center;
}

/* ============================================================
   MEMORY GAME (YOUR ORIGINAL CODE — UNTOUCHED)
   ============================================================ */
.memory-body {
  margin: 0;
  background-color: #000000;
  color: #ffffff;
}

.memory-main {
  max-width: 1100px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1rem;
}

.memory-intro {
  text-align: center;
  margin-bottom: 1.5rem;
}

.memory-intro h2 {
  margin-bottom: 0.4rem;
}

.memory-intro p {
  margin-bottom: 0.8rem;
  color: #ccc;
}

.memory-game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.memory-status {
  margin-bottom: 0.8rem;
  min-height: 1.2rem;
  font-size: 0.95rem;
  color: #ffcc00;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(80px, 1fr));
  gap: 0.6rem;
  width: 100%;
  max-width: 900px;
}

.memory-card {
  perspective: 1000px;
  cursor: pointer;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  padding-top: 140%;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}

.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.memory-card-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-card-back {
  transform: rotateY(180deg);
}

@media (max-width: 800px) {
  .memory-grid {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }
}

@media (max-width: 500px) {
  .memory-grid {
    grid-template-columns: repeat(3, minmax(70px, 1fr));
  }
}
/* Fix global header alignment */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-title {
  text-align: center;
}

.site-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
/* Restore header alignment */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-title {
  text-align: center;
}

.site-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
