* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    color: #f8fafc;
    overflow: hidden;
}

#game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Modals & Glassmorphism */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border-radius: 20px;
}

.modal {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}
.modal.hidden {
    opacity: 0;
    pointer-events: none;
}
.modal-blur {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}
.modal-content {
    position: relative;
    padding: 40px;
    text-align: center;
    max-width: 90%;
    width: 400px;
}
#modal-context {
    font-family: 'Cinzel', serif;
    color: #fbbf24;
    font-size: 1.2rem;
    margin-bottom: 5px;
}
.modal-content h2 {
    font-size: 3rem;
    margin-bottom: 30px;
    margin-top: 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.btn-answer {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-answer:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(59, 130, 246, 0.4);
}

/* Header */
#top-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.commander {
    display: flex;
    flex-direction: column;
}
.crusader .commander-name { color: #60a5fa; }
.hussite .commander-name { color: #f87171; text-align: right; }
.commander-name {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.commander-hp {
    font-size: 2rem;
    font-weight: 800;
}
.hussite .commander-hp { text-align: right; }
#btn-combat {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.3rem;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transition: 0.2s;
    letter-spacing: 1px;
}
#btn-combat:hover { transform: scale(1.05); }

/* Aréna */
#board {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}
.board-grid {
    display: grid;
    grid-template-columns: repeat(5, 120px);
    grid-template-rows: 160px 4px 160px;
    gap: 20px;
    justify-items: center;
    align-items: center;
}
.battle-line {
    grid-column: 1 / -1;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.5), transparent);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    border-radius: 100%;
}
.slot {
    width: 110px;
    height: 154px;
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    position: relative;
}
.hussite-slot { cursor: pointer; }
.hussite-slot:hover {
    border-color: rgba(251, 191, 36, 0.6);
    background: rgba(255,255,255,0.02);
}

/* Karta na stole */
.board-card {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid;
}
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.board-card.hussite { background: linear-gradient(to bottom, #7f1d1d, #450a0a); border-color: #ef4444; }
.board-card.crusader { background: linear-gradient(to bottom, #1e3a8a, #172554); border-color: #3b82f6; }
.card-board-art { font-size: 2.5rem; margin-bottom: 5px; }
.card-board-stats {
    background: rgba(0,0,0,0.5);
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 0.9rem;
    font-weight: 800;
}

/* Bojové Animace Karty */
.anim-attack-up {
    animation: strikeUp 0.5s ease;
}
.anim-attack-down {
    animation: strikeDown 0.5s ease;
}
@keyframes strikeUp { 
    0% { transform: translateY(0); } 
    50% { transform: translateY(-30px) scale(1.1); z-index: 10; border-color: white; } 
    100% { transform: translateY(0); } 
}
@keyframes strikeDown { 
    0% { transform: translateY(0); } 
    50% { transform: translateY(30px) scale(1.1); z-index: 10; border-color: white; } 
    100% { transform: translateY(0); } 
}


/* Footer a Ruka */
#bottom-hud {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}
#resources-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.resource-title { color: #94a3b8; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.resource-points { font-size: 3rem; font-weight: 800; color: #fbbf24; text-shadow: 0 0 15px rgba(251,191,36,0.3); margin-bottom: 10px; line-height: 1; }
#btn-learn {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}
#btn-learn:hover { background: #059669; transform: translateY(-2px); }

#player-hand {
    display: flex;
    gap: 20px;
}
.card-hand {
    width: 120px;
    height: 170px;
    background: linear-gradient(145deg, #334155, #1e293b);
    border: 2px solid #64748b;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
}
.card-hand:hover {
    transform: translateY(-10px);
    border-color: #94a3b8;
}
.card-hand.active {
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(251,191,36,0.5);
    transform: translateY(-15px) scale(1.05);
}
.card-art { font-size: 3rem; margin: 10px 0; }
.card-title { font-weight: 800; font-size: 1rem; color: #e2e8f0; }
.card-stats { font-size: 0.85rem; background: rgba(0,0,0,0.3); padding: 4px 8px; border-radius: 8px; margin: 5px 0; }
.card-cost { font-size: 0.85rem; color: #fbbf24; font-weight: 800; margin-top: auto; }
