
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: white;
}

.navbar {
  background: #111827;
  padding: 18px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1f2937;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #38bdf8;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: #e5e7eb;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #38bdf8;
}

.top-bar {
  padding: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

#search,
#colorFilter {
  padding: 12px;
  border-radius: 5px;
  border: none;
  background: #1e293b;
  color: white;
}

#search {
  width: 320px;
}

#colorFilter {
  width: 180px;
}

main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  padding: 20px;
}

#cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: #1e293b;
  border-radius: 5px;
  overflow: hidden;
  transition: 0.3s;
  border: 1px solid #334155;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.card-content {
  padding: 15px;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: #94a3b8;
  margin-bottom: 8px;
}

.price {
  font-size: 18px;
  color: #38bdf8;
  font-weight: bold;
}

.card button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #22c55e;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.card button:hover {
  background: #16a34a;
}

aside {
  background: #111827;
  border-radius: 5px;
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 100px;
  border: 1px solid #1f2937;
}

aside h2 {
  margin-bottom: 20px;
  color: #38bdf8;
}

#cart {
  list-style: none;
  margin-bottom: 20px;
}

.cart-item {
  background: #1e293b;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item button {
  background: crimson;
  border: none;
  color: white;
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
}

#total {
  font-size: 20px;
  margin-bottom: 15px;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #22c55e;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.checkout-btn:hover {
  background: #16a34a;
}

@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
  }

  aside {
    position: relative;
    top: 0;
  }
}

.deck-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 25px;
  padding: 25px;
}

.deck-left {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.panel {
  background: #111827;
  border-radius: 5px;
  padding: 20px;
  border: 1px solid #1f2937;
}

.panel h2 {
  margin-bottom: 20px;
  color: #38bdf8;
}

.search-box {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box input,
.search-box select {
  flex: 1;
  min-width: 180px;
  padding: 12px;
  border: none;
  border-radius: 5px;
  background: #1e293b;
  color: white;
}

.search-box button {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: #38bdf8;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.search-box button:hover {
  background: #0ea5e9;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.deck-sidebar {
  background: #111827;
  border-radius: 5px;
  padding: 20px;
  border: 1px solid #1f2937;
  height: fit-content;
  position: sticky;
  top: 90px;
}

.deck-sidebar h2 {
  color: #38bdf8;
  margin-bottom: 20px;
}

.deck-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-box {
  background: #1e293b;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
}

.stat-box h3 {
  font-size: 24px;
  color: #38bdf8;
}

.stat-box p {
  color: #94a3b8;
}

#deckList {
  list-style: none;
  max-height: 500px;
  overflow-y: auto;
}

.deck-item {
  background: #1e293b;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.deck-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deck-item-name {
  font-weight: bold;
}

.deck-actions {
  display: flex;
  gap: 8px;
}

.deck-actions button {
  border: none;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: white;
}

.edit-btn {
  background: #f59e0b;
}

.delete-btn {
  background: crimson;
}

.deck-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deck-buttons button {
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  color: white;
}

.clear-btn {
  background: crimson;
}

.export-btn {
  background: #38bdf8;
}

@media (max-width: 950px) {
  .deck-layout {
    grid-template-columns: 1fr;
  }

  .deck-sidebar {
    position: relative;
    top: 0;
  }
}