﻿/* Enhanced Combat Styles - created specifically for Ascend */

:root {
    /* Health Bar Colors */
    --health-bar-fill: linear-gradient(90deg, #ef4444, #dc2626);
    --health-bar-bg: rgba(0, 0, 0, 0.3);
    /* Mana System Colors */
    --mana-fill: linear-gradient(90deg, #3b82f6, #2563eb);
    --mana-border: rgba(59, 130, 246, 0.5);
    --mana-glow: rgba(59, 130, 246, 0.8);
    /* Enemy Attack Colors */
    --enemy-attack-border: rgba(239, 68, 68, 0.5);
    --enemy-attack-fill: #ef4444;
    --enemy-attack-glow: rgba(239, 68, 68, 0.8);
    /* ASSIGNMENT UI STANDARDS - Added for ticket requirements */
    /* Standardized percentage circle sizing */
    --assignment-progress-size: 64px;
    --assignment-progress-stroke: 6px;
    --assignment-progress-font: 0.75rem;
    /* Assignment title text contrast improvement */
    --assignment-title-color: #1f2937; /* Darker color for better readability */
    --assignment-title-color-light: #eff3fa; /* Alternative for light backgrounds */
    /* Assignment card styling */
    --assignment-card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --assignment-card-shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.asc-combat-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-primary-dark));
    color: var(--text-primary);
    position: relative;
}

.asc-combat-container--expanded {
    overflow: hidden;
}

/* Loading Animation */
.asc-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    gap: 2rem;
}

.asc-loading-animation {
    position: relative;
    width: 100px;
    height: 100px;
}

.asc-loading-orb {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 20px;
    left: 20px;
    background: radial-gradient(circle, var(--primary-blue-translucent), var(--primary-blue-dark-translucent));
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-blue);
    animation: pulsate 1.5s ease-in-out infinite;
}

.asc-loading-text {
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-shadow: var(--shadow-text-subtle);
}

/* Combat Header */
.asc-combat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card-translucent);
    border-bottom: 1px solid var(--glass-border);
    z-index: 5;
}

.asc-location-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card-dark-translucent);
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: bold;
}

.asc-enemy-progress-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-blue-translucent);
    border: 1px solid var(--primary-blue);
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.asc-exit-button {
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

/* Tutorial Progress */
.asc-tutorial-progress {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.asc-progress-step {
    width: 20px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.asc-progress-step--completed {
    background-color: var(--primary-blue);
}

/* Battle Arena */
.asc-battle-arena {
    position: relative;
    flex: 1;
    min-height: 500px;
    margin: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card-dark);
    box-shadow: var(--shadow-card);
}

.asc-battle-environment {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.asc-environment-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--bg-card-dark), var(--bg-card));
    opacity: 0.7;
}

.asc-player-platform, .asc-enemy-platform {
    position: absolute;
    height: 20px;
    width: 120px;
    background: var(--bg-dark-translucent);
    border-radius: 50%;
    box-shadow: var(--shadow-ground);
}

.asc-player-platform {
    bottom: 80px;
    left: 30%;
    transform: translateX(-50%) perspective(300px) rotateX(60deg);
}

.asc-enemy-platform {
    bottom: 80px;
    left: 70%;
    transform: translateX(-50%) perspective(300px) rotateX(60deg);
}

/* Character Styling - Grid Layout for Perfect Centering */
.asc-player-character, .asc-enemy-character {
    position: absolute;
    bottom: 100px;
    z-index: 2;
    display: grid;
    grid-template-rows: auto auto;
    justify-items: center;
    gap: 20px;
}

.asc-player-character {
    left: 30%;
    transform: translateX(-50%);
}

.asc-enemy-character {
    left: 70%;
    transform: translateX(-50%);
}

.asc-character-status {
    width: 200px;
    background: var(--bg-card-dark-translucent);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    box-shadow: var(--shadow-subtle);
}

/* Ensure status boxes don't have any positioning interference */
.asc-player-character .asc-character-status,
.asc-enemy-character .asc-character-status {
    position: relative !important;
    margin: 0;
    transform: none;
}

.asc-character-name {
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.asc-health-bar-container {
    margin-bottom: 0.75rem;
}

.asc-health-bar {
    height: 12px;
    background: var(--bg-dark);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.asc-health-bar-fill {
    height: 100%;
    background: var(--health-bar-fill);
    transition: width 0.3s ease;
}

.asc-health-text {
    font-size: 0.85rem;
    text-align: right;
    margin-top: 0.25rem;
    color: var(--text-secondary);
}

.asc-mana-pips {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.asc-mana-pip {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1px solid var(--mana-border);
}

.asc-mana-pip--filled {
    background: var(--mana-fill);
    box-shadow: 0 0 5px var(--mana-glow);
}

.asc-attack-meter {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.asc-attack-pip {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1px solid var(--enemy-attack-border);
}

.asc-attack-pip--active {
    background: var(--enemy-attack-fill);
    box-shadow: 0 0 5px var(--enemy-attack-glow);
}

.asc-character-sprite-container, .asc-enemy-sprite-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ASSIGNMENT COMBAT ENEMY POSITIONING - IMPROVED WITH DROP SHADOW */
.asc-tutorial-enemy-character {
    position: absolute;
    bottom: 140px; /* Moved up from 100px to 140px for better horizontal alignment */
    left: 70%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    /* TICKET REQUIREMENT: Add drop shadow for enemy in assignment combat */
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.asc-tutorial-enemy-sprite-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Additional shadow for sprite container for better depth */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.asc-tutorial-enemy-status {
    position: absolute;
    bottom: 240px; /* Aligned to match player status height - was 380px */
    left: 70%;
    transform: translateX(-50%);
    z-index: 3;
    width: 200px;
    background: var(--bg-card-dark-translucent, rgba(0, 0, 0, 0.7));
    border-radius: var(--radius-md, 8px);
    padding: 0.75rem;
    box-shadow: var(--shadow-subtle, 0 2px 4px rgba(0, 0, 0, 0.2));
}

.asc-tutorial-enemy-status-name {
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-align: center;
}

/* Battle Effects */
.asc-battle-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.asc-battle-effects--active {
    opacity: 1;
}

.asc-battle-effects__attack {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: url('/_content/Ascend.Shared.UI/images/effects/attack-effect.png') no-repeat center center;
    background-size: contain;
    animation: attackAnimation 0.6s steps(8) forwards;
}

.asc-battle-effects__skill {
    position: absolute;
    top: 40%;
    right: 30%;
    width: 250px;
    height: 250px;
    background: url('/_content/Ascend.Shared.UI/images/effects/skill-effect.png') no-repeat center center;
    background-size: contain;
    animation: skillAnimation 0.8s steps(10) forwards;
}

.asc-battle-effects__enemy-attack {
    position: absolute;
    top: 40%;
    left: 30%;
    width: 220px;
    height: 220px;
    background: url('/_content/Ascend.Shared.UI/images/effects/enemy-attack-effect.png') no-repeat center center;
    background-size: contain;
    animation: enemyAttackAnimation 0.6s steps(8) forwards;
}

.asc-battle-effects__heal {
    position: absolute;
    top: 40%;
    left: 20%;
    width: 180px;
    height: 180px;
    background: url('/_content/Ascend.Shared.UI/images/effects/heal-effect.png') no-repeat center center;
    background-size: contain;
    animation: healAnimation 0.8s steps(10) forwards;
}

.asc-battle-effects__victory {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2), transparent 70%);
    animation: victoryAnimation 2s ease forwards;
}

/* Battle Message */
.asc-battle-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card-translucent);
    border-radius: var(--radius-md);
    margin: 0.5rem 1rem;
    color: var(--text-primary);
}

.asc-battle-message--error {
    background: var(--error-bg-translucent);
    color: var(--error-text);
}

.asc-battle-message--loading {
    background: var(--primary-blue-translucent);
    color: var(--primary-blue-light);
    animation: gentle-pulse 2s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Command Interface */
.asc-command-interface {
    position: relative;
    padding: 1rem;
    margin: 0.5rem 1rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-card-translucent);
    border: 1px solid var(--glass-border);
}

.asc-command-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.asc-command-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
}

    .asc-command-button:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
    }

.asc-command-button--attack {
    background: var(--attack-button-bg);
}

.asc-command-button--skill {
    background: var(--skill-button-bg);
}

.asc-command-button--item {
    background: var(--item-button-bg);
}

.asc-command-button--run {
    background: var(--run-button-bg);
}

.asc-command-button--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

    .asc-command-button--disabled:hover {
        transform: none;
        box-shadow: none;
    }

.asc-command-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    margin-bottom: 0.25rem;
}

/* Question Panel */
.asc-question-panel {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-inner);
}

.asc-question-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.asc-question-text {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.asc-answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.asc-answer-options--yes-no {
    grid-template-columns: 1fr 1fr;
    max-width: 400px;
    margin: 0 auto;
}

.asc-answer-button {
    padding: 0.75rem 1rem;
    background: var(--bg-button, var(--bg-card));
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.3); /* Changed from blue border to white/transparent */
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1rem;
}

    .asc-answer-button:hover {
        background: var(--bg-button-hover, var(--bg-card-hover));
        border-color: rgba(255, 255, 255, 0.6); /* Stronger white border on hover */
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .asc-answer-button:focus {
        outline: none;
        border-color: var(--warning-amber); /* Amber focus state for accessibility */
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
    }

    .asc-answer-button:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

/* Specific styling for Yes/No buttons */
.asc-answer-button--yes {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-green);
    border-color: var(--success-green);
}

    .asc-answer-button--yes:hover {
        background: rgba(16, 185, 129, 0.3);
        border-color: var(--success-green-light);
    }

.asc-answer-button--no {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error-red);
    border-color: var(--error-red);
}

    .asc-answer-button--no:hover {
        background: rgba(239, 68, 68, 0.3);
        border-color: var(--error-red-light);
    }

.asc-text-answer {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.asc-answer-input {
    flex: 1;
}

.asc-submit-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .asc-submit-button:hover {
        background: var(--primary-blue-dark);
        transform: translateY(-2px);
    }

/* Skills & Items Panels - FIXED POSITIONING */
.asc-skills-panel, .asc-items-panel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    z-index: 1;
    padding: 1rem;
    animation: slideUp 0.3s ease forwards;
}

.asc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

    .asc-panel-header h3 {
        margin: 0;
        font-size: 1.25rem;
        color: var(--text-primary);
    }

.asc-close-panel {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

    .asc-close-panel:hover {
        background: var(--bg-hover);
    }

.asc-skills-grid, .asc-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.5rem;
}

.asc-skill-card, .asc-item-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card-dark);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .asc-skill-card:hover, .asc-item-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
    }

.asc-skill-card--disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

    .asc-skill-card--disabled:hover {
        transform: none;
        box-shadow: none;
    }

.asc-skill-icon, .asc-item-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.asc-skill-info, .asc-item-info {
    flex: 1;
}

.asc-skill-name, .asc-item-name {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.asc-skill-description, .asc-item-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.asc-skill-cost, .asc-item-quantity {
    font-size: 0.875rem;
    color: var(--text-accent);
}

.asc-no-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Narrative Dialog */
.asc-narrative-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 2rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 1rem;
    margin: 1rem;
    animation: fadeIn 0.5s ease;
}

.asc-narrative-character {
    flex: 1;
    display: flex;
    justify-content: center;
}

.asc-narrative-dialog {
    flex: 2;
    background: var(--bg-card-dark-translucent);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
}

.asc-dialog-content {
    margin-bottom: 2rem;
}

.asc-speaker-name {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.asc-dialog-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.asc-dialog-next {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

/* In-Combat Dialogue System */
.asc-in-combat-dialogue {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 2px solid #475569;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 150;
    animation: slideInFromBottom 0.5s ease-out;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.asc-in-combat-dialogue-character {
    flex-shrink: 0;
}

.asc-in-combat-dialogue-content {
    flex: 1;
    color: #e2e8f0;
}

.asc-in-combat-dialogue-speaker {
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.asc-in-combat-dialogue-text {
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.asc-in-combat-dialogue-continue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
    display: block;
}

    .asc-in-combat-dialogue-continue:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

/* ========== ASSIGNMENT UI IMPROVEMENTS ========== */

/* TICKET REQUIREMENT: Standardized assignment percentage circles */
.asc-assignment-card__progress-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--assignment-progress-size);
    height: var(--assignment-progress-size);
}

    /* Enforce consistent sizing across all assignment progress circles */
    .asc-assignment-card__progress-container .mud-progress-circular,
    .asc-assignment-card__progress-container .mud-progress-circular svg {
        width: var(--assignment-progress-size) !important;
        height: var(--assignment-progress-size) !important;
    }

        .asc-assignment-card__progress-container .mud-progress-circular circle {
            stroke-width: var(--assignment-progress-stroke) !important;
        }

.asc-assignment-card__score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: var(--assignment-progress-font);
    pointer-events: none;
    color: var(--text-primary);
}

.asc-assignment-card__perfect-score {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--assignment-progress-size);
    height: var(--assignment-progress-size);
}

/* TICKET REQUIREMENT: Assignment card improvements */
.asc-assignment-card {
    box-shadow: var(--assignment-card-shadow);
    transition: all 0.2s ease;
}

    .asc-assignment-card:hover {
        box-shadow: var(--assignment-card-shadow-hover);
        transform: translateY(-2px);
    }

/* TICKET REQUIREMENT: Class name display for assignment cards */
.asc-assignment-card__class-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* TICKET REQUIREMENT: Assignment title text contrast improvement */
.asc-assignment-card .mud-card-header .mud-typography-h6,
.asc-assignment-title {
    color: var(--assignment-title-color-light) !important;
    font-weight: 600 !important;
}

/* For light theme compatibility */
@media (prefers-color-scheme: light) {
    .asc-assignment-card .mud-card-header .mud-typography-h6,
    .asc-assignment-title {
        color: var(--assignment-title-color-light) !important;
    }
}

/* Assignment status indicators */
.asc-assignment-card--pending {
    border-left: 4px solid var(--warning-amber);
}

.asc-assignment-card--overdue {
    border-left: 4px solid var(--error-red);
    background: rgba(239, 68, 68, 0.05);
}

.asc-assignment-card--completed {
    border-left: 4px solid var(--success-green);
    background: rgba(16, 185, 129, 0.05);
}

/* Assignment summary styling */
.asc-assignments-panel__summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-card-dark);
    border-radius: var(--radius-md);
}

.asc-assignments-panel__summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.asc-assignments-panel__summary-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.asc-assignments-panel__summary-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Assignment due date styling */
.asc-assignment-card__due-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.asc-assignment-card__overdue-text {
    color: var(--error-red) !important;
    font-weight: bold;
}

.asc-assignment-card__completed-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Assignment score display improvements */
.asc-assignment-card__score-display {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* No assignments state styling */
.asc-assignments-panel__no-assignments {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.asc-assignments-panel__no-assignments-icon {
    font-size: 3rem !important;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.asc-assignments-panel__no-assignments-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Animations */
@keyframes pulsate {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@keyframes attackAnimation {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes skillAnimation {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

@keyframes enemyAttackAnimation {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes healAnimation {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes victoryAnimation {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .asc-command-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .asc-narrative-container {
        flex-direction: column;
        gap: 1rem;
    }

    .asc-narrative-character, .asc-narrative-dialog {
        width: 100%;
    }

    .asc-in-combat-dialogue {
        bottom: 60px;
        max-width: 95%;
        padding: 1rem;
        font-size: 0.9rem;
    }

    .asc-in-combat-dialogue-character {
        display: none;
    }

    /* Assignment summary responsive */
    .asc-assignments-panel__summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Assignment progress size adjustments for mobile */
    :root {
        --assignment-progress-size: 56px;
        --assignment-progress-stroke: 5px;
        --assignment-progress-font: 0.7rem;
    }
}

@media (max-width: 480px) {
    .asc-command-grid {
        grid-template-columns: 1fr;
    }

    .asc-skills-grid, .asc-items-grid {
        grid-template-columns: 1fr;
    }

    /* Single column layout for assignment summary on small screens */
    .asc-assignments-panel__summary {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .asc-assignments-panel__summary-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        background: var(--bg-card);
        border-radius: var(--radius-sm);
    }

    /* Further reduce progress circle size on very small screens */
    :root {
        --assignment-progress-size: 48px;
        --assignment-progress-stroke: 4px;
        --assignment-progress-font: 0.65rem;
    }
}

/* ========== ENHANCED RESULTS UI ========== */

.asc-results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.asc-results-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
}

/* Results Screen Wrapper - Centers the results container on screen */
.asc-results-screen-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
}

.asc-results-container {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card-hover);
    max-width: 800px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.6s ease;
    /* Remove centering styles since wrapper handles it */
    display: flex;
    flex-direction: column;
}

/* Results Header */
.asc-results-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--glass-border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.asc-results-character {
    flex-shrink: 0;
}

.asc-results-title {
    flex: 1;
}

.asc-victory-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--success-green);
    margin-bottom: 0.5rem;
}

.asc-victory-icon {
    font-size: 3rem !important;
    color: var(--warning-amber) !important;
}

.asc-victory-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.asc-defeat-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--error-red);
    margin-bottom: 0.5rem;
}

.asc-defeat-icon {
    font-size: 3rem !important;
    color: var(--error-red) !important;
}

.asc-defeat-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Results Content */
.asc-results-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.asc-results-section {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.asc-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

/* Performance Stats */
.asc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.asc-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .asc-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-card);
    }

