/* Memory Game - Premium Redesign */

/* Page Layout */
.page-wrapper {
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Navigation */
.game-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10, 15, 37, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-home {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-home:hover {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.4);
  transform: translateY(-2px);
}

.nav-icon {
  font-size: 18px;
}

.nav-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #ec4899 20%, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.level-badge {
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(236, 72, 153, 0.08));
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  color: #f472b6;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  min-width: 90px;
}

.stat-chip.matched {
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border-color: rgba(34, 197, 94, 0.25);
}

.stat-chip.target {
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.12), rgba(236, 72, 153, 0.05));
  border-color: rgba(236, 72, 153, 0.25);
}

.chip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.chip-value {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  font-family: 'Outfit', sans-serif;
}

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: center;
  padding: 0 20px 20px;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #fff;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

/* Game Main */
.game-main {
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.board-container {
  background: linear-gradient(145deg, rgba(20, 25, 50, 0.95), rgba(10, 15, 35, 0.98));
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(236, 72, 153, 0.08);
}

#memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Memory Card Styles */
.memory-card {
  width: 80px;
  height: 100px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.memory-card.flipped {
  transform: rotateY(180deg);
}

.memory-card .card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  font-size: 32px;
}

.memory-card .card-back {
  background: linear-gradient(135deg, #ec4899, #db2777);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.memory-card .card-front {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transform: rotateY(180deg);
}

.memory-card.matched .card-front {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.5);
}

/* Help Section */
.help-section {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
}

.help-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #fff;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.help-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.help-icon {
  font-size: 24px;
}

.help-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* Recommendations */
.recommendations-section {
  max-width: 700px;
  margin: 48px auto;
  padding: 0 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #fff;
}

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.game-card-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.game-card-mini:hover {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.4);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 30px;
}

.card-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* Responsive */
@media (max-width: 500px) {
  .memory-card {
    width: 65px;
    height: 85px;
  }

  .memory-card .card-face {
    font-size: 26px;
  }

  #memory-board {
    gap: 8px;
  }

  .board-container {
    padding: 14px;
  }
}

/* Legacy support */
.header {
  display: none;
}

.game-container {
  display: contents;
}

.stats-panel {
  display: none;
}