/* ============================================
   DUEL MONSTERS CHALLENGE - Style Sheet
   1プレイ完結型 景品獲得ゲーム
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;900&display=swap');

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #10102a;
  --bg-card: #1a1a3a;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --accent-gold: #fbbf24;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --accent-red: #ef4444;
  --accent-green: #22c55e;
  --accent-cyan: #06b6d4;
  --glow-gold: 0 0 20px rgba(251, 191, 36, 0.5);
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.5);
  --glow-red: 0 0 20px rgba(239, 68, 68, 0.5);
  --card-width: 110px;
  --card-height: 160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Background ---- */
.game-bg {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(88,28,135,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(59,130,246,0.08) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a1a 0%, #0d0d2a 50%, #0a0a1a 100%);
  z-index: -2;
}
.game-bg::after {
  content: '';
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px);
  z-index: -1; pointer-events: none;
}

/* ---- Layout ---- */
.game-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  position: relative;
}

/* ---- Header ---- */
.game-header { text-align: center; padding: 10px 0 6px; }
.game-title {
  font-size: 1.2rem; font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #fff, #fbbf24, #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; letter-spacing: 0.08em;
  animation: titleShimmer 3s ease-in-out infinite;
}
@keyframes titleShimmer { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.3); } }
.game-subtitle {
  font-size: 0.65rem; color: var(--text-secondary);
  letter-spacing: 0.15em; margin-top: 2px;
}

/* ---- Rules Panel ---- */
.rules-area { margin: 6px 0; text-align: center; }
.rules-toggle {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem; font-weight: 700; color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 6px 20px;
  cursor: pointer; transition: all 0.3s ease;
  letter-spacing: 0.08em;
}
.rules-toggle:hover { background: rgba(255,255,255,0.06); border-color: rgba(251,191,36,0.2); color: var(--accent-gold); }
.rules-toggle.open { border-color: rgba(251,191,36,0.3); color: var(--accent-gold); }
.rules-panel {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}
.rules-panel.open {
  max-height: 800px; opacity: 1; margin-top: 8px;
}
.rules-section {
  margin-bottom: 10px; padding: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px; text-align: left;
}
.rules-heading {
  font-size: 0.75rem; font-weight: 900; color: var(--accent-gold);
  margin-bottom: 6px; letter-spacing: 0.05em;
}
.rules-steps {
  padding-left: 18px; list-style: decimal;
}
.rules-steps li, .rules-list li {
  font-size: 0.65rem; color: var(--text-secondary);
  margin-bottom: 3px; line-height: 1.5;
}
.rules-list { list-style: none; padding: 0; }
.rules-list li { display: flex; align-items: center; gap: 6px; }
.rules-badge {
  font-size: 0.55rem; font-weight: 700; padding: 1px 6px;
  border-radius: 4px; white-space: nowrap; flex-shrink: 0;
}
.rules-badge.bonus { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.rules-badge.critical { background: rgba(251,191,36,0.15); color: var(--accent-gold); border: 1px solid rgba(251,191,36,0.3); }
.rules-table {
  width: 100%; border-collapse: collapse; font-size: 0.6rem;
}
.rules-table th {
  padding: 4px 6px; text-align: left; font-weight: 700;
  color: var(--accent-gold); border-bottom: 1px solid rgba(251,191,36,0.15);
  font-size: 0.55rem;
}
.rules-table td {
  padding: 3px 6px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.rules-table tr.rules-highlight td {
  color: var(--accent-gold); font-weight: 700;
}
.rules-footer {
  font-size: 0.55rem; color: rgba(255,255,255,0.3);
  text-align: center; margin-top: 6px; font-style: italic;
}

/* ---- Bet Input ---- */
.bet-input-area { margin: 10px 0; text-align: center; }
.bet-input-label {
  font-size: 0.7rem; color: var(--text-secondary);
  margin-bottom: 6px; letter-spacing: 0.1em;
}
.bet-input-wrapper {
  display: flex; justify-content: center; align-items: center; gap: 8px;
}
.bet-input {
  width: 160px; padding: 10px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem; font-weight: 900;
  color: var(--accent-gold);
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(251,191,36,0.25);
  border-radius: 10px; text-align: center;
  outline: none; transition: all 0.3s ease;
  -moz-appearance: textfield; appearance: textfield;
}
.bet-input::-webkit-outer-spin-button,
.bet-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bet-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(251,191,36,0.2);
  background: rgba(255,255,255,0.06);
}
.bet-input::placeholder { color: rgba(255,255,255,0.2); font-weight: 400; font-size: 0.9rem; }
.bet-input-unit { font-size: 1.1rem; font-weight: 700; color: var(--text-secondary); }
.bet-note {
  font-size: 0.55rem; color: rgba(255,255,255,0.25);
  margin-top: 4px; letter-spacing: 0.03em;
}

/* ---- Message Area ---- */
.message-area {
  text-align: center; height: 28px;
  display: flex; align-items: center; justify-content: center; margin: 4px 0;
}
.message-text { font-size: 0.8rem; color: var(--text-secondary); transition: all 0.3s; }
.message-text.highlight { color: var(--accent-gold); font-weight: 700; font-size: 0.95rem; text-shadow: var(--glow-gold); }
.message-text.dramatic {
  color: #fff; font-weight: 900; font-size: 1.1rem;
  text-shadow: 0 0 20px rgba(255,255,255,0.6);
  animation: dramaticPulse 0.6s ease-in-out;
}
@keyframes dramaticPulse { 0% { transform: scale(0.8); opacity: 0; } 50% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.message-text.fail-msg { color: var(--accent-red); font-weight: 700; }
.message-text.win-msg { color: var(--accent-gold); font-weight: 900; font-size: 1rem; text-shadow: var(--glow-gold); }

/* ---- Battle Field ---- */
.battle-field {
  position: relative; margin: 6px 0; padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13,26,13,0.8) 0%, rgba(10,20,40,0.8) 100%);
  border: 1px solid rgba(251,191,36,0.12);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
  min-height: 340px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  overflow: hidden;
}
.field-enemy, .field-player {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 2;
}
.field-label { font-size: 0.55rem; color: rgba(255,255,255,0.25); letter-spacing: 0.2em; }

