/* ==========================================================
   Gem Guide CSS - Using Real Sprite Sheet
   ========================================================== */

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #0B0F12;
  color: #D9E1E8;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Hamburger Menu (same as game page) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,15,18,0.95);
  backdrop-filter: blur(8px);
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 600;
  color: #00BFA5;
  text-decoration: none;
  font-size: 1.1rem;
  z-index: 52;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 52;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: #00BFA5;
  transition: all 0.3s ease;
}

body.menu-open .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open .hamburger span:nth-child(2) {
  opacity: 0;
}

body.menu-open .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: rgba(11,15,18,0.98);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 51;
  pointer-events: none;
}

body.menu-open .site-nav {
  transform: translateX(0);
  pointer-events: auto;
}

body.menu-open {
  overflow: hidden;
}

.site-nav a {
  color: #D9E1E8;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 500;
  padding: 1rem 2rem;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: #00BFA5;
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
  
  .site-nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    backdrop-filter: none;
    flex-direction: row;
    gap: 1.5rem;
    transform: none;
    pointer-events: auto;
  }
  
  .site-nav a {
    font-size: 1rem;
    padding: 0;
  }
}

/* Guide Page Layout */
.guide-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  margin: 1rem 0;
  color: #00BFA5;
  text-shadow: 0 2px 4px rgba(0, 191, 165, 0.3);
}

.intro {
  text-align: center;
  font-size: 1.1rem;
  color: #92A1AD;
  margin-bottom: 3rem;
}

/* Gem Grid with Real Sprites */
.gem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.gem-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 191, 165, 0.2);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.gem-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 191, 165, 0.4);
  transform: translateY(-4px);
}

/* Gem Sprite Display - Slicing the sprite sheet */
.gem-sprite {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  background-image: url('/assets/gem-sprites.png');
  background-size: 300%; /* 3x3 grid = 300% */
  background-repeat: no-repeat;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 191, 165, 0.2);
}

/* Sprite positions (3x3 grid) */
.gem-sprite[data-gem="0"] { background-position: 0% 0%; }       /* Green Triangle */
.gem-sprite[data-gem="1"] { background-position: 50% 0%; }      /* Red Circle */
.gem-sprite[data-gem="2"] { background-position: 100% 0%; }     /* Purple Hex */
.gem-sprite[data-gem="3"] { background-position: 0% 50%; }      /* Blue Diamond */
.gem-sprite[data-gem="4"] { background-position: 50% 50%; }     /* Red Heart */
.gem-sprite[data-gem="5"] { background-position: 100% 50%; }    /* Cyan Teardrop */
.gem-sprite[data-gem="6"] { background-position: 0% 100%; }     /* Yellow Square */
.gem-sprite[data-gem="7"] { background-position: 50% 100%; }    /* Green Pentagon */
.gem-sprite[data-gem="8"] { background-position: 100% 100%; }   /* Blue Octagon */

.gem-card h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
  color: #00BFA5;
}

.gem-card p {
  font-size: 0.9rem;
  color: #92A1AD;
  margin: 0;
}

/* Info Sections */
.info-section {
  margin: 3rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.info-section h2 {
  font-size: 1.8rem;
  margin: 0 0 1.5rem 0;
  color: #00BFA5;
}

/* Scoring Grid */
.scoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.score-card {
  text-align: center;
  padding: 1.5rem;
  background: rgba(0, 191, 165, 0.1);
  border: 1px solid rgba(0, 191, 165, 0.3);
  border-radius: 8px;
}

.score-amount {
  font-size: 2rem;
  font-weight: bold;
  color: #00BFA5;
  margin-bottom: 0.5rem;
}

.score-card p {
  color: #D9E1E8;
  margin: 0;
}

/* Rules */
.rules {
  display: grid;
  gap: 1.5rem;
}

.rule {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #00BFA5;
  border-radius: 4px;
}

.rule strong {
  display: block;
  color: #00BFA5;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.rule p {
  margin: 0;
  color: #92A1AD;
}

/* Controls Grid */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.control-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-key {
  font-size: 1.8rem;
  font-weight: bold;
  color: #00BFA5;
  margin-bottom: 0.5rem;
}

.control-item p {
  margin: 0;
  font-size: 0.9rem;
  color: #92A1AD;
}

/* Tips List */
.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tips-list li {
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(0, 191, 165, 0.05);
  border-radius: 8px;
  border-left: 3px solid #00BFA5;
}

.tips-list strong {
  color: #00BFA5;
}

/* Back to Game Button */
.back-to-game {
  text-align: center;
  margin: 3rem 0;
}

.btn-play {
  display: inline-block;
  background: linear-gradient(135deg, #00BFA5 0%, #00897B 100%);
  color: #fff;
  padding: 1rem 3rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 191, 165, 0.4);
  transition: all 0.2s ease;
}

.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 191, 165, 0.6);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #92A1AD;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer a {
  color: #00BFA5;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (min-width: 768px) {
  .gem-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  h1 {
    font-size: 3rem;
  }
}
