/* Question Panel Component */
.asc-question-panel {
    background-color: var(--game-bg-dark);
    border-radius: var(--ui-border-radius);
    border: 1px solid var(--game-border);
}

.asc-question-panel__text {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
}

.asc-question-panel__answers {
    margin-top: 1rem;
}

/* Player Status Component */
.asc-player-status {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--ui-border-radius);
    gap: 0.5rem;
}

.asc-player-status__name {
    color: var(--text-primary);
    font-weight: bold;
    text-align: center;
}

.asc-player-status__character {
    display: flex;
    justify-content: center;
    height: 120px;
}

.asc-player-status__info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.asc-player-status__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.asc-player-status__label {
    color: var(--text-secondary);
    width: 30px;
}

.asc-player-status__bar {
    flex-grow: 1;
    height: 8px;
    border-radius: 4px;
}

.asc-player-status__value {
    color: var(--text-secondary);
    width: 60px;
    text-align: right;
}

.asc-player-status__mana {
    display: flex;
    gap: 5px;
}

.asc-player-status__mana-pip {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .asc-player-status__mana-pip.filled {
        background-color: var(--game-primary);
        box-shadow: 0 0 5px var(--game-primary);
    }

/* Battle Arena Component */
.asc-battle-arena {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: var(--game-bg-medium);
    border-radius: var(--ui-border-radius);
    overflow: hidden;
}

.asc-battle-arena__environment {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}

.asc-battle-arena__player-platform,
.asc-battle-arena__enemy-platform {
    position: absolute;
    bottom: 20px;
    width: 100px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.3);
}

.asc-battle-arena__player-platform {
    left: 20%;
}

.asc-battle-arena__enemy-platform {
    right: 20%;
}

.asc-battle-arena__player,
.asc-battle-arena__enemy {
    position: absolute;
    bottom: 40px;
    width: 80px;
    height: 120px;
}

.asc-battle-arena__player {
    left: 20%;
    transform: translateX(-50%);
}

.asc-battle-arena__enemy {
    right: 20%;
    transform: translateX(50%);
}

/* MODERN COMBAT CHARACTER POSITIONING - Grid-based centering for tutorial/combat pages */
.asc-player-character,
.asc-enemy-character {
    position: absolute !important;
    bottom: 100px !important;
    z-index: 2 !important;
    display: grid !important;
    grid-template-rows: auto auto !important;
    justify-items: center !important;
    align-items: start !important;
    gap: 20px !important;
    width: auto !important;
    height: auto !important;
}

.asc-player-character {
    left: 30% !important;
    transform: translateX(-50%) !important;
}

.asc-enemy-character {
    left: 70% !important;
    transform: translateX(-50%) !important;
}

    /* Character status boxes - ensure they're centered in the grid */
    .asc-player-character .asc-character-status,
    .asc-enemy-character .asc-character-status {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 !important;
        grid-row: 1 !important;
        justify-self: center !important;
        align-self: start !important;
        width: 200px !important;
        background: var(--bg-card-dark-translucent, rgba(0, 0, 0, 0.6)) !important;
        border-radius: var(--radius-md, 8px) !important;
        padding: 0.75rem !important;
        box-shadow: var(--shadow-subtle, 0 2px 4px rgba(0, 0, 0, 0.1)) !important;
    }

    /* Character sprite containers - ensure they're centered in the grid */
    .asc-player-character .asc-character-sprite-container,
    .asc-enemy-character .asc-enemy-sprite-container {
        grid-row: 2 !important;
        justify-self: center !important;
        align-self: start !important;
        position: relative !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

.asc-battle-arena__damage-text {
    position: absolute;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--damage-color);
    animation: damage-float 1s ease-out;
    transform: translateX(-50%);
}

.asc-battle-arena__heal-text {
    position: absolute;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--heal-color);
    animation: heal-float 1s ease-out;
    transform: translateX(-50%);
}

.asc-battle-arena__status {
    position: absolute;
    bottom: 20px;
    width: 170px;
    background-color: rgba(0,0,0,0.6);
    border-radius: var(--ui-border-radius);
    padding: 8px;
}

.asc-battle-arena__status--player {
    left: 20px;
}

.asc-battle-arena__status--enemy {
    right: 20px;
}

.asc-battle-arena__status-name {
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.asc-battle-arena__status-bar {
    height: 8px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
    margin-bottom: 5px;
}

.asc-battle-arena__status-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.asc-battle-arena__status-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

.asc-battle-arena__mana {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    justify-content: center;
}

.asc-battle-arena__mana-pip {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .asc-battle-arena__mana-pip.filled {
        background-color: var(--game-primary);
        box-shadow: 0 0 5px var(--game-primary);
    }

.asc-battle-arena__attack-counter {
    margin-top: 5px;
}

.asc-battle-arena__counter-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
}

.asc-battle-arena__counter-pips {
    display: flex;
    gap: 3px;
    margin-top: 3px;
    justify-content: center;
}

.asc-battle-arena__counter-pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
}

    .asc-battle-arena__counter-pip.active {
        background-color: var(--game-danger);
    }

.asc-battle-arena__animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-interface);
}

.asc-battle-arena__skill-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background-color: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 40px rgba(59, 130, 246, 0.5);
    animation: pulse 0.8s ease-in-out;
}

/* Combat Container Component */
.asc-combat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    height: 100%;
}

    .asc-combat-container.animating {
        position: relative;
    }

.asc-combat-container__arena {
    flex: 1;
    min-height: 400px;
    position: relative;
}

.asc-combat-container__interface {
    padding: 1rem;
}

/* Animations */
@keyframes damage-float {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(-50%);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-30px) translateX(-50%);
    }
}

@keyframes heal-float {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(-50%);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-30px) translateX(-50%);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.anim-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* SPECIFIC FIX - Reset all positioning on character status boxes */
.asc-battle-arena .asc-enemy-character .asc-character-status,
.asc-battle-arena .asc-player-character .asc-character-status {
    position: static !important;
    left: unset !important;
    right: unset !important;
    top: unset !important;
    bottom: unset !important;
    transform: none !important;
    margin: 0 !important;
    float: none !important;
    display: block !important;
    width: 200px !important;
    grid-row: 1 !important;
    justify-self: center !important;
    align-self: start !important;
}

/* Force sprite containers to be in the second grid row */
.asc-battle-arena .asc-enemy-character .asc-enemy-sprite-container,
.asc-battle-arena .asc-player-character .asc-character-sprite-container {
    grid-row: 2 !important;
    justify-self: center !important;
    align-self: start !important;
}
