.app {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(95vw, 1200px);
  min-height: 540px;
  padding: 40px;
  margin: 20px auto;
  transform: translate(-50%, -55%);
  background: rgba(0,0,0,.9);
  box-sizing: border-box;
  box-shadow: 0 15px 25px rgba(0,0,0,.6);
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ---- Title (stroke text like original) ---- */
.title {
  --text-stroke-color: rgba(255,255,255,0.6);
  font-size: 2em;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: "Arial", sans-serif;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-stroke-color);
  margin: 0;
  padding: 0;
}

/* ---- Bubbles ---- */
.container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bubble {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.25);
  animation: animate_4010 8s ease-in-out infinite;
}

.bubble:nth-child(1) { top: 5%; left: 3%; width: 200px; height: 200px; animation-delay: 0s; }
.bubble:nth-child(2) { top: 8%; right: 5%; left: auto; width: 150px; height: 150px; animation-delay: -2s; animation-duration: 7s; }
.bubble:nth-child(3) { bottom: 8%; left: 6%; top: auto; width: 170px; height: 170px; animation-delay: -4s; animation-duration: 9s; }
.bubble:nth-child(4) { bottom: 5%; right: 4%; left: auto; top: auto; width: 120px; height: 120px; animation-delay: -6s; animation-duration: 6s; }
.bubble:nth-child(5) { top: 50%; left: -4%; width: 140px; height: 140px; animation-delay: -3s; animation-duration: 10s; }

@keyframes animate_4010 {
  0%,100% { transform: translateY(-20px); }
  50%     { transform: translateY(20px); }
}

.bubble::before {
  content: '';
  position: absolute;
  top: 50px;
  left: 45px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  z-index: 10;
  filter: blur(2px);
}

.bubble::after {
  content: '';
  position: absolute;
  top: 80px;
  left: 80px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  z-index: 10;
  filter: blur(2px);
}

.bubble span {
  position: absolute;
  border-radius: 50%;
}

.bubble span:nth-child(1) {
  inset: 10px;
  border-left: 15px solid #0fb4ff;
  filter: blur(8px);
}

.bubble span:nth-child(2) {
  inset: 10px;
  border-right: 15px solid #ff4484;
  filter: blur(8px);
}

.bubble span:nth-child(3) {
  inset: 10px;
  border-top: 15px solid #ffeb3b;
  filter: blur(8px);
}

.bubble span:nth-child(4) {
  inset: 30px;
  border-left: 15px solid #ff4484;
  filter: blur(12px);
}

.bubble span:nth-child(5) {
  inset: 10px;
  border-bottom: 10px solid #fff;
  filter: blur(8px);
  transform: rotate(330deg);
}

body {
  background-color: #212121;
  overflow-x: hidden;
}

/* ---- Player labels ---- */
.player {
  width: 100%;
  max-width: 400px;
}

.player span {
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
}

.player h2 {
  color: rgba(255,255,255,0.6);
  font-size: 1em;
}

/* ---- Score ---- */
.score {
  width: 100%;
  max-width: 400px;
  margin-bottom: 10px;
}

.score span {
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
}

.score h2 {
  color: rgba(255,255,255,0.6);
  font-size: 1.4em;
  font-weight: bold;
  transition: transform 0.2s, color 0.2s;
}

.score h2.pop {
  animation: score-pop 0.35s ease;
}

@keyframes score-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); color: #fff; }
  100% { transform: scale(1); }
}

/* ---- Result ---- */
#result {
  color: rgba(255,255,255,0.6);
  font-family: "Arial", sans-serif;
  font-size: 1.1em;
  margin: 0;
  transition: color 0.3s;
}

#result.win  { color: #4ade80; }
#result.lose { color: #f87171; }
#result.tie  { color: #facc15; }

#result.flash {
  animation: result-flash 0.4s ease;
}

@keyframes result-flash {
  0%   { transform: scale(0.8); opacity: 0.3; }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- PC pick display ---- */
.pc-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  min-height: 70px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.pc-pick.win-glow {
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.15);
}

.pc-pick.lose-glow {
  border-color: rgba(248, 113, 113, 0.4);
  box-shadow: 0 0 15px rgba(248, 113, 113, 0.15);
}

.pc-pick-label {
  color: rgba(255,255,255,0.35);
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pc-pick-emoji {
  font-size: 50px;
  line-height: 1;
  transition: transform 0.3s;
}

.pc-pick-emoji.pop {
  animation: emoji-pop 0.35s ease;
}

@keyframes emoji-pop {
  0%   { transform: scale(0.2) rotate(-15deg); }
  60%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ---- Card buttons (emoji replacing images) ---- */
.card {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
}

.card button {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card button:hover {
  transform: translateY(-6px) scale(1.05);
  border-color: rgba(55, 196, 255, 0.5);
  box-shadow: 0 8px 25px rgba(55, 196, 255, 0.15);
}

.card button:active {
  transform: scale(0.92);
}

.card button.pressed {
  animation: btn-press 0.25s ease;
}

@keyframes btn-press {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.88) rotate(-3deg); }
  60%  { transform: scale(1.05) rotate(1deg); }
  100% { transform: scale(1); }
}

.card button.pulse-win {
  border-color: #4ade80;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.card button.pulse-lose {
  border-color: #f87171;
  box-shadow: 0 0 20px rgba(248, 113, 113, 0.2);
}

.card .emoji {
  font-size: 80px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.card .label {
  font-size: 0.8em;
  font-weight: bold;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ---- Stats row ---- */
.stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 10px 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat span:first-child {
  color: #37C4FF;
  font-size: 1.3em;
  font-weight: bold;
  font-family: "Arial", sans-serif;
}

.stat-label {
  color: rgba(255,255,255,0.35);
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Reset button ---- */
.reset-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.4);
  font-family: "Arial", sans-serif;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.reset-btn:hover {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .app {
    width: 95vw;
    min-height: auto;
    padding: 24px 16px;
    transform: translate(-50%, -50%);
  }

  .title {
    font-size: 1.3em;
    letter-spacing: 2px;
  }

  .player h2 {
    font-size: 0.9em;
  }

  .score h2 {
    font-size: 1.2em;
  }

  .player span,
  .score span {
    padding: 0 10px;
  }

  .card .emoji {
    font-size: 55px;
  }

  .card button {
    padding: 14px 18px;
  }

  .card .label {
    font-size: 0.65em;
  }

  .stats {
    gap: 20px;
  }

  .pc-pick-emoji {
    font-size: 36px;
  }

  .pc-pick {
    padding: 6px 14px;
    min-height: 55px;
  }
}

@media (max-width: 420px) {
  .app {
    padding: 20px 12px;
  }

  .title {
    font-size: 1em;
  }

  .card {
    gap: 10px;
  }

  .card .emoji {
    font-size: 44px;
  }

  .card button {
    padding: 10px 12px;
  }

  .player span,
  .score span {
    padding: 0 6px;
  }

  .stats {
    gap: 14px;
  }

  .stat span:first-child {
    font-size: 1em;
  }

  .pc-pick-emoji {
    font-size: 30px;
  }

  .pc-pick {
    min-height: 48px;
    padding: 4px 10px;
  }
}
