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

:root {
  --gold: #f5c842;
  --gold-dim: #c9973a;
  --purple: #6b21d6;
  --purple-dark: #3d0f7e;
  --purple-light: #9b59f5;
  --deep: #0a0314;
  --dark: #110826;
  --card-bg: #1a0d35;
  --fire: #e85d04;
  --water: #0077b6;
  --air: #90e0ef;
  --earth: #588157;
  --aether: #c77dff;
  --common: #888;
  --uncommon: #3dd68c;
  --rare: #4e9bef;
  --epic: #c77dff;
  --legendary: #f5c842;
  --font-en: 'Cinzel', serif;
  --font-deco: 'Cinzel Decorative', serif;
  --font-th: 'Sarabun', sans-serif;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: var(--deep);
  color: #e8d5ff;
  font-family: var(--font-th);
  font-size: 14px;
  user-select: none;
}

#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.particle {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); animation: float-particle linear infinite; opacity: 0;
}
@keyframes float-particle {
  0% { transform: translateY(100vh) rotate(0); opacity: 0; }
  10% { opacity: 0.8; } 90% { opacity: 0.4; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

.screen { position: fixed; inset: 0; z-index: 10; display: none; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.screen.active { display: flex; }

.title-content { display: flex; flex-direction: column; align-items: center; gap: 24px; position: relative; z-index: 2; }
.title-logo { text-align: center; }
.logo-cats { font-size: 48px; animation: bob 2s ease-in-out infinite alternate; display: block; margin-bottom: 8px; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-12px); } }

.game-title {
  font-family: var(--font-deco); font-size: clamp(32px, 5vw, 56px); font-weight: 900; line-height: 1.1; text-align: center;
  background: linear-gradient(135deg, var(--gold), #fff8dc, var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 0 20px rgba(245,200,66,0.5));
}
.game-title span {
  font-size: 0.7em;
  background: linear-gradient(135deg, var(--purple-light), #e0aaff, var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.game-subtitle { font-family: var(--font-th); font-size: 18px; color: #c9b3e8; margin-top: 4px; letter-spacing: 3px; }

.title-cards { display: flex; gap: 8px; position: relative; height: 100px; }
.deco-card {
  width: 60px; height: 90px; border-radius: 8px;
  background: linear-gradient(160deg, #2a1050, #0d0520); border: 1px solid rgba(245,200,66,0.3);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  transform: rotate(var(--r)) translateX(var(--x));
  animation: title-card-float var(--d, 0s) 1.5s ease-in-out infinite alternate;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
@keyframes title-card-float {
  from { transform: rotate(var(--r)) translateX(var(--x)) translateY(0); }
  to { transform: rotate(var(--r)) translateX(var(--x)) translateY(-8px); }
}

.title-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.title-footer { font-size: 12px; color: rgba(200,180,240,0.5); letter-spacing: 1px; }

.btn-primary {
  padding: 14px 32px; font-family: var(--font-th); font-size: 18px; font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--purple-light)); color: #fff;
  border: none; border-radius: 40px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(107,33,214,0.5); transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(107,33,214,0.7); }
.btn-secondary {
  padding: 10px 24px; font-family: var(--font-th); font-size: 15px;
  background: rgba(255,255,255,0.05); color: #c9b3e8;
  border: 1px solid rgba(200,180,240,0.25); border-radius: 30px; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(107,33,214,0.3); border-color: var(--purple-light); color: #fff; }
.btn-back {
  position: absolute; bottom: 24px; left: 24px; padding: 10px 20px;
  font-family: var(--font-th); font-size: 14px; background: rgba(255,255,255,0.05);
  color: #c9b3e8; border: 1px solid rgba(200,180,240,0.2); border-radius: 20px; cursor: pointer; transition: all 0.2s;
}
.btn-back:hover { background: rgba(107,33,214,0.3); color: #fff; }
.btn-close {
  padding: 8px 16px; font-size: 14px; background: rgba(255,80,80,0.2); color: #ff8080;
  border: 1px solid rgba(255,80,80,0.3); border-radius: 20px; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-close:hover { background: rgba(255,80,80,0.4); }

#screen-zodiac { background: radial-gradient(ellipse at center, #1a0440 0%, var(--deep) 70%); overflow-y: auto; }
.screen-header { text-align: center; padding: 24px 16px 8px; z-index: 2; position: relative; }
.screen-header h2 { font-family: var(--font-en); font-size: clamp(20px, 3vw, 28px); color: var(--gold); margin-bottom: 6px; }
.screen-header p { color: #c9b3e8; font-size: 14px; }

.zodiac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 16px; max-width: 960px; width: 100%; z-index: 2; }
.zodiac-card {
  background: linear-gradient(160deg, #1a0d35, #0d0520); border: 1px solid rgba(200,180,240,0.2);
  border-radius: 16px; padding: 16px 12px; text-align: center; cursor: pointer; transition: all 0.25s;
}
.zodiac-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.zodiac-symbol { font-size: 40px; display: block; margin-bottom: 6px; }
.zodiac-name { font-family: var(--font-en); font-size: 13px; font-weight: 600; color: var(--gold); }
.zodiac-name-th { font-size: 13px; color: #c9b3e8; margin-top: 2px; }
.zodiac-element-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.zodiac-passive { margin-top: 8px; font-size: 11px; color: rgba(200,180,240,0.8); line-height: 1.4; }

#screen-battle { display: none; flex-direction: column; padding: 0; gap: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #1a0440 0%, var(--deep) 60%); }
#screen-battle.active { display: flex; }
.combatant-area { padding: 8px 12px; position: relative; }
.enemy-area { border-bottom: 1px solid rgba(200,180,240,0.1); background: rgba(0,0,0,0.2); }
.player-area { border-top: 1px solid rgba(200,180,240,0.1); background: rgba(0,0,0,0.15); flex-shrink: 0; }
.combatant-info { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.combatant-avatar { font-size: 36px; min-width: 44px; text-align: center; animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.combatant-details { flex: 1; }
.combatant-name { font-family: var(--font-en); font-size: 13px; font-weight: 600; color: var(--gold); }
.hp-bar-wrap { position: relative; background: rgba(0,0,0,0.4); border-radius: 10px; height: 14px; margin-top: 4px; overflow: hidden; border: 1px solid rgba(200,180,240,0.15); }
.hp-bar { height: 100%; background: linear-gradient(90deg, #e63946, #e85d04); border-radius: 10px; transition: width 0.5s ease; width: 100%; }
.hp-bar.player-hp { background: linear-gradient(90deg, #2d9e50, #52c97a); }
.hp-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.status-row { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.status-badge { padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 600; }
.combatant-stats { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.stat { font-size: 13px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.stat.shield { background: rgba(74,144,226,0.2); color: #74b9ff; }
.stat.poison { background: rgba(0,200,100,0.2); color: #55efc4; }
.enemy-hand { display: flex; gap: 4px; justify-content: center; padding: 4px 0; }
.enemy-card-back { width: 32px; height: 46px; border-radius: 5px; background: linear-gradient(160deg, #3d1b6e, #1a0d35); border: 1px solid rgba(200,180,240,0.2); display: flex; align-items: center; justify-content: center; font-size: 14px; }

#battle-middle { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 8px; overflow: hidden; gap: 4px; }
.round-info { display: flex; gap: 12px; align-items: center; }
#round-num { font-family: var(--font-en); font-size: 13px; color: var(--gold-dim); }
.turn-label { padding: 3px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; background: rgba(107,33,214,0.4); color: var(--purple-light); border: 1px solid rgba(155,89,245,0.3); }
.turn-label.enemy-turn { background: rgba(232,93,4,0.3); color: #ffa07a; border-color: rgba(232,93,4,0.4); }
.battle-log { width: 100%; max-width: 480px; max-height: 80px; overflow-y: auto; background: rgba(0,0,0,0.3); border: 1px solid rgba(200,180,240,0.1); border-radius: 10px; padding: 6px 10px; }
.log-entry { font-size: 12px; color: #c9b3e8; padding: 1px 0; animation: log-in 0.3s ease; }
@keyframes log-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.log-entry.damage { color: #ff8080; } .log-entry.heal { color: #52c97a; } .log-entry.magic { color: var(--aether); } .log-entry.system { color: var(--gold); }
.effect-zone { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.floating-dmg { font-family: var(--font-en); font-size: 28px; font-weight: 900; animation: float-up 1.2s ease forwards; pointer-events: none; }
.floating-dmg.dmg { color: #ff4444; } .floating-dmg.heal { color: #52c97a; } .floating-dmg.shield { color: #74b9ff; }
@keyframes float-up { 0% { opacity: 0; transform: translateY(10px) scale(0.5); } 20% { opacity: 1; transform: translateY(-10px) scale(1.2); } 80% { opacity: 1; transform: translateY(-30px) scale(1); } 100% { opacity: 0; transform: translateY(-50px) scale(0.8); } }

.energy-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.energy-label { font-size: 12px; color: #c9b3e8; }
.energy-gems { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.energy-gem { width: 14px; height: 14px; border-radius: 50%; transition: all 0.3s; }
.energy-gem.full { background: radial-gradient(circle at 35% 35%, #ffe066, #f5c842); box-shadow: 0 0 6px rgba(245,200,66,0.6); }
.energy-gem.empty { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); }
.energy-text { font-size: 12px; font-weight: 600; color: var(--gold); }

.action-row { display: flex; gap: 8px; margin-bottom: 6px; }
.btn-action { padding: 8px 16px; border-radius: 20px; border: none; cursor: pointer; font-family: var(--font-th); font-size: 13px; font-weight: 600; transition: all 0.2s; }
.btn-play { background: linear-gradient(135deg, var(--purple), var(--purple-light)); color: #fff; flex: 1; }
.btn-play:disabled { background: rgba(255,255,255,0.05); color: rgba(200,180,240,0.3); cursor: not-allowed; }
.btn-play:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(107,33,214,0.5); }
.btn-end { background: linear-gradient(135deg, #e85d04, #f48c06); color: #fff; flex: 1; }
.btn-end:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,93,4,0.5); }
.btn-dex { background: rgba(255,255,255,0.05); color: #c9b3e8; border: 1px solid rgba(200,180,240,0.2); }
.btn-dex:hover { background: rgba(107,33,214,0.3); color: #fff; }
.hand-label { font-size: 12px; color: rgba(200,180,240,0.6); margin-bottom: 4px; }

.player-hand { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; justify-content: center; scrollbar-width: thin; scrollbar-color: rgba(107,33,214,0.4) transparent; }
.player-hand::-webkit-scrollbar { height: 4px; }
.player-hand::-webkit-scrollbar-thumb { background: rgba(107,33,214,0.4); border-radius: 2px; }

.card { width: 74px; min-width: 74px; height: 106px; border-radius: 10px; border: 2px solid rgba(200,180,240,0.15); background: linear-gradient(160deg, #1e1040, #0d0520); cursor: pointer; transition: all 0.2s; position: relative; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.5); flex-shrink: 0; animation: card-appear 0.3s ease backwards; }
.card:hover { transform: translateY(-12px) scale(1.05); z-index: 10; box-shadow: 0 12px 24px rgba(0,0,0,0.7); }
.card.selected { border-color: var(--gold); box-shadow: 0 0 16px rgba(245,200,66,0.5); transform: translateY(-16px); z-index: 10; }
.card.unplayable { opacity: 0.4; cursor: not-allowed; }
.card.unplayable:hover { transform: none; }
.card-cost { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe066, #f5c842); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; color: #2d1a00; z-index: 2; }
.card-rune { position: absolute; top: 4px; right: 4px; font-size: 11px; color: var(--gold); cursor: pointer; z-index: 3; opacity: 0; transition: opacity 0.2s; }
.card:hover .card-rune { opacity: 1; }
.card-art { font-size: 26px; text-align: center; padding: 14px 4px 4px; line-height: 1; }
.card-name { font-family: var(--font-en); font-size: 7.5px; text-align: center; padding: 0 4px; line-height: 1.2; color: #e8d5ff; font-weight: 600; }
.card-name-th { font-size: 9px; text-align: center; padding: 0 3px; color: rgba(200,180,240,0.7); line-height: 1.2; }
.card-stats { display: flex; justify-content: space-around; padding: 3px 2px; margin-top: auto; border-top: 1px solid rgba(200,180,240,0.1); }
.cs { font-size: 9px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.cs-icon { font-size: 8px; } .cs-val { font-size: 10px; }
.cs-atk { color: #ff8080; } .cs-def { color: #74b9ff; } .cs-mgc { color: var(--aether); }
.card-rarity-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.card.element-fire { border-color: rgba(232,93,4,0.4); } .card.element-water { border-color: rgba(0,119,182,0.4); } .card.element-air { border-color: rgba(144,224,239,0.3); } .card.element-earth { border-color: rgba(88,129,87,0.4); } .card.element-aether { border-color: rgba(199,125,255,0.4); }
.rarity-common { background: var(--common); } .rarity-uncommon { background: var(--uncommon); } .rarity-rare { background: linear-gradient(90deg, var(--rare), #a8d4ff); } .rarity-epic { background: linear-gradient(90deg, var(--epic), #e0b3ff); } .rarity-legendary { background: linear-gradient(90deg, var(--legendary), #fff8dc, var(--legendary)); }
.card.type-major { background: linear-gradient(160deg, #2a1050, #0d0520); } .card.type-wands { background: linear-gradient(160deg, #2a1208, #0d0520); } .card.type-cups { background: linear-gradient(160deg, #081828, #0d0520); } .card.type-swords { background: linear-gradient(160deg, #181828, #0d0520); } .card.type-pentacles { background: linear-gradient(160deg, #0d2010, #0d0520); } .card.type-oracle { background: linear-gradient(160deg, #1a1040, #0d0520); }
.legendary-glow { animation: legendary-pulse 2s ease-in-out infinite; }
@keyframes legendary-pulse { 0%, 100% { box-shadow: 0 0 8px rgba(245,200,66,0.4); } 50% { box-shadow: 0 0 20px rgba(245,200,66,0.8), 0 0 40px rgba(245,200,66,0.3); } }
@keyframes card-appear { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.result-content { text-align: center; padding: 40px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.result-emoji { font-size: 80px; animation: bounce 0.8s ease; }
@keyframes bounce { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.2) rotate(5deg); } 100% { transform: scale(1) rotate(0); } }
.result-content h2 { font-family: var(--font-deco); font-size: 36px; }
.result-content.victory h2 { color: var(--gold); } .result-content.defeat h2 { color: #e63946; }
.result-msg { font-size: 16px; color: #c9b3e8; max-width: 400px; }
.result-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); animation: fade-in 0.2s ease; }
.overlay.hidden { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.dex-panel { background: linear-gradient(160deg, #1a0d35, #0d0520); border: 1px solid rgba(200,180,240,0.2); border-radius: 20px; width: min(95vw, 900px); height: min(90vh, 700px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.8); }
.dex-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid rgba(200,180,240,0.1); flex-shrink: 0; }
.dex-header h2 { font-family: var(--font-en); font-size: 18px; color: var(--gold); flex-shrink: 0; }
.dex-tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.dex-tab { padding: 6px 14px; border-radius: 16px; border: 1px solid rgba(200,180,240,0.2); background: transparent; color: #c9b3e8; cursor: pointer; font-family: var(--font-th); font-size: 13px; transition: all 0.2s; }
.dex-tab.active, .dex-tab:hover { background: rgba(107,33,214,0.4); border-color: var(--purple-light); color: #fff; }
.dex-filters { display: flex; gap: 6px; padding: 10px 20px; flex-wrap: wrap; border-bottom: 1px solid rgba(200,180,240,0.08); flex-shrink: 0; }
.filter-btn { padding: 4px 12px; border-radius: 12px; border: 1px solid rgba(200,180,240,0.2); background: transparent; color: rgba(200,180,240,0.7); cursor: pointer; font-family: var(--font-th); font-size: 12px; transition: all 0.2s; }
.filter-btn.active { background: rgba(107,33,214,0.4); color: #fff; border-color: var(--purple-light); }
.dex-content { flex: 1; overflow-y: auto; padding: 16px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; align-content: start; scrollbar-width: thin; scrollbar-color: rgba(107,33,214,0.4) transparent; }
.dex-content::-webkit-scrollbar { width: 6px; } .dex-content::-webkit-scrollbar-thumb { background: rgba(107,33,214,0.4); border-radius: 3px; }
.dex-card { width: 100%; aspect-ratio: 0.7; border-radius: 10px; border: 2px solid rgba(200,180,240,0.15); background: linear-gradient(160deg, #1e1040, #0d0520); cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 4px; gap: 3px; position: relative; overflow: hidden; }
.dex-card:hover { transform: scale(1.05); border-color: var(--gold); }

.rune-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; padding: 8px 0; max-height: 60vh; overflow-y: auto; }
.rune-item { background: rgba(255,255,255,0.04); border: 1px solid rgba(200,180,240,0.2); border-radius: 12px; padding: 12px 8px; text-align: center; cursor: pointer; transition: all 0.2s; }
.rune-item:hover { background: rgba(107,33,214,0.3); border-color: var(--gold); }
.rune-item.equipped { border-color: var(--gold); background: rgba(245,200,66,0.1); }
.rune-symbol { font-size: 28px; display: block; margin-bottom: 4px; font-family: serif; }
.rune-name { font-family: var(--font-en); font-size: 10px; color: var(--gold); }
.rune-name-th { font-size: 10px; color: #c9b3e8; }
.rune-bonus { font-size: 11px; color: #52c97a; margin-top: 3px; font-weight: 600; }
.rune-panel { background: linear-gradient(160deg, #1a0d35, #0d0520); border: 1px solid rgba(200,180,240,0.2); border-radius: 20px; padding: 24px; max-width: 600px; width: 90vw; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.8); }
.rune-panel h3 { font-family: var(--font-en); color: var(--gold); margin-bottom: 16px; }

.zodiac-dex-item { background: rgba(255,255,255,0.04); border: 1px solid rgba(200,180,240,0.2); border-radius: 12px; padding: 16px 12px; text-align: center; }

.card-modal-panel { background: linear-gradient(160deg, #1a0d35, #0d0520); border: 1px solid rgba(200,180,240,0.25); border-radius: 20px; padding: 24px; max-width: 400px; width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,0.8); display: flex; flex-direction: column; gap: 16px; }
.modal-card-art { font-size: 80px; text-align: center; }
.modal-card-title { font-family: var(--font-en); font-size: 20px; color: var(--gold); text-align: center; }
.modal-card-title-th { font-size: 16px; color: #c9b3e8; text-align: center; }
.modal-stats { display: flex; justify-content: center; gap: 16px; }
.modal-stat { text-align: center; }
.modal-stat-val { font-size: 24px; font-weight: 700; }
.modal-stat-label { font-size: 11px; color: rgba(200,180,240,0.6); }
.modal-desc { font-size: 14px; color: #c9b3e8; text-align: center; line-height: 1.6; }
.modal-rune-section { border-top: 1px solid rgba(200,180,240,0.1); padding-top: 16px; }
.modal-rune-section h4 { font-family: var(--font-en); font-size: 13px; color: var(--gold); margin-bottom: 8px; text-align: center; }
.modal-equip-btn { width: 100%; padding: 10px; border-radius: 12px; background: rgba(107,33,214,0.3); border: 1px solid var(--purple-light); color: #fff; cursor: pointer; font-family: var(--font-th); font-size: 14px; transition: all 0.2s; }
.modal-equip-btn:hover { background: rgba(107,33,214,0.5); }

.card-play-anim { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1.5); z-index: 50; animation: card-play 0.8s ease forwards; pointer-events: none; }
@keyframes card-play { 0% { opacity: 0; transform: translate(-50%, 50%) scale(0.5) rotate(-10deg); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.5) rotate(3deg); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1.5) rotate(-2deg); } 100% { opacity: 0; transform: translate(-50%, -150%) scale(0.8) rotate(5deg); } }

.elem-fire { background: rgba(232,93,4,0.25); color: #ffa07a; } .elem-water { background: rgba(0,119,182,0.25); color: #74d7f5; } .elem-air { background: rgba(144,224,239,0.15); color: #b2ebf2; } .elem-earth { background: rgba(88,129,87,0.25); color: #a8d5a2; } .elem-aether { background: rgba(199,125,255,0.2); color: #e0b3ff; }

@media (max-width: 480px) { .card { width: 60px; min-width: 60px; height: 88px; } .card-art { font-size: 20px; } .zodiac-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
@media (min-height: 700px) { .card { width: 80px; min-width: 80px; height: 114px; } .card-art { font-size: 30px; } }
