/* ===== PARTICULES DE TOUR ===== */
#turnParticleEffect {
    width: 180px;
    height: 180px;
    pointer-events: none;
    z-index: 2000;
}
.turn-particle {
    will-change: transform, opacity;
    box-shadow: 0 0 16px 4px #FFD70099;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
}

/* ========= ÉCRAN D'ACCUEIL ========= */
#welcomeScreen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a1929 0%, #1a3b7a 50%, #2d5aa8 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#welcomeScreen.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.welcome-container {
    width: 90%;
    max-width: 800px;
    padding: 40px 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #FFD700;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
}

.welcome-title {
    font-size: 48px;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 4px 8px black;
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 4px 8px black; }
    50% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 4px 8px black; }
}

.welcome-subtitle {
    font-size: 20px;
    color: #a0c8ff;
    margin-bottom: 30px;
    font-style: italic;
}

.welcome-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 30px 0;
    text-align: left;
}

@media (min-width: 768px) {
    .welcome-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

.welcome-section {
    background: rgba(26, 59, 122, 0.4);
    border: 2px solid #4a90e2;
    border-radius: 12px;
    padding: 20px;
}

.welcome-section:last-child {
    grid-column: 1 / -1;
}

.welcome-section h2 {
    font-size: 20px;
    color: #FFD700;
    margin-bottom: 15px;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 8px;
}

.welcome-section p {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.6;
}

.welcome-section strong {
    color: #a0c8ff;
}

.tech-list,
.features-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.tech-list li,
.features-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 15px;
    line-height: 1.5;
}

.tech-list li::before {
    content: "⚡";
    position: absolute;
    left: 0;
    color: #FFD700;
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

.play-button {
    margin-top: 30px;
    padding: 18px 50px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
    border: 3px solid #FFD700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.play-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.6);
    background: linear-gradient(135deg, #fbbf24 0%, #ef4444 100%);
}

.play-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
}

@media (max-width: 768px) {
    .welcome-container {
        padding: 25px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .welcome-title {
        font-size: 36px;
    }
    
    .welcome-subtitle {
        font-size: 16px;
    }
    
    .welcome-section h2 {
        font-size: 18px;
    }
    
    .welcome-section p,
    .tech-list li,
    .features-list li {
        font-size: 14px;
    }
    
    .play-button {
        font-size: 20px;
        padding: 15px 40px;
    }
}

/* Safe area pour iOS */
body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ========= AFFICHAGE NOM DE ZONE ========= */
#zoneName {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 40, 0.95) 100%);
    color: #FFD700;
    padding: 20px 50px;
    border-radius: 15px;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    z-index: 9999;
    border: 3px solid #FFD700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 2px 4px black;
    transition: all 0.5s ease;
}

#zoneName.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    #zoneName {
        font-size: 24px;
        padding: 15px 30px;
        top: 60px;
    }
}

/* ========= CANVAS ========= */
canvas#renderCanvas {
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height pour mobile */
    display: block;
    touch-action: none;
}

#instructions {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.8;
    z-index: 1000;
    pointer-events: none;
}
#instructions strong { color: #FFD700; }

/* Masquer les instructions sur mobile */
@media (max-width: 768px), (pointer: coarse) {
    #instructions {
        display: none;
    }
}

/* ========= OVERLAY / BLUR POUR MENUS (PAS POUR COMBAT) ========= */
#menuOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 900;
}
#menuOverlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ========= FENÊTRES DE MENU ========= */
.menu-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 420px;
    max-width: 90%;
    background: radial-gradient(circle at top, #1a3b7a, #051024);
    border: 3px solid #FFD700;
    border-radius: 18px;
    padding: 18px 20px;
    color: white;
    box-shadow: 0 10px 26px rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}
.menu-window.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.menu-title {
    font-size: 24px;
    color: #FFD700;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 4px black;
}
.menu-subtitle {
    font-size: 13px;
    text-align: center;
    color: #d0d8ff;
    margin-bottom: 10px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.menu-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #1b4d9a, #153a74);
    color: white;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}
