body {
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6)),
              url('images/backgrounds/dayz_winter_scene.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: Arial, sans-serif;
  color: #f0f0f0;
  overflow-y: scroll;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.snow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background-image: url('images/effects/snowfall.gif');
  background-size: cover;
  opacity: 0.2;
}

.header, .footer {
  background-color: rgba(0, 0, 0, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  width: 100%;
}

.footer {
  margin-top: auto;
}

.deck-summary {
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}

.deck-summary.full-deck {
  color: gold;
  text-shadow: 0 0 10px gold;
  transition: all 0.3s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.deck-summary.pulse {
  animation: pulse 0.4s;
}

/* ✅ Universal red warning + shake */
.card-border-wrap.limit-reached {
  border: 3px solid red !important;
  box-shadow: 0 0 10px 3px red !important;
}
.shake {
  animation: shakeAnim 0.4s ease;
}
@keyframes shakeAnim {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.deck-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 40px;
}

.card-border-wrap {
  padding: 3px;
  border: 3px solid gray;
  border-radius: 10px;
  box-sizing: border-box;
  display: inline-block;
  transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
  margin: 10px;
}

/* 🟩 Green selected & gold highlighted */
.card-border-wrap.selected-card {
  box-shadow: 0 0 12px 3px limegreen;
  border-color: limegreen !important;
}
.card-border-wrap.highlighted-deck-card {
  box-shadow: 0 0 14px 3px gold;
  border-color: gold !important;
}

.card {
  width: 140px;
  height: 210px;
  border: 2px solid #1b1b1b;
  border-radius: 6px;
  background-color: #1b1b1b;
  overflow: hidden;
  text-align: center;
  position: relative;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
.my-deck-button {
  background-color: teal;
  border: none;
  padding: 14px 28px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
}

button.disabled {
  background-color: gray;
}
button.animate {
  animation: glow 1s infinite alternate;
}
@keyframes glow {
  from { box-shadow: 0 0 8px teal; }
  to { box-shadow: 0 0 24px teal; }
}

.back-to-hub {
  position: fixed;
  top: 15px;
  right: 15px;
  background-color: rgba(0, 128, 128, 0.7);
  color: white;
  padding: 14px 24px;
  font-size: 18px;
  border: 2px solid white;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  z-index: 1100;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* ✅ Unified Hover for All Buttons */
button:hover,
#myDeckButton:hover,
.back-to-hub:hover {
  border-color: #00ffff;
  transform: scale(1.02);
  box-shadow: 0 0 10px #00ffff;
}

@media (max-width: 768px) {
  body {
    background-size: 250% !important;
    background-position: 80% top !important;
    background-repeat: no-repeat !important;
  }
}

.quantity-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background-color: rgba(0, 0, 0, 0.7);
  color: gold;
  font-weight: bold;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 8px;
  z-index: 10;
}

@media (max-width: 1200px) {
  .deck-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 18px;
    padding: 5px;
    box-sizing: border-box;
  }

  .card-border-wrap {
    width: 280px;
    height: 375px;
    padding: 5px;
  }

  .card {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 2px solid #1b1b1b;
    border-radius: 6px;
    background-color: transparent;
    overflow: hidden;
    position: relative;
    text-align: center;
  }

  .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  button,
  .my-deck-button {
    padding: 22px 38px;
    font-size: 24px;
  }

  .back-to-hub {
    font-size: 22px;
    padding: 18px 30px;
  }

  .shuffle-card {
    animation-duration: 1s !important;
  }
}

@keyframes slideOutLeft {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-100vw); opacity: 0; }
}
.slide-out-left {
  animation: slideOutLeft 0.6s ease forwards;
}

.deck-pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 420px;
  margin-top: 60px;
  position: relative;
}

.shuffle-card {
  width: 160px;
  height: 220px;
  position: absolute;
  animation: slideInCard 0.4s ease-out forwards;
  opacity: 0;
}

@keyframes slideInCard {
  0% { transform: translateX(120vw) rotate(0deg); opacity: 0; }
  100% { transform: translateX(0) rotate(-4deg); opacity: 1; }
}

.deck-toast {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1b1b1b;
  color: gold;
  border: 2px solid gold;
  padding: 14px 26px;
  font-size: 22px;
  font-weight: bold;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 10000;
}
.deck-toast.show {
  opacity: 1;
}

/* Repo 4 recovery: real disabled semantics + API state */
button:disabled,
.my-deck-button:disabled,
button.disabled {
  background-color: gray;
  cursor: not-allowed;
  opacity: 0.62;
  transform: none !important;
  box-shadow: none !important;
}

.connection-status {
  margin: 4px auto 2px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(5, 15, 25, 0.78);
  border: 1px solid rgba(120,220,255,.5);
  width: fit-content;
}
.connection-status.connected { border-color: #2ecc71; color: #d9ffe8; }
.connection-status.connecting { border-color: #65cfff; color: #dff7ff; }
.connection-status.mock { border-color: #f0c84b; color: #fff2ae; }
.connection-status.error { border-color: #ff5f78; color: #ffd6dc; }

.empty-state,
.error-state {
  margin: 36px auto;
  padding: 18px 22px;
  max-width: 620px;
  border-radius: 10px;
  background: rgba(5, 15, 25, .82);
  text-align: center;
  font-weight: 700;
}
.error-state { border: 1px solid #ff5f78; color: #ffd6dc; }
.empty-state { border: 1px solid #65cfff; color: #dff7ff; }

.card-img.image-fallback {
  background: linear-gradient(145deg, #0d2630, #112f3a);
}
