* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  background: rgba(25, 26, 25, 0.8); /* slightly darker */
  color: white;
  min-height: 100vh;
}

.container {
  display: flex;
}

/* Sidebar: fixed and vertically centered */
.sidebar {
  position: fixed;
  top: 50%;                    
  left: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  z-index: 1000;
  align-items: center;
}

/* Sidebar buttons */
.sidebar button {
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  color: white;
  text-align: center;
  min-width: 130px;
  transition: transform 0.2s, filter 0.2s, background 0.2s;
  background: rgba(50, 50, 50, 0.8);
}

.sidebar button:hover {
  transform: translateX(5px);
  filter: brightness(1.2);
  background: rgba(70, 70, 70, 0.85);
}

/* Back button styling (if included) */
.sidebar .back {
  background: #444;
  margin-bottom: 10px;
}

.sidebar .back:hover {
  background: #555;
}

/* Main content */
main {
  flex: 1;
  padding: 20px 40px;
  margin-left: 180px; /* space for sidebar */
}

/* Sections */
section {
  margin-bottom: 60px;
}

section h2 {
  font-size: 1.6em;
  margin-bottom: 15px;
  text-align: center; 
}

/* Grid for recipes */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

/* Recipe card */
.card {
  background: rgba(30, 30, 30, 0.85);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.card img {
  width: 90%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

.card .rarity {
  font-weight: bold;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  text-transform: uppercase;
  text-align: center;
}

/* Rarity colors */
.uncommon { background: #95a5a6; }
.common { background: #2ecc71; }
.rare { background: #3498db; }
.epic { background: #9b59b6; }
.legendary { background: #f1c40f; color: #000; }
.mythic { background: #e74c3c; }

/* Secret with rounded black background */
.secret {
  background: black;
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-weight: bold;
  display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 800px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    margin-bottom: 20px;
    transform: none;
    justify-content: center;
    gap: 10px;
  }

  main {
    margin-left: 0;
  }

  .sidebar button {
    min-width: 100px;
    padding: 10px 14px;
    font-size: 0.9em;
  }
}