.menu-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.6);
    background: linear-gradient(90deg, #2464c4, #184386);
}
.menu-btn.selected {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255,215,0,0.6);
    background: linear-gradient(90deg, #2975d4, #1d5c99);
    border: 2px solid rgba(255,215,0,0.7);
}

.menu-btn.danger {
    background: linear-gradient(90deg, #8d1c1c, #5c1010);
}
.menu-btn.danger:hover {
    background: linear-gradient(90deg, #b12525, #6d1515);
}
.menu-btn.danger.selected {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255,215,0,0.6);
    background: linear-gradient(90deg, #c73030, #8d1c1c);
    border: 2px solid rgba(255,215,0,0.7);
}

/* ========= INVENTAIRE ========= */
#inventoryMenu {
    width: 600px;
    max-width: 95%;
}
#inventoryGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 8px;
}
.inv-item {
    background: rgba(15, 40, 90, 0.95);
    border-radius: 12px;
    padding: 8px 6px;
    text-align: center;
    border: 2px solid rgba(0,255,255,0.4);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5);
}
.inv-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    border-color: rgba(255,255,0,0.8);
}
.inv-item.selected {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 14px rgba(255,215,0,0.6);
    border-color: rgba(255,215,0,0.9);
    background: rgba(30, 60, 120, 0.95);
}
.inv-icon {
    font-size: 24px;
    margin-bottom: 2px;
}
.inv-name {
    font-size: 12px;
}
.inv-count {
    font-size: 13px;
    color: #ffe780;
}

#inventoryDetail {
    margin-top: 6px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.1);
    display: none;
}
#inventoryDetail.show {
    display: block;
}
#inventoryDetailTitle {
    font-size: 16px;
    color: #FFD700;
    margin-bottom: 4px;
}
#inventoryDetailDesc {
    font-size: 13px;
    margin-bottom: 6px;
}
.detail-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.detail-btn {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #1b4d9a;
    color: white;
}
.detail-btn.secondary {
    background: #555;
}

.menu-footer {
    margin-top: 8px;
    text-align: right;
    font-size: 12px;
    color: #aeb8ff;
}

/* ========= ÉQUIPE ========= */
#teamMenu {
    width: 520px;
    max-width: 95%;
}
#teamList {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.team-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(10, 35, 80, 0.95);
    border: 2px solid rgba(255,215,0,0.4);
    box-shadow: 0 3px 7px rgba(0,0,0,0.6);
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
    cursor: pointer;
}
.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    border-color: rgba(255,255,0,0.8);
}
.team-card.selected {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(255,215,0,0.6);
    border-color: rgba(255,215,0,0.9);
    background: rgba(20, 50, 100, 0.95);
}
.team-icon {
    font-size: 28px;
}
.team-main {
    flex: 1;
}
.team-name {
    font-size: 15px;
}
.team-level {
    font-size: 12px;
    color: #d0d8ff;
}
.team-hpbar-wrap {
    margin-top: 4px;
    background: #222;
    border-radius: 6px;
    overflow: hidden;
    height: 8px;
}
.team-hpbar {
    height: 100%;
    background: linear-gradient(90deg, #28c728, #8be628);
}
.team-extra {
    font-size: 12px;
    text-align: right;
    color: #ffdede;
}

/* ========= DIALOGUE ========= */
#dialogBox {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    background: rgba(0,0,0,0.9);
    border-radius: 12px;
    border: 2px solid white;
    color: white;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: 0 6px 15px rgba(0,0,0,0.7);
    display: none;
    z-index: 1200;
}
#dialogBox.show {
    display: block;
}

/* ========= PETIT HUD ========= */
#hudSpeed {
    position: fixed;
    right: 15px;
    bottom: 15px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    z-index: 1100;
}
#hudSpeed span {
    font-weight: bold;
}

/* Masquer HUD vitesse sur mobile (les boutons montrent déjà l'état) */
@media (max-width: 768px), (pointer: coarse) {
    #hudSpeed {
        display: none;
    }
}

/* ========= UI COMBAT STYLE POKÉMON (DA menu appliquée) ========= */

