:root {
    --mk-gold: #f59e0b;
    --mk-red: #dc2626;
    --mk-blood: #7f1d1d;
    --mk-dark: #090a0f;
}
* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #07070a;
    color: #f8fafc;
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
}
.mk-title {
    font-family: 'Cinzel Decorative', serif;
    text-shadow: 0 0 16px rgba(220, 38, 38, 0.75);
}
.mk-banner {
    font-family: 'Cinzel Decorative', serif;
    text-shadow: 0 0 25px #ef4444, 0 0 8px #f59e0b;
}

/* Panneaux modernes : fins liserés et verre dépoli, sans bordures massives */
.stone-panel {
    background: rgba(14, 14, 18, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
}

/* Cartes de combattants : épurées et élégantes */
.stone-card {
    background: rgba(22, 22, 28, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.stone-card:hover {
    background: rgba(32, 32, 42, 0.75);
    border-color: rgba(245, 158, 11, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -2px rgba(245, 158, 11, 0.25);
}
.arcade-btn {
    transition: transform 0.08s ease, box-shadow 0.12s ease;
    touch-action: manipulation;
}
.arcade-btn:active, .arcade-btn.active-press {
    transform: scale(0.94) translateY(1px);
}
@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.7)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.85)); transform: scale(1.02); }
}
.finish-pulse {
    animation: pulseGlow 0.8s infinite ease-in-out;
}

/* ==================== CLEAN CHARACTER SELECT STYLING ==================== */
/* Loge du visage du monstre dans les cartes du Roster */
.dino-face-slot {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.stone-card:hover .dino-face-slot {
    transform: scale(1.12) translateY(-2px);
}
.stone-card.selected-p1 .dino-face-slot {
    filter: drop-shadow(0 4px 14px rgba(239, 68, 68, 0.75));
    animation: gentleBob 2.2s infinite ease-in-out;
}
.stone-card.selected-p2 .dino-face-slot {
    filter: drop-shadow(0 4px 14px rgba(59, 130, 246, 0.75));
    animation: gentleBob 2.2s infinite ease-in-out;
}

/* Cartes sélectionnées du Roster avec lueur intense et relief */
.stone-card.selected-p1 {
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.28) 0%, rgba(26, 12, 12, 0.85) 100%) !important;
    border-color: rgba(239, 68, 68, 0.95) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.65), inset 0 0 12px rgba(239, 68, 68, 0.3) !important;
    transform: translateY(-3px) scale(1.02);
}
.stone-card.selected-p2 {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.28) 0%, rgba(12, 20, 36, 0.85) 100%) !important;
    border-color: rgba(59, 130, 246, 0.95) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.65), inset 0 0 12px rgba(59, 130, 246, 0.3) !important;
    transform: translateY(-3px) scale(1.02);
}
.stone-card.selected-p1.selected-p2 {
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.28) 0%, rgba(28, 20, 10, 0.85) 100%) !important;
    border-color: rgba(245, 158, 11, 0.95) !important;
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.7), inset 0 0 12px rgba(245, 158, 11, 0.35) !important;
}

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

/* Styles des cooldowns et verrouillage Rage */
.btn-on-cooldown {
    opacity: 0.65 !important;
    filter: brightness(0.7) contrast(0.9) !important;
    cursor: wait !important;
    pointer-events: none !important;
    transform: scale(0.96);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9) !important;
}
.btn-rage-locked {
    opacity: 0.45 !important;
    filter: grayscale(0.85) brightness(0.65) !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: #18181b !important;
}
@keyframes readyFlash {
    0% { transform: scale(1.1); filter: brightness(1.7); box-shadow: 0 0 20px #f59e0b; }
    100% { transform: scale(1); filter: brightness(1); }
}
.cooldown-ready-flash {
    animation: readyFlash 0.35s ease-out;
}

/* Gamepad Controller Focus & Navigation */
.gamepad-focused {
    outline: 2px solid #f59e0b !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.85), inset 0 0 10px rgba(245, 158, 11, 0.35) !important;
    border-color: #f59e0b !important;
    transform: scale(1.025) !important;
    transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.12s ease, outline 0.12s ease !important;
    z-index: 30 !important;
}

/* Controller Helper HUD bar */
.gp-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.28rem;
    border-radius: 0.375rem;
    background: linear-gradient(180deg, #27272a, #09090b);
    border: 1px solid rgba(245, 158, 11, 0.6);
    color: #fef08a;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.gp-key-action {
    background: linear-gradient(180deg, #dc2626, #7f1d1d);
    border-color: #f87171;
    color: #fff;
}
.gp-key-gold {
    background: linear-gradient(180deg, #d97706, #78350f);
    border-color: #fde047;
    color: #fff;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

