/* Pacman Game Info Styles */
* {
  box-sizing: border-box;
  max-width: 100%;
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  width: 100%;
}

.pacman-game-info {
  font-family: 'Press Start 2P', 'Segoe UI', monospace;
  background: linear-gradient(135deg, #000428 0%, #004e92 100%);
  color: #ffffff;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}

.pacman-header {
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
  padding: 40px 0;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

.pacman-header::before {
  content: '🟡';
  position: absolute;
  font-size: 15rem;
  opacity: 0.2;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  animation: pacmanFloat 3s ease-in-out infinite;
}

@keyframes pacmanFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

.pacman-title {
  font-size: 3.5rem;
  margin: 0;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
  position: relative;
  z-index: 1;
  color: #000428;
  font-weight: bold;
}

.pacman-subtitle {
  font-size: 1.3rem;
  margin: 15px 0 0 0;
  position: relative;
  z-index: 1;
  color: #000428;
  font-weight: normal;
  font-family: 'Segoe UI', sans-serif;
}

.content-wrapper {
  max-width: min(1200px, 100vw);
  margin: 0 auto;
  padding: clamp(20px, 5vh, 50px) clamp(15px, 4vw, 20px);
  box-sizing: border-box;
  width: 100%;
}

.breadcrumb {
  margin-bottom: 30px;
  padding: 15px 20px;
  background: rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  font-size: 14px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  font-family: 'Segoe UI', sans-serif;
}

.breadcrumb a {
  color: #ffd700;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 12px;
  color: #ddd;
}

.action-buttons {
  text-align: center;
  margin: 40px 0;
}

.play-btn, .back-btn {
  padding: 18px 35px;
  margin: 0 15px;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Segoe UI', sans-serif;
}

.play-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
  color: #000428;
}

.play-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
  animation: pulse 0.5s ease-in-out;
}

.back-btn {
  background: linear-gradient(135deg, #636e72 0%, #74b9ff 100%);
  color: white;
}

.back-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(116, 185, 255, 0.4);
}

@keyframes pulse {
  0% { transform: translateY(-3px) scale(1); }
  50% { transform: translateY(-3px) scale(1.05); }
  100% { transform: translateY(-3px) scale(1); }
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 30px;
  margin-top: 30px;
}

.instruction-card {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.instruction-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffd700, #ff6b6b, #74b9ff, #00b894);
}

.instruction-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  background: rgba(255, 255, 255, 0.18);
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid rgba(255, 215, 0, 0.6);
}

.card-icon {
  font-size: 2.5rem;
  margin-right: 15px;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.4));
}

.card-title {
  font-size: 1.6rem;
  margin: 0;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  font-weight: 600;
  font-family: 'Segoe UI', sans-serif;
}

.card-content {
  font-family: 'Segoe UI', sans-serif;
}

.card-content ul {
  list-style: none;
  padding: 0;
}

.card-content li {
  margin: 15px 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border-left: 4px solid #ffd700;
  transition: all 0.3s ease;
  line-height: 1.6;
}

.card-content li:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.card-content strong {
  color: #ffd700;
  font-weight: 600;
}

.controls-showcase {
  background: rgba(0, 4, 40, 0.8);
  border-radius: 15px;
  padding: 25px;
  margin: 25px 0;
  border: 2px solid rgba(255, 215, 0, 0.6);
  backdrop-filter: blur(5px);
}

.showcase-title {
  color: #ffd700;
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.control-card {
  background: rgba(255, 255, 255, 0.15);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.control-card.desktop { border-color: #74b9ff; }
.control-card.mobile { border-color: #00b894; }

.control-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
}

.control-type {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 15px;
}

.control-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.control-list li {
  margin: 10px 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
}

.gameplay-elements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.element-card {
  background: rgba(255, 255, 255, 0.15);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.element-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.element-emoji {
  font-size: 3rem;
  margin-bottom: 10px;
  display: block;
}

.element-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #ffd700;
}

.element-desc {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

.scoring-section {
  background: rgba(255, 107, 107, 0.15);
  border: 2px solid rgba(255, 107, 107, 0.3);
  border-radius: 15px;
  padding: 25px;
  margin: 25px 0;
}

.scoring-title {
  color: #ff6b6b;
  font-size: 1.4rem;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.score-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.score-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border-left: 4px solid #ff6b6b;
}

.score-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 8px;
}

.score-desc {
  font-size: 0.9rem;
  opacity: 0.9;
}

.highlight-box {
  background: linear-gradient(135deg, #ffd700, #ffb300);
  color: #000428;
  padding: 25px;
  border-radius: 15px;
  margin: 25px 0;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.highlight-box::before {
  content: '👾';
  position: absolute;
  font-size: 4rem;
  opacity: 0.3;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.arcade-features {
  background: rgba(116, 185, 255, 0.15);
  border: 2px solid rgba(116, 185, 255, 0.3);
  border-radius: 15px;
  padding: 25px;
  margin: 25px 0;
}

.features-title {
  color: #74b9ff;
  font-size: 1.4rem;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.feature-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 18px;
  border-radius: 12px;
  border-left: 4px solid #74b9ff;
  transition: all 0.3s ease;
  line-height: 1.5;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .pacman-title {
    font-size: 2.5rem;
  }
  
  .instructions-grid {
    grid-template-columns: 1fr;
  }
  
  .content-wrapper {
    padding: 30px 15px;
  }
  
  .action-buttons {
    margin: 30px 0;
  }
  
  .play-btn, .back-btn {
    padding: 15px 25px;
    margin: 10px 5px;
    font-size: 1.1rem;
  }
  
  .controls-grid {
    grid-template-columns: 1fr;
  }
  
  .gameplay-elements {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Additional breakpoint for screens under 400px */
@media (max-width: 399px) {
  .instructions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .content-wrapper {
    max-width: 100%;
    padding: 15px 10px;
  }
  
  .instruction-card {
    margin: 0;
    padding: 15px;
    border-radius: 15px;
  }
  
  .card-header {
    flex-direction: column;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .card-icon {
    margin: 0 0 10px 0;
    font-size: 2rem;
  }
  
  .card-title {
    font-size: 1.3rem;
  }
  
  .breadcrumb {
    padding: 10px 15px;
    font-size: 12px;
    margin-bottom: 20px;
  }
  
  .action-buttons {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .play-btn, .back-btn {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 20px;
    font-size: 1rem;
  }
  
  .pacman-header {
    padding: 20px 0;
  }
  
  .pacman-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  
  .pacman-subtitle {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
  }
  
  .controls-grid, .gameplay-elements {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}