/* Top : infos des deux combattants */
#combatTopUI {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 900px;
    display: none;
    justify-content: space-between;
    z-index: 950;
    pointer-events: none;
}
.combat-mon-card {
    background: radial-gradient(circle at top, #1a3b7a, #051024);
    border: 3px solid #FFD700;
    border-radius: 14px;
    padding: 8px 12px;
    min-width: 36%;
    box-shadow: 0 6px 16px rgba(0,0,0,0.7);
    font-size: 13px;
    color: #ffffff;
}
.combat-mon-name {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
    text-shadow: 0 0 4px #000;
}
.combat-mon-hpbar-wrap {
    margin-top: 4px;
    background: #111;
    border-radius: 6px;
    overflow: hidden;
    height: 8px;
}
.combat-mon-hpbar {
    height: 100%;
    background: linear-gradient(90deg,#28c728,#8be628);
}
.combat-mon-hp-text {
    font-size: 12px;
    margin-top: 4px;
    color: #d0d8ff;
}

/* ===== CONTAINERS MODÈLES 3D COMBAT ===== */
#combatModelsContainer {
    position: fixed;
    inset: 0;
    z-index: 900;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
}

.combat-model-container {
    width: 300px;
    height: 300px;
    pointer-events: none;
    position: relative;
}

.combat-model-container.left {
    animation: slideInLeft 0.5s ease-out;
}

.combat-model-container.right {
    animation: slideInRight 0.5s ease-out;
}

.combat-model-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive pour mobiles */
@media (max-width: 768px), (pointer: coarse) {
    #combatModelsContainer {
        padding: 0 5%;
    }
    
    .combat-model-container {
        width: 180px;
        height: 180px;
    }
}

/* Bas : panneau façon menu, mais pour le combat */
#combatUI {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 90%;
    max-width: 900px;
    height: 190px;
    background: linear-gradient(180deg, rgba(20, 42, 90, 0.98) 0%, rgba(5, 11, 24, 0.99) 100%);
    border-top: 3px solid #FFD700;
    border-left: 3px solid #FFD700;
    border-right: 3px solid #FFD700;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.8);
    display: none;
    z-index: 950;
    font-size: 14px;
    color: #ffffff;
}

/* Interface combat compacte sur mobile */
@media (max-width: 768px), (pointer: coarse) {
    #combatUI {
        height: 130px;
        width: 95%;
        font-size: 12px;
    }
    #combatTopUI {
        width: 95%;
        top: 5px;
    }
    .combat-mon-card {
        padding: 4px 8px;
        min-width: 42%;
    }
    .combat-mon-name {
        font-size: 12px !important;
    }
    .combat-mon-hp-text {
        font-size: 10px;
    }
    #combatQuestionBox {
        padding: 4px 8px;
    }
    #combatChoices {
        padding: 4px 6px;
        gap: 4px;
    }
    .combat-choice-btn {
        padding: 4px 6px;
        font-size: 12px;
    }
    #combatLogBox {
        padding: 4px 6px;
        font-size: 11px;
    }
    #combatAttackList {
        gap: 4px;
        padding: 4px 6px;
    }
    .combat-attack-btn {
        padding: 4px 6px;
        font-size: 11px;
    }
}
#combatInner {
    display: grid;
    grid-template-columns: 2fr 2fr;
    grid-template-rows: auto 1fr;
    height: 100%;
}
#combatQuestionBox {
    grid-column: 1 / 3;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding: 6px 10px;
    background: rgba(0,0,0,0.6);
}
#combatQuestionText {
    font-weight: bold;
    color: #ffe780;
}