/* ---- Card Zone ---- */
.card-zone { width: var(--card-width); height: var(--card-height); perspective: 800px; position: relative; }
.card-placeholder {
  width: 100%; height: 100%; border-radius: 8px;
  border: 2px dashed rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.02);
}
.card-placeholder span { font-size: 0.8rem; color: rgba(255,255,255,0.2); font-weight: 700; letter-spacing: 0.1em; }

/* ---- Card ---- */
.game-card {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d; transition: transform 0.6s ease;
}
.game-card.flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute; width: 100%; height: 100%;
  backface-visibility: hidden; border-radius: 8px; overflow: hidden;
}
.card-back {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1b69 50%, #1a0a2e 100%);
  border: 2px solid #8B6914;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.card-back-pattern {
  width: 80%; height: 85%;
  border: 2px solid rgba(139,105,20,0.4); border-radius: 4px;
  background: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(139,105,20,0.1) 5px, rgba(139,105,20,0.1) 10px);
  display: flex; align-items: center; justify-content: center;
}
.card-back-pattern::after { content: '✦'; font-size: 2rem; color: rgba(251,191,36,0.4); }
.card-front {
  transform: rotateY(180deg); border: 2px solid #8B6914;
  display: flex; flex-direction: column; z-index: 0;
}
.card-front[data-attribute="闇"] { background: linear-gradient(180deg, #1a0a2e 0%, #2d1050 40%, #1a0a2e 100%); }
.card-front[data-attribute="光"] { background: linear-gradient(180deg, #3a3000 0%, #5a4800 40%, #3a3000 100%); }
.card-front[data-attribute="炎"] { background: linear-gradient(180deg, #2a0a0a 0%, #4a1010 40%, #2a0a0a 100%); }
.card-front[data-attribute="水"] { background: linear-gradient(180deg, #0a1a2e 0%, #102850 40%, #0a1a2e 100%); }
.card-front[data-attribute="地"] { background: linear-gradient(180deg, #1a1a0a 0%, #3a3010 40%, #1a1a0a 100%); }
.card-front[data-attribute="風"] { background: linear-gradient(180deg, #0a2a1a 0%, #104a30 40%, #0a2a1a 100%); }

.card-header { padding: 4px 6px 2px; display: flex; justify-content: space-between; align-items: center; }
.card-name { font-size: 0.5rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.8); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-attribute { font-size: 0.5rem; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; flex-shrink: 0; }
.card-attribute[data-attr="闇"] { background: #6A0DAD; color: #fff; }
.card-attribute[data-attr="光"] { background: #FFD700; color: #333; }
.card-attribute[data-attr="炎"] { background: #FF4500; color: #fff; }
.card-attribute[data-attr="水"] { background: #1E90FF; color: #fff; }
.card-attribute[data-attr="地"] { background: #8B7355; color: #fff; }
.card-attribute[data-attr="風"] { background: #32CD32; color: #fff; }

.card-level { padding: 1px 6px; font-size: 0.45rem; color: #FFD700; text-shadow: 0 0 5px rgba(255,215,0,0.5); letter-spacing: 1px; }
.card-image {
  flex: 1; margin: 2px 6px; border: 1px solid rgba(139,105,20,0.3);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; background: rgba(0,0,0,0.3);
}
.monster-icon { font-size: 2.5rem; position: relative; z-index: 2; }
.monster-aura { position: absolute; width: 60px; height: 60px; border-radius: 50%; filter: blur(15px); opacity: 0.5; z-index: 1; }
.card-stats { display: flex; justify-content: space-between; padding: 3px 6px 4px; background: rgba(0,0,0,0.4); border-top: 1px solid rgba(139,105,20,0.3); }
.stat-atk, .stat-def { font-size: 0.55rem; font-weight: 700; }
.stat-atk { color: #ff6b6b; }
.stat-def { color: #6bb5ff; }

/* Rarity borders */
.card-rarity-N .card-front { border-color: #8B6914; }
.card-rarity-R .card-front { border-color: #4169E1; box-shadow: 0 0 8px rgba(65,105,225,0.3); }
.card-rarity-SR .card-front { border-color: #FFD700; box-shadow: 0 0 12px rgba(255,215,0,0.4); }
.card-rarity-UR .card-front { border-color: #FF69B4; box-shadow: 0 0 20px rgba(255,105,180,0.5); animation: urCardGlow 2s ease-in-out infinite; }
@keyframes urCardGlow { 0%,100% { box-shadow: 0 0 15px rgba(255,105,180,0.4), 0 0 30px rgba(168,85,247,0.2); } 50% { box-shadow: 0 0 25px rgba(255,105,180,0.7), 0 0 50px rgba(168,85,247,0.4); } }

.rarity-badge { position: absolute; top: 3px; right: 3px; font-size: 0.4rem; font-weight: 900; padding: 1px 4px; border-radius: 3px; z-index: 5; letter-spacing: 0.05em; }
.rarity-N { background: rgba(100,100,100,0.6); color: #ccc; }
.rarity-R { background: rgba(65,105,225,0.7); color: #fff; }
.rarity-SR { background: rgba(255,215,0,0.8); color: #333; }
.rarity-UR { background: linear-gradient(90deg, #FF69B4, #a855f7, #3b82f6); color: #fff; }

/* VS */
.vs-display { position: relative; z-index: 10; margin: 6px 0; }
.vs-text { font-size: 1.2rem; font-weight: 900; color: rgba(255,255,255,0.15); letter-spacing: 0.15em; transition: all 0.5s ease; }
.vs-text.active { color: #fff; text-shadow: 0 0 30px rgba(255,255,255,0.8), 0 0 60px rgba(251,191,36,0.5); font-size: 1.8rem; animation: vsPulse 0.8s ease-out; }
@keyframes vsPulse { 0% { transform: scale(0.5); opacity: 0; } 50% { transform: scale(1.3); } 100% { transform: scale(1); opacity: 1; } }

/* Summon pillar */
.summon-pillar { position: absolute; width: 120px; height: 200%; left: 50%; top: -50%; transform: translateX(-50%); background: linear-gradient(180deg, transparent 0%, rgba(251,191,36,0.1) 20%, rgba(251,191,36,0.3) 50%, rgba(251,191,36,0.1) 80%, transparent 100%); opacity: 0; pointer-events: none; z-index: 1; }
.summon-pillar.active { animation: summonPillar 1s ease-out forwards; }
@keyframes summonPillar { 0% { opacity: 0; width: 10px; } 30% { opacity: 1; width: 140px; } 100% { opacity: 0; width: 200px; } }

/* Clash */
.clash-effect { position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(255,255,255,0.8), rgba(251,191,36,0.4), transparent); pointer-events: none; z-index: 20; opacity: 0; }
.clash-effect.active { animation: clashWave 0.6s ease-out forwards; }
@keyframes clashWave { 0% { width: 0; height: 0; opacity: 1; } 100% { width: 400px; height: 400px; opacity: 0; } }

/* Card detail */
.card-detail { margin: 6px 0; opacity: 0; max-height: 0; overflow: hidden; transition: all 0.4s ease; }
.card-detail.show { opacity: 1; max-height: 80px; }
.card-detail-inner { padding: 8px 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(251,191,36,0.1); border-radius: 8px; display: flex; flex-direction: column; gap: 2px; }
.detail-name { font-size: 0.85rem; font-weight: 700; color: var(--accent-gold); }
.detail-stats { font-size: 0.7rem; color: var(--text-secondary); }
.detail-desc { font-size: 0.6rem; color: rgba(255,255,255,0.4); font-style: italic; }

/* ---- Action Button ---- */
.action-area { text-align: center; margin: 8px 0; }
.draw-btn {
  width: 100%; max-width: 320px; padding: 12px 24px;
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #6A0DAD, #4B0082, #6A0DAD);
  border: 2px solid rgba(251,191,36,0.3); border-radius: 12px;
  cursor: pointer; transition: all 0.3s ease; letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(106,13,173,0.4);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.btn-text { font-size: 1rem; font-weight: 900; }
.btn-cost { font-size: 0.65rem; color: rgba(255,255,255,0.6); }
.draw-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(106,13,173,0.6); border-color: rgba(251,191,36,0.6); }
.draw-btn:active:not(:disabled) { transform: translateY(0); }
.draw-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.draw-btn::after { content: ''; position: absolute; top: -50%; left: -60%; width: 200%; height: 200%; background: linear-gradient(45deg, transparent, rgba(255,255,255,0.08), transparent); transform: rotate(45deg); transition: all 0.6s; }
.draw-btn:hover:not(:disabled)::after { left: 100%; }

/* ---- Prize Result ---- */
.prize-result {
  display: none;
  margin: 12px 0;
}
.prize-result.show {
  display: block;
  animation: prizeAppear 0.5s ease-out;
}
@keyframes prizeAppear {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}
.prize-result-inner {
  padding: 20px 16px;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(251,191,36,0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.prize-tier {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 3px 16px;
  border-radius: 20px;
  letter-spacing: 0.15em;
}
.prize-icon {
  font-size: 3rem;
  animation: prizeIconBounce 1s ease-in-out infinite;
}
@keyframes prizeIconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.prize-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary);
}
.prize-points {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.prize-result-inner.lose-prize .prize-icon {
  animation: none;
  opacity: 0.5;
}
.prize-result-inner.lose-prize .prize-name {
  color: var(--text-secondary);
}

/* SS賞特別演出 */
.prize-result-inner.ss-prize {
  border-color: rgba(255,215,0,0.6);
  box-shadow: 0 0 40px rgba(255,215,0,0.3);
  animation: ssPrizeGlow 2s ease-in-out infinite;
}
@keyframes ssPrizeGlow {
  0%, 100% { box-shadow: 0 0 30px rgba(255,215,0,0.2); }
  50% { box-shadow: 0 0 60px rgba(255,215,0,0.5), 0 0 100px rgba(168,85,247,0.2); }
}

/* Retry button */
.retry-btn {
  margin-top: 8px;
  padding: 10px 30px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.08em;
}
.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59,130,246,0.5);
}

/* ---- History ---- */
.history-area { margin-top: 8px; }
.history-title { font-size: 0.65rem; color: var(--text-secondary); text-align: center; margin-bottom: 4px; letter-spacing: 0.1em; }
.history-list { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; max-height: 80px; overflow-y: auto; }
.history-item { font-size: 0.55rem; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.history-item.win { border-color: rgba(74,222,128,0.3); color: #4ade80; }
.history-item.lose { border-color: rgba(239,68,68,0.2); color: #f87171; }

/* ---- Particles ---- */
.particle-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: 30; }
.particle { position: absolute; width: 4px; height: 4px; border-radius: 50%; pointer-events: none; }
@keyframes particleFly { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; } }

/* ---- Overlays ---- */
.ur-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: 100; pointer-events: none; }
.ur-overlay.show { display: block; animation: urFlash 1.5s ease-out forwards; }
@keyframes urFlash { 0% { background: rgba(255,255,255,0.9); } 15% { background: rgba(255,105,180,0.3); } 30% { background: rgba(168,85,247,0.2); } 100% { background: transparent; } }

.prize-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: 100; pointer-events: none; }
.prize-overlay.show { display: block; animation: prizeFlash 1s ease-out forwards; }
@keyframes prizeFlash { 0% { background: rgba(251,191,36,0.6); } 100% { background: transparent; } }

/* Screen shake */
@keyframes screenShake { 0%,100% { transform: translate(0,0); } 10% { transform: translate(-4px,2px); } 20% { transform: translate(4px,-2px); } 30% { transform: translate(-3px,3px); } 40% { transform: translate(3px,-1px); } 50% { transform: translate(-2px,1px); } }
.screen-shake { animation: screenShake 0.4s ease-out; }

/* Card animations */
@keyframes cardDestroy { 0% { transform: scale(1) rotateY(180deg); opacity: 1; filter: brightness(1); } 30% { transform: scale(1.1) rotateY(180deg); filter: brightness(2); } 100% { transform: scale(0) rotateY(180deg); opacity: 0; filter: brightness(0.5); } }
.card-destroy { animation: cardDestroy 0.6s ease-in forwards; }
@keyframes winGlow { 0% { filter: brightness(1); } 50% { filter: brightness(1.5) drop-shadow(0 0 15px rgba(251,191,36,0.8)); } 100% { filter: brightness(1.2) drop-shadow(0 0 8px rgba(251,191,36,0.4)); } }
.card-win-glow { animation: winGlow 0.8s ease-out forwards; }

/* ATK display */
.atk-display { position: absolute; font-size: 1.6rem; font-weight: 900; color: #fff; text-shadow: 0 0 20px rgba(255,0,0,0.8), 0 0 40px rgba(255,0,0,0.4); z-index: 25; opacity: 0; pointer-events: none; }
.atk-display.show { animation: atkAppear 0.5s ease-out forwards; }
@keyframes atkAppear { 0% { opacity: 0; transform: scale(0.5); } 60% { opacity: 1; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }
.atk-display.player-atk { bottom: 30px; left: 50%; transform: translateX(-50%); }
.atk-display.enemy-atk { top: 30px; left: 50%; transform: translateX(-50%); }

/* ---- Responsive ---- */
@media (max-width: 400px) {
  .game-container { padding: 8px 10px; }
  :root { --card-width: 90px; --card-height: 130px; }
  .game-title { font-size: 1rem; }
  .battle-field { min-height: 300px; padding: 8px; }
}
