* {
  box-sizing: border-box;
  font-family: "Trebuchet MS", system-ui, sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #1a0033, #000);
  color: white;
  overflow-x: hidden;
  min-height: 100vh;
}

#bg-effects {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,0,255,0.15), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(0,255,255,0.15), transparent 40%);
  animation: bgPulse 8s infinite alternate;
  z-index: -1;
}

@keyframes bgPulse {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  padding: 16px;
  text-align: center;
  background: linear-gradient(90deg, #ff00cc, #3333ff, #00ffcc);
  box-shadow: 0 0 25px rgba(255,255,255,0.2);
}

header h1 {
  margin: 0;
  font-size: 2.6rem;
  letter-spacing: 4px;
  text-shadow: 0 0 15px rgba(255,255,255,0.8);
}

.controls {
  margin-top: 10px;
}

.controls button {
  margin: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(45deg, #ff0080, #7928ca);
  color: white;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255,0,255,0.7);
  transition: transform 0.2s, box-shadow 0.2s;
}

.controls button:hover {
  transform: scale(1.1) rotate(-1deg);
  box-shadow: 0 0 25px rgba(255,0,255,1);
}

.arena {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  padding: 20px;
  align-items: center;
}

.player {
  background: rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 15px;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 30px rgba(0,255,255,0.25);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.player::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: holoSpin 8s linear infinite;
}

@keyframes holoSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.player h2 {
  margin-top: 0;
  text-shadow: 0 0 12px #00ffff;
  position: relative;
  z-index: 2;
}

.vs {
  font-size: 3.2rem;
  font-weight: bold;
  text-shadow: 0 0 18px #ff00ff;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.card-slot {
  margin: 12px auto;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff00cc, #3333ff);
  box-shadow: 0 0 20px rgba(255,0,255,0.7);
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: transform 0.3s, filter 0.3s;
  position: relative;
  z-index: 2;
}

.card-slot:hover {
  transform: scale(1.06) rotate(-1deg);
  filter: brightness(1.2);
}

.hand {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.card {
  background: linear-gradient(135deg, #00ffcc, #7928ca);
  padding: 14px;
  border-radius: 14px;
  min-width: 90px;
  cursor: grab;
  box-shadow: 0 0 12px rgba(0,255,255,0.8);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  user-select: none;
  text-align: center;
}

.card:hover {
  transform: scale(1.12) rotate(2deg);
  box-shadow: 0 0 25px rgba(0,255,255,1);
  filter: brightness(1.2);
}

footer {
  padding: 12px;
  text-align: center;
  background: linear-gradient(90deg, #3333ff, #ff00cc);
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.scoreboard {
  display: flex;
  justify-content: space-around;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

#roundTimer {
  font-size: 1.4rem;
  margin: 6px 0;
  text-shadow: 0 0 10px #ffff00;
}

footer button {
  padding: 10px 18px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(45deg, #00ffcc, #7928ca);
  color: white;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0,255,255,0.7);
  transition: transform 0.2s;
}

footer button:hover {
  transform: scale(1.12);
}

/* Screen shake support */
.shake {
  animation: shake 0.25s;
}

@keyframes shake {
  0% { transform: translate(0,0); }
  25% { transform: translate(5px, -5px); }
  50% { transform: translate(-5px, 5px); }
  75% { transform: translate(5px, 5px); }
  100% { transform: translate(0,0); }
}

/* Mobile */
@media (max-width: 768px) {
  .arena {
    grid-template-columns: 1fr;
  }
  .vs {
    order: 2;
  }
}