#combatChoices {
    border-right: 2px solid rgba(255,255,255,0.1);
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    background: rgba(5, 15, 30, 0.8);
}
#combatChoiceRun {
    grid-column: 1 / 3; /* Prend les 2 colonnes */
}
.combat-choice-btn {
    border-radius: 10px;
    border: 2px solid rgba(0,255,255,0.4);
    background: linear-gradient(90deg, #1b4d9a, #153a74);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    padding: 6px 8px;
    color: #ffffff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.6);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.combat-choice-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    border-color: rgba(255,255,0,0.9);
    background: linear-gradient(90deg, #2464c4, #184386);
}
.combat-choice-btn.selected {
    background: linear-gradient(90deg, #2464c4, #184386);
    outline: 2px solid #FFD700;
    box-shadow: 0 0 10px rgba(255,215,0,0.7);
}

#combatLogBox {
    padding: 6px 10px;
    background: rgba(5, 11, 24, 0.9);
    border-left: 2px solid rgba(0,255,255,0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
#combatLogText {
    white-space: pre-line;
    font-size: 13px;
    color: #d0d8ff;
}
#combatTurn {
    font-size: 12px;
    text-align: right;
    color: #ffe780;
}

/* Sous-menu attaques */
#combatAttackList {
    position: absolute;
    left: 0;
    top: 0;
    right: 50%;
    bottom: 0;
    padding: 8px 10px;
    background: rgba(20, 42, 90, 0.95);
    border-right: 2px solid rgba(255,255,255,0.15);
    display: none;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
}
.combat-attack-btn {
    border-radius: 10px;
    border: 2px solid rgba(0,255,255,0.4);
    background: linear-gradient(90deg, #1b4d9a, #153a74);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    padding: 6px 8px;
    color: #ffffff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.6);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.combat-attack-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    border-color: rgba(255,255,0,0.9);
    background: linear-gradient(90deg, #2464c4, #184386);
}
.combat-attack-btn.selected {
    background: linear-gradient(90deg, #2464c4, #184386);
    outline: 2px solid #FFD700;
    box-shadow: 0 0 10px rgba(255,215,0,0.7);
}
#combatAttackInfo {
    position: absolute;
    left: 50%;
    top: 32px;
    right: 0;
    bottom: 0;
    padding: 8px 10px;
    font-size: 12px;
    border-left: 2px solid rgba(255,255,255,0.2);
    background: rgba(5, 11, 24, 0.98);
    display: none;
    color: #d0d8ff;
    line-height: 1.6;
    overflow-y: auto;
}

/* ========= FADE NOIR ENTRE ZONES ========= */
#fadeOverlay {
    position: fixed;
    inset: 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 850; /* Sous les menus (900+) mais au-dessus de la 3D */
}
#fadeOverlay.show {
    opacity: 1;
}

/* ========= MENUS SAC ET ÉQUIPE EN COMBAT ========= */
#combatBagList, #combatTeamList {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    max-width: 95%;
    max-height: 80%;
    background: rgba(5, 20, 45, 0.98);
    padding: 20px;
    border-radius: 16px;
    border: 3px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

/* Backdrop sombre derrière le menu */
#combatBagList::before, #combatTeamList::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

#combatBagList h3, #combatTeamList h3 {
    font-size: 22px;
    color: #FFD700;
    text-align: center;
    margin: 0 0 15px 0;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

#combatBagItems {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

#combatTeamMembers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.combat-bag-item-btn {
    border-radius: 12px;
    border: 2px solid rgba(0,255,255,0.4);
    background: rgba(15, 40, 90, 0.95);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    padding: 8px 6px;
    color: #ffffff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5);
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.combat-team-member-btn {
    border-radius: 8px;
    border: 2px solid rgba(100,150,255,0.4);
    background: linear-gradient(90deg, #1b4d9a, #153a74);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    padding: 10px 12px;
    color: #ffffff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.6);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}

.combat-bag-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    border-color: rgba(255,255,0,0.8);
}

.combat-team-member-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    border-color: rgba(255,255,0,0.9);
    background: linear-gradient(90deg, #2464c4, #184386);
}

.combat-bag-item-btn.selected {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 14px rgba(255,215,0,0.6);
    border-color: rgba(255,215,0,0.9);
    background: rgba(30, 60, 120, 0.95);
}

.combat-team-member-btn.selected {
    background: linear-gradient(90deg, #2464c4, #184386);
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255,215,0,0.6);
}

.combat-bag-item-btn:disabled, .combat-team-member-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(90deg, #444, #333);
}