.asc-stat-card--highlight {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.asc-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
}

.asc-stat-icon--success {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success-green);
    color: var(--success-green);
}

.asc-stat-icon--accuracy {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.asc-stat-icon--exp {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--warning-amber);
    color: var(--warning-amber);
}

.asc-stat-info {
    flex: 1;
}

.asc-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1.2;
}

.asc-exp-value {
    color: var(--warning-amber);
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.asc-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Rewards Section */
.asc-rewards-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.asc-reward-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: transform 0.2s ease;
}

    .asc-reward-card:hover {
        transform: translateX(4px);
    }

.asc-reward-card--empty {
    opacity: 0.6;
}

.asc-reward-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
}

.asc-reward-icon--exp {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--warning-amber);
    color: var(--warning-amber);
}

.asc-reward-icon--item {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.asc-reward-info {
    flex: 1;
}

.asc-reward-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1.2;
}

.asc-reward-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Progress Section */
.asc-progress-display {
    text-align: center;
}

.asc-progress-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.asc-progress-bar {
    width: 100%;
    height: 12px;
    background: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 1rem;
}

.asc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-dark));
    border-radius: var(--radius-pill);
    transition: width 0.8s ease;
}

.asc-progress-complete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--success-green);
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success-green);
    border-radius: var(--radius-pill);
    margin: 0 auto;
    width: fit-content;
}

/* Action Buttons */
.asc-results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-dark);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.asc-result-button {
    padding: 0.75rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    border-radius: var(--radius-pill) !important;
    transition: all 0.2s ease !important;
    min-width: 160px;
}

.asc-result-button--return {
    color: var(--text-secondary) !important;
    border-color: var(--glass-border) !important;
}

    .asc-result-button--return:hover {
        background: var(--glass-backdrop) !important;
        transform: translateY(-2px);
    }

.asc-result-button--next {
    background: var(--success-green) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

    .asc-result-button--next:hover {
        background: var(--success-green-dark) !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
    }

.asc-result-button--retry {
    background: var(--primary-blue) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

    .asc-result-button--retry:hover {
        background: var(--primary-blue-dark) !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4) !important;
    }

/* Responsive Design for Results */
@media (max-width: 768px) {
    .asc-results-screen-wrapper {
        padding: 1rem;
        min-height: 100vh;
    }

    .asc-results-container {
        width: 95vw;
        max-height: 95vh;
    }

    .asc-results-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .asc-victory-title, .asc-defeat-title {
        font-size: 2rem;
        justify-content: center;
    }

    .asc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .asc-results-actions {
        flex-direction: column;
    }

    .asc-result-button {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .asc-stats-grid {
        grid-template-columns: 1fr;
    }

    .asc-results-content {
        padding: 1rem;
    }

    .asc-results-header {
        padding: 1.5rem;
    }
}
