/* ══════════════════════════════════════════════════
   The 12 Tribes™ — Game Board Styles
   ══════════════════════════════════════════════════ */

/* ── Game Mode Cards ── */
.game-mode-card { transition: all 0.3s ease; }
.game-mode-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(212, 160, 23, 0.15); }

/* ── Difficulty Buttons ── */
.difficulty-btn.active { background: rgba(212, 160, 23, 0.2); border-color: #D4A017; color: #D4A017; }

/* ── Game Field ── */
.game-field { min-height: 130px; transition: all 0.3s ease; }
.game-field.attack-target { border-color: rgba(220, 38, 38, 0.5); background: rgba(220, 38, 38, 0.05); }

/* ── Field Cards ── */
.field-card {
    width: 90px; min-height: 120px; border-radius: 8px; padding: 4px;
    cursor: pointer; transition: all 0.2s ease; position: relative;
    display: flex; flex-direction: column; align-items: center;
    font-size: 10px; border: 2px solid rgba(255,255,255,0.1);
}
.field-card:hover { transform: translateY(-4px); z-index: 10; }
.field-card.can-attack { border-color: rgba(212, 160, 23, 0.6); box-shadow: 0 0 10px rgba(212,160,23,0.3); }
.field-card.selected { border-color: #D4A017; box-shadow: 0 0 15px rgba(212,160,23,0.5); transform: translateY(-6px); }
.field-card.attack-target { border-color: #DC2626; box-shadow: 0 0 10px rgba(220,38,38,0.5); }
.field-card.summoning-sick { opacity: 0.7; }

.field-card .fc-name { font-weight: bold; text-align: center; line-height: 1.1; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.field-card .fc-art { width: 60px; height: 40px; border-radius: 4px; margin: 2px 0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.field-card .fc-stats { display: flex; justify-content: space-between; width: 100%; padding: 0 4px; }
.field-card .fc-atk { color: #F87171; font-weight: bold; }
.field-card .fc-hp { font-weight: bold; }
.field-card .fc-hp.damaged { color: #F87171; }
.field-card .fc-type { font-size: 8px; color: rgba(255,255,255,0.5); text-align: center; }

/* ── Hand Cards ── */
.hand-card {
    width: 100px; min-height: 140px; border-radius: 8px; padding: 6px;
    cursor: pointer; transition: all 0.2s ease; position: relative;
    display: flex; flex-direction: column; align-items: center;
    font-size: 10px; border: 2px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.hand-card:hover { transform: translateY(-12px) scale(1.05); z-index: 20; box-shadow: 0 8px 25px rgba(0,0,0,0.5); }
.hand-card.playable { border-color: rgba(74, 222, 128, 0.5); }
.hand-card.playable:hover { border-color: #4ADE80; box-shadow: 0 8px 25px rgba(74,222,128,0.3); }
.hand-card.unplayable { opacity: 0.6; }

.hand-card .hc-cost {
    position: absolute; top: -6px; left: -6px; width: 22px; height: 22px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 11px; color: #1A1A2E; z-index: 5;
}
.hand-card .hc-name { font-weight: bold; text-align: center; line-height: 1.1; margin-top: 8px; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 88px; }
.hand-card .hc-art { width: 70px; height: 45px; border-radius: 4px; margin: 3px 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.hand-card .hc-type { font-size: 8px; color: rgba(255,255,255,0.5); margin-bottom: 2px; }
.hand-card .hc-stats { display: flex; justify-content: space-between; width: 100%; padding: 0 6px; margin-top: auto; }
.hand-card .hc-ability { font-size: 7px; color: rgba(255,255,255,0.6); text-align: center; line-height: 1.2; max-height: 20px; overflow: hidden; padding: 0 2px; }

/* ── Faith Orbs ── */
.faith-orb {
    width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 9px; font-weight: bold; border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}
.faith-orb.empty { opacity: 0.3; }
.faith-orb.kingdom { background: linear-gradient(135deg, #D4A017, #A67C00); color: #1A1A2E; }
.faith-orb.prophecy { background: linear-gradient(135deg, #2563EB, #1D4ED8); color: white; }
.faith-orb.law { background: linear-gradient(135deg, #F5F5F5, #D4D4D4); color: #1A1A2E; }
.faith-orb.wisdom { background: linear-gradient(135deg, #16A34A, #15803D); color: white; }
.faith-orb.wrath { background: linear-gradient(135deg, #DC2626, #B91C1C); color: white; }
.faith-orb.divine { background: linear-gradient(135deg, #A855F7, #7C3AED); color: white; }

/* ── Faction Card Colors ── */
.faction-kingdom { background: linear-gradient(135deg, #2a2010, #1a1a2e); border-color: rgba(212,160,23,0.4); }
.faction-prophecy { background: linear-gradient(135deg, #101a2e, #1a1a2e); border-color: rgba(37,99,235,0.4); }
.faction-law { background: linear-gradient(135deg, #1e1e22, #1a1a2e); border-color: rgba(245,245,245,0.3); }
.faction-wisdom { background: linear-gradient(135deg, #0a1e14, #1a1a2e); border-color: rgba(22,163,74,0.4); }
.faction-wrath { background: linear-gradient(135deg, #2e1010, #1a1a2e); border-color: rgba(220,38,38,0.4); }
.faction-divine { background: linear-gradient(135deg, #1a102e, #1a1a2e); border-color: rgba(168,85,247,0.4); }

/* ── Animations ── */
@keyframes cardDraw { 0% { transform: translateY(-30px) scale(0.8); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes cardSummon { 0% { transform: scale(0.5) translateY(20px); opacity: 0; } 50% { transform: scale(1.1); } 100% { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes cardAttack { 0% { transform: translateX(0); } 30% { transform: translateX(20px); } 60% { transform: translateX(-10px); } 100% { transform: translateX(0); } }
@keyframes cardDeath { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(0) rotate(15deg); opacity: 0; } }
@keyframes damageFlash { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(2) saturate(0); } }
@keyframes healGlow { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 20px rgba(74,222,128,0.6); } }
@keyframes shakeAnimation { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes miracleFlash { 0% { opacity: 0; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(1); } }

.anim-draw { animation: cardDraw 0.4s ease-out; }
.anim-summon { animation: cardSummon 0.5s ease-out; }
.anim-attack { animation: cardAttack 0.4s ease-in-out; }
.anim-death { animation: cardDeath 0.4s ease-in forwards; }
.anim-damage { animation: damageFlash 0.3s ease-in-out; }
.anim-heal { animation: healGlow 0.6s ease-in-out; }
.anim-shake { animation: shakeAnimation 0.3s ease-in-out; }
.anim-miracle { animation: miracleFlash 0.6s ease-in-out; }

/* ── Floating Damage Numbers ── */
.damage-number {
    position: absolute; font-weight: bold; font-size: 24px;
    color: #F87171; text-shadow: 0 0 6px rgba(220,38,38,0.8);
    pointer-events: none; z-index: 100;
    animation: floatUp 1s ease-out forwards;
}
.heal-number {
    position: absolute; font-weight: bold; font-size: 24px;
    color: #4ADE80; text-shadow: 0 0 6px rgba(74,222,128,0.8);
    pointer-events: none; z-index: 100;
    animation: floatUp 1s ease-out forwards;
}
@keyframes floatUp { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-40px); } }

/* ── Game Log ── */
#game-log .log-entry { padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
#game-log .log-entry.player-action { color: #60A5FA; }
#game-log .log-entry.opponent-action { color: #F87171; }
#game-log .log-entry.system { color: #A78BFA; }

/* ── Game Over ── */
.game-over-win { color: #D4A017; }
.game-over-lose { color: #DC2626; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .field-card { width: 70px; min-height: 95px; }
    .field-card .fc-art { width: 45px; height: 30px; font-size: 16px; }
    .hand-card { width: 80px; min-height: 110px; }
    .hand-card .hc-art { width: 55px; height: 35px; font-size: 18px; }
    .hand-card:hover { transform: translateY(-8px) scale(1.03); }
}
