/* Quest System Styles */
.quests-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem;
    min-height: 100vh;
    background: rgba(10, 10, 15, 0.5);
}

.quest-container {
    max-width: 900px;
    margin: 0 auto;
    flex: 1;
}

.quest-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.available-quests,
.completed-quests {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quest-list h2 {
    color: var(--text-gold);
    font-family: "Cinzel Decorative", serif;
    font-size: 2rem;
    text-align: center;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.quest-header-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.reset-quests-btn {
    position: fixed;
    bottom: 15rem;
    right: 1.5rem;
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-quests-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        var(--shadow-glow);
}

.quest-list h3 {
    color: var(--text-gold);
    font-family: "Cinzel Decorative", serif;
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.quest-card {
    background: var(--surface-glass);
    backdrop-filter: blur(15px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.quest-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow), var(--shadow-premium);
    border-color: var(--primary-gold);
}

.quest-card.easy {
    border-left: 4px solid var(--accent-emerald);
}

.quest-card.medium {
    border-left: 4px solid var(--primary-gold);
}

.quest-card.hard {
    border-left: 4px solid var(--accent-red);
}

.quest-card h3 {
    color: var(--text-gold);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-family: "Cinzel Decorative", serif;
    font-weight: 600;
}

.quest-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 1rem;
}

.quest-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quest-card.easy .difficulty {
    background: var(--accent-emerald);
    color: white;
}

.quest-card.medium .difficulty {
    background: var(--primary-gold);
    color: var(--background-dark);
}

.quest-card.hard .difficulty {
    background: var(--accent-red);
    color: white;
}

.rewards {
    color: var(--text-gold);
    font-weight: bold;
}

.quest-card button {
    background: linear-gradient(135deg, var(--primary-gold), #f4d03f);
    color: var(--background-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quest-card button:hover {
    background: linear-gradient(135deg, #f4d03f, #f8e79a);
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

/* Active Quest Interface */
.active-quest {
    background: var(--surface-glass);
    backdrop-filter: blur(15px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.active-quest h2 {
    color: var(--text-gold);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-family: "Cinzel Decorative", serif;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.scene-content {
    margin-bottom: 2rem;
}

.scene-text {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.quest-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quest-option {
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    border: 2px solid rgba(212, 175, 55, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-weight: 600;
}

.quest-option:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--primary-gold);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.retry-options {
    display: flex;
    padding-top: 1rem;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
}

.retry-options button {
    background: linear-gradient(135deg, var(--primary-gold), #f4d03f);
    color: var(--background-dark);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.retry-options button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.skill-info {
    display: block;
    font-size: 0.9rem;
    color: var(--text-gold);
    margin-top: 0.5rem;
    font-style: italic;
}

.abandon-btn {
    background: linear-gradient(135deg, var(--accent-red), #c82333);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.abandon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* Roll Results */
.roll-result {
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.roll-result.success {
    border-left-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.roll-result.failure {
    border-left-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.roll-result h4 {
    color: #d4af37;
    margin-bottom: 0.5rem;
}

/* Combat Interface */
.combat-interface {
    width: 90vw;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Combat Header - Red Background */
.combat-header {
    background: linear-gradient(135deg, #4a1a1a 0%, #2a1a1a 100%);
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 1.5rem;
}

.combat-interface h2 {
    font-family: "Cinzel Decorative", serif color: #dc3545;
    text-align: center;
    margin: 0 0 1.5rem 0;
    font-size: 2rem;
}

/* Health Bars Container */
.health-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.health-bar-container {
    text-align: center;
}

.health-bar-container h4 {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.health-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #666;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    border-radius: 13px;
    transition: width 0.5s ease;
    position: relative;
}

.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.enemy-info {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dc3545;
    margin: 0;
}

.enemy-info h3 {
    font-family: "Cinzel Decorative", serif color: #dc3545;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.enemy-info p {
    color: #e0e0e0;
    margin: 0;
}

/* Combat Options - Floating on Dark Blue */
.combat-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--surface-glass);
    backdrop-filter: blur(15px);
    border: var(--glass-border);
    border-radius: 12px;
}

.combat-options button {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.combat-options button:hover:not(:disabled) {
    background: linear-gradient(135deg, #e74c3c 0%, #dc3545 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.combat-options button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.retreat-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    grid-column: span 4;
    margin-top: 0.5rem;
}

.retreat-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%) !important;
}

.combat-action-defensive {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.combat-action-defensive:hover:not(:disabled) {
    background: linear-gradient(135deg, #0069d9 0%, #004085 100%) !important;
}

.combat-action-utility {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
}

.combat-action-utility:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #155724 100%) !important;
}

.combat-action-bonus {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%) !important;
}

.combat-action-bonus:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a2d91 0%, #4c1d82 100%) !important;
}

#combat-log {
    background: var(--surface-glass);
    backdrop-filter: blur(15px);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#combat-log .inner-container {
    /* Remove conflicting styles since we're styling the parent now */
}

#combat-log p {
    margin: 0.75rem 0;
    color: var(--text-light);
    line-height: 1.4;
    font-weight: 500;
}

#combat-log p.success {
    color: #22c55e;
}

#combat-log p.failure {
    color: #ef4444;
}

#combat-log p strong {
    color: #d4af37;
}

/* Retreat Button - Floating */
.retreat-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    grid-column: span 4;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.retreat-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%) !important;
}

/* Completed Quests */
.completed-quest {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--accent-emerald);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--accent-emerald);
    font-weight: 600;
}

/* Quest Completion */
.quest-completion {
    background: var(--surface-glass);
    backdrop-filter: blur(15px);
    border: 2px solid var(--accent-emerald);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.quest-completion h2 {
    color: var(--accent-emerald);
    margin-bottom: 1rem;
    font-family: "Cinzel Decorative", serif;
    font-size: 2.5rem;
}

.quest-completion h3 {
    color: var(--text-gold);
    margin-bottom: 1.5rem;
    font-family: "Cinzel Decorative", serif;
}

.quest-completion button {
    background: linear-gradient(135deg, var(--primary-gold), #f4d03f);
    color: var(--background-dark);
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.quest-completion button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

/* Combat Dice Modal - True Pop-up */
.dice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.dice-modal.active {
    display: flex;
}

.dice-modal-content {
    background: var(--surface-glass);
    backdrop-filter: blur(15px);
    border: 2px solid #d4af37;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.dice-modal.active .dice-modal-content {
    transform: scale(1);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: scale(0.8) translateY(50px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.dice-modal h3 {
    color: #d4af37;
    font-family: "Cinzel Decorative", serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

/* Weapon/Spell Selection Modal */
.weapon-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2001;
    animation: fadeIn 0.3s ease;
}

.weapon-selection-content {
    background: var(--surface-glass);
    backdrop-filter: blur(15px);
    border: 2px solid #d4af37;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

.weapon-selection-content h3 {
    color: #d4af37;
    font-family: "Cinzel Decorative", serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-transform: capitalize;
}

.weapon-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.weapon-option {
    background: linear-gradient(135deg, #2a2a4e 0%, #1a1a2e 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.weapon-option:hover {
    background: linear-gradient(135deg, #3a3a5e 0%, #2a2a3e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.weapon-name {
    color: #d4af37;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.weapon-description {
    color: #e0e0e0;
    font-size: 0.9rem;
}

.cancel-selection {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cancel-selection:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* Primary dice display container for 3D dice */
.combat-dice-display,
#combat-dice-display,
#dice-display {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1a1a 100%);
    border: 2px solid #d4af37;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: 
        inset 0 0 20px rgba(212, 175, 55, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

/* Ensure canvas fills container properly */
.combat-dice-display canvas,
#combat-dice-display canvas,
#dice-display canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 13px;
    display: block;
}

/* Fallback dice container styles */
.dice-container,
.dice-stage {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1a1a 100%);
    border: 2px solid #d4af37;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        inset 0 0 20px rgba(212, 175, 55, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.3);
}

.combat-roll-button {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #1a1a2e;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    margin: 1rem;
}

.combat-roll-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.combat-roll-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.combat-dice-result {
    color: var(--text-light);
    font-size: 1.1rem;
    text-align: center;
    min-height: 2rem;
    font-weight: 600;
    margin: 1rem;
}

.dice-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #d4af37;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dice-modal-close:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: rotate(90deg);
}

.cinzel-dic {
    font-family: "Cinzel", serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

.rewards {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.rewards h4 {
    color: #d4af37;
    margin-bottom: 0.75rem;
}

.rewards ul {
    list-style: none;
    padding: 0;
}

.rewards li {
    color: #e0e0e0;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.rewards li:last-child {
    border-bottom: none;
}

.quest-completion .rewards {
    margin-bottom: 1.5rem;
}

.reward-xp {
    color: #22c55e;
    font-weight: bold;
}

.reward-coins {
    color: #d4af37;
    font-weight: bold;
}

.reward-item {
    color: #8b5cf6;
    font-weight: bold;
}

.current-stats {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #22c55e;
}

.current-stats h4 {
    color: #d4af37;
    margin-bottom: 0.75rem;
}

.current-stats p {
    color: #e0e0e0;
    margin: 0.25rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .combat-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .combat-options button {
        font-size: 0.8rem;
        padding: 0.6rem 0.5rem;
        min-height: 60px;
    }

    .retreat-btn {
        grid-column: span 2;
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .quest-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    #combat-log {
        max-height: 200px;
        padding: 1rem;
    }
}

/* Dice Rolling Section */
.dice-section {
    display: none;
    /* Hidden by default */
    max-width: 300px;
    margin: 1rem auto;
    padding: 1rem;
    background: linear-gradient(135deg, #2a2a4e 0%, #1a1a2e 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    text-align: center;
}

.dice-section.active {
    display: block;
}

.dice-section h3 {
    color: #d4af37;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.dice-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.dice-display {
    width: 200px;
    height: auto;
    background: #1a1a2e;
    border: 1px solid #d4af37;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

#roll-dice-btn {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a1a2e;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#roll-dice-btn:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #f8e79a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

#roll-dice-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dice-result {
    color: #e0e0e0;
    font-size: 1.1rem;
    text-align: center;
}

/* Clean, integrated dice card */
.dice-card{
  position:relative;
  background: var(--surface-glass);
  backdrop-filter: blur(15px);
  border: var(--glass-border);
  border-radius:16px;
  padding:14px 14px 18px;
  box-shadow: var(--shadow-premium);
}

/* Stage that holds the WebGL canvas */
.dice-stage{
  width:100%;
  aspect-ratio: 16/9;                 /* stays responsive */
  border-radius:12px;
  overflow:hidden;
  background: radial-gradient(120% 90% at 50% 15%, #22263e 0%, #1a1a2e 45%, #1a1a2e 100%);
  box-shadow: inset 0 0 24px rgba(0,0,0,.45);
}

/* Let the renderer canvas fill the stage cleanly */
.dice-stage canvas{
  display:block;
  width:100% !important;
  height:100% !important;
  border-radius:12px;
}

/* Actions + result live with the same card – no extra containers */
.dice-actions{
  display:flex;
    justify-content:center;
    gap:.75rem;
    margin:1rem;
}

.combat-dice-result{
  color: var(--text-light);
  text-align:center;
  font-weight:600;
  min-height:1.25rem;
  margin-top:.25rem;
}

/* Remove the old framed look on the inner display if it’s still present */
.combat-dice-display{ border:none !important; background:transparent !important; }

.combat-options button.unavailable {
    background: linear-gradient(135deg, #404040 0%, #2a2a2a 100%);
    color: #666666;
    border-color: #555555;
    cursor: not-allowed;
    opacity: 0.6;
}

.combat-options button.unavailable:hover {
    background: linear-gradient(135deg, #404040 0%, #2a2a2a 100%);
    transform: none;
    box-shadow: none;
}

/* Combat log message types */
#combat-log .critical-miss {
    color: #ff4444;
    font-weight: bold;
}

#combat-log .miss {
    color: #ffaa44;
}

#combat-log .damage {
    color: #44ff44;
    font-weight: bold;
}

#combat-log .low-damage {
    color: #88ff88;
}