body {
    color: #e7bf8f !important;
}

.monster-details {
    max-width: 1200px;
    margin: 0 auto;
}

/* Ability Scores Grid */
.ability-scores-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .ability-scores-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .ability-scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Senses Grid */
.senses-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .senses-edit-grid {
        grid-template-columns: 1fr;
    }
}

.sense-edit-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sense-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 0.25rem;
}

.stat-box {
    background-color: #151f25;
    border-radius: 0.5rem;
    padding: 0.5rem;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Info Cards Grid */
.info-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .info-card-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background-color: #151f25;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.defense-loot-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.defense-loot-container .info-card {
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.defense-loot-container .info-card .stat-rows {
    flex: 1;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.stat-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.row-label {
}

.row-value {
    text-align: right;
}

/* Actions Section */
.action-section {
    background-color: #151f25;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-item {
    margin-bottom: 1rem;
}

.action-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.action-description {
    font-size: 0.875rem;
    line-height: 1.5;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    /*display: none;*/
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-icon {
    border: 5px solid rgba(231, 191, 143, 0.3);
    border-radius: 50%;
    border-top: 5px solid #e7bf8f;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    color: #e7bf8f;
    margin-top: 1.5rem;
    font-size: 1.2rem;
    text-align: center;
    font-style: italic;
    font-weight: bold;
    animation: popIn 0.5s ease-out forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes popOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
}

/* Loot and Rarity Styles */
.rarity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.rarity-common {
    background: rgba(107, 114, 128, 0.3);
    color: #9ca3af;
    border: 1px solid #6b7280;
}

.rarity-uncommon {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.rarity-rare {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.rarity-legendary {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.coin-amount {
    display: inline-block;
    margin-right: 0.5rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
    background: rgba(231, 191, 143, 0.1);
    color: #e7bf8f;
}

.loot-item {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(231, 191, 143, 0.1);
    color: #e7bf8f;
    font-size: 0.9rem;
}

.loot-item.magic-common {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.loot-item.magic-uncommon {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.loot-item.magic-rare {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.loot-item.magic-very_rare {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.loot-item.magic-legendary {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.loot-none {
    font-style: italic;
    color: #6b7280;
}

.monster-header {
    background-color: #151f25;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.monster-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #e7bf8f;
}

.monster-type {
    font-size: 1.25rem;
    font-style: italic;
    margin: 0.5rem 0;
    color: #e7bf8f;
}

.divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, #e7bf8f, transparent);
    margin: 1rem auto;
    width: 80%;
}

.challenge-rating {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0.5rem 0 0;
    color: #e7bf8f;
}

/* Tablet breakpoint */
@media (max-width: 768px) {
    .monster-header {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .monster-name {
        font-size: 1rem;
    }

    .monster-type {
        font-size: 0.8rem;
    }
}

/* Mobile breakpoint */
@media (max-width: 480px) {
    .monster-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .monster-name {
        font-size: 0.85rem;
    }

    .monster-type {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .challenge-rating {
        font-size: 1rem;
    }

    .divider {
        width: 90%;
        margin: 0.75rem auto;
    }
}


/* Additional styles for character page */
.character-header {
    background-color: #151f25;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.character-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #e7bf8f;
}

.character-type {
    font-size: 1.25rem;
    font-style: italic;
    margin: 0.5rem 0;
    color: #e7bf8f;
}

.character-description {
    line-height: 1.6;
    margin: 1rem 0;
    text-align: justify;
}

.quest-item {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(231, 191, 143, 0.2);
}

.quest-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.quest-title {
    color: #e7bf8f;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quest-description {
    margin-bottom: 1rem;
}

.quest-rewards h5 {
    color: #e7bf8f;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .character-header {
        padding: 1.25rem;
    }

    .character-name {
        font-size: 2rem;
    }

    .character-type {
        font-size: 1.1rem;
    }

    .quest-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .character-header {
        padding: 1rem;
    }

    .character-name {
        font-size: 1.75rem;
    }

    .character-type {
        font-size: 1rem;
    }

    .quest-title {
        font-size: 1rem;
    }

    .character-description {
        font-size: 0.9rem;
    }
}

.quest-section {
    margin: 1.5rem 0;
}

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

.quest-card {
    /*background-color: rgba(21, 31, 37, 0.5);*/
    background-color: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
    width: 100%;
}

.quest-title {
    font-size: 1.5rem;
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 1rem;
}

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

.quest-description {
    /*color: rgb(226, 232, 240);*/
    margin-bottom: 1rem;
    line-height: 1.6;
}

.quest-stage {
    border-left: 2px solid rgba(231, 191, 143, 0.3);
    padding-left: 1rem;
    margin: 1rem 0;
}

.stage-title {
    font-size: 1.125rem;
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 0.5rem;
}

.stage-description {
    /*color: rgb(209, 213, 219);*/
    line-height: 1.5;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.choice-card {
    /*background-color: rgba(21, 31, 37, 0.5);*/
    background-color: rgba(21, 31, 37, 0.5);
    padding: 1rem;
    border-radius: 0.375rem;
}

.choice-title {
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.choice-description {
    font-size: 0.875rem;
    /*color: rgb(226, 232, 240);*/
}

.choice-consequences {
    margin-top: 0.5rem;
    color: rgba(231, 191, 143, 0.5);
    font-size: 0.875rem;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.rewards-title {
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.rewards-list {
    list-style-type: disc;
    list-style-position: inside;
    font-size: 0.875rem;
    /*color: rgb(226, 232, 240);*/
}

.rewards-list li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .choice-grid,
    .rewards-grid {
        grid-template-columns: 1fr;
    }

    .quest-card {
        padding: 1rem;
    }

    .quest-title {
        font-size: 1.25rem;
    }

    .quest-description,
    .stage-description {
        font-size: 0.9rem;
    }
}


/* Character Development Section */
.development-section,
.relationships-section,
.hooks-section {
    margin: 1.5rem 0;
}

.development-grid,
.relationships-grid,
.hooks-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dnd-character-card {
    background-color: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
    width: 100%;
}

.context-block,
.trigger-block,
.transformation-block,
.history-block,
.stakes-block {
    border-left: 2px solid rgba(231, 191, 143, 0.3);
    padding-left: 1rem;
    margin: 1rem 0;
}

.context-title {
    font-size: 1.125rem;
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 0.5rem;
}

.context-text {
    line-height: 1.5;
}

.changes-grid {
    margin-top: 1rem;
}

.changes-title {
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 0.75rem;
}

.change-card {
    background-color: rgba(21, 31, 37, 0.5);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.change-header {
    color: rgba(231, 191, 143, 0.9);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.change-description {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.change-reason {
    color: rgba(231, 191, 143, 0.5);
    font-size: 0.875rem;
}

/* Relationships Styling */
.relationship-info {
    background-color: rgba(21, 31, 37, 0.5);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

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

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    color: rgba(231, 191, 143, 0.9);
    font-size: 0.875rem;
}

.info-value {
    font-size: 0.875rem;
}

.points-list {
    list-style-type: disc;
    list-style-position: inside;
    padding-left: 0.5rem;
}

.points-list li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .character-card {
        padding: 1rem;
    }

    .context-title,
    .changes-title {
        font-size: 1rem;
    }

    .context-text,
    .change-description {
        font-size: 0.9rem;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

.flex-card{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.flex-card > .ability-scores-grid {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}


.subrace-section {
    background-color: #151f25;
    /*border: 1px solid rgba(231, 191, 143, 0.1);
    border-radius: 0.5rem;*/
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.subrace-header {
    /*display: flex;
    justify-content: space-between;*/
    align-items: center;
    text-align: center;
}

.subrace-name {
    font-size: 1.5rem;
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 1rem;
}

.subrace-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subrace-description {
    margin-bottom: 1rem;
    line-height: 1.6;
    padding-left: 1rem;
    border-left: 2px solid rgba(231, 191, 143, 0.3);
}

.subrace-stats {
    background-color: rgba(21, 31, 37, 0.5);
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.subrace-ability-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-around;
    margin: 1rem 0;
}

.subrace-trait {
    border-left: 2px solid rgba(231, 191, 143, 0.3);
    padding-left: 1rem;
    margin: 1rem 0;
}

.trait-title {
    font-size: 1.125rem;
    color: rgba(231, 191, 143, 0.9);
    margin-bottom: 0.5rem;
}

.trait-description {
    line-height: 1.5;
}

.trait-usage {
    color: rgba(231, 191, 143, 0.6);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .subrace-section {
        padding: 1rem;
    }

    .subrace-name {
        font-size: 1.25rem;
    }

    .subrace-description,
    .trait-description {
        font-size: 0.9rem;
    }

    .subrace-ability-scores {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Animation for hover effects */
.subrace-section {
    /*transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;*/
}

.spell-slots-grid{
    display: flex;
    justify-content: space-around;
}

.spellcasting-card{
    align-items: stretch;
}

.spell-list {
    display: flex;
    justify-content: space-around;
}

/* Spell Grid Layout */
.spell-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .spell-grid {
        grid-template-columns: 1fr;
    }
}

/* Spell Card Styling */
.spell-card {
    background-color: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.spell-header {
    background-color: rgba(231, 191, 143, 0.1);
    padding: 1rem;
    border-bottom: 1px solid rgba(231, 191, 143, 0.1);
}

.spell-name {
    font-size: 1.25rem;
    color: #e7bf8f;
    margin: 0;
}

.spell-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: rgba(231, 191, 143, 0.7);
}

.spell-content {
    padding: 1rem;
}

.spell-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.spell-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: rgba(231, 191, 143, 0.7);
    font-weight: 500;
}

.info-value {
    font-size: 0.875rem;
}

.spell-materials {
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(231, 191, 143, 0.1);
}

.spell-description {
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(231, 191, 143, 0.1);
}

.spell-higher-levels {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(231, 191, 143, 0.1);
}

.spell-higher-levels p {
    margin-top: 0.25rem;
}

.spell-slot-level {
    background-color: rgba(21, 31, 37, 0.5);
    padding: 1rem;
    border-radius: 0.375rem;
    text-align: center;
}

.spell-level {
    color: rgba(231, 191, 143, 0.9);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.slot-counts {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.slot-count {
    background-color: rgba(231, 191, 143, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.spell-level-text {
    background-color: rgba(231, 191, 143, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.spell-school {
    background-color: rgba(231, 191, 143, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Additional card styling for inner cards */
.ability-card,
.transformation-card,
.aura-card,
.companion-card,
.effect-card {
    background-color: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.spell-card, .info-card, .subrace-section {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.spell-card:hover, .info-card:hover, .subrace-section:hover {
    /*transform: scale(1.02);*/
    box-shadow: 0 2px 8px rgba(231, 191, 143, 0.3);
}

#companion-stats-block {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.stat-row-companion {
    flex-direction: column;
}

/* Inline Editing Styles - Only for owners (who have editable-field elements) */
.editable-field {
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    padding: 2px;
}

.editable-field:hover {
    background: rgba(231, 191, 143, 0.1);
}

.editable-field:hover:after {
    content: "✏️";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    opacity: 0.7;
}

/* Non-editable field hover highlighting - for non-owners to see there's content */
.non-editable-field {
    position: relative;
    transition: all 0.2s;
    border-radius: 4px;
    padding: 2px;
    cursor: default;
}

.non-editable-field:hover {
    background: rgba(231, 191, 143, 0.05);
}

.non-editable-field[data-user-type="anonymous"]:hover:after {
    content: "to edit you need to register";
    position: absolute;
    top: -30px;
    right: 0px;
    background: rgba(0, 0, 0, 0.8);
    color: #e7bf8f;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.non-editable-field[data-user-type="registered"]:hover:after {
    content: "only owner can edit";
    position: absolute;
    top: -30px;
    right: 0px;
    background: rgba(0, 0, 0, 0.8);
    color: #e7bf8f;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.editable-field.editing {
    background: rgba(231, 191, 143, 0.15);
    cursor: default;
}

.editable-field.editing:after {
    display: none;
}

.edit-content {
    display: none;
}

div.campaign-description .edit-content textarea,
div.campaign-description .edit-content input,
div.character-details .edit-content textarea,
div.character-details .edit-content input,
.editable-field .edit-content textarea,
.editable-field .edit-content input {
    background-color: #151f25;
    border: 1px solid #e7bf8f;
    color: #e7bf8f;
    border-radius: 4px;
    width: 100%;
    padding: 8px;
    font-family: inherit;
    font-size: inherit;
    min-height: auto;
    height: auto;
    resize: vertical;
    box-shadow: none;
}

div.campaign-description .edit-content textarea:focus,
div.campaign-description .edit-content input:focus,
div.character-details .edit-content textarea:focus,
div.character-details .edit-content input:focus,
.editable-field .edit-content textarea:focus,
.editable-field .edit-content input:focus {
    outline: none;
    border-color: #f7931e;
    box-shadow: 0 0 0 2px rgba(247, 147, 30, 0.2);
    background-color: #151f25;
    color: #e7bf8f;
}

.auto-save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    border-radius: 4px;
    z-index: 1000;
    display: none;
    font-size: 14px;
    font-weight: bold;
}

.auto-save-indicator.saving {
    background: #f7931e;
    color: white;
    display: block;
}

.auto-save-indicator.saved {
    background: #28a745;
    color: white;
    display: block;
}

.auto-save-indicator.error {
    background: #dc3545;
    color: white;
    display: block;
}

/* Character Loading Message Styles */
.loading-message {
    font-weight: bold;
    font-style: italic;
}

.loading-sub-message {
    font-weight: bold;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.popIn {
    animation: popIn 0.3s ease-out forwards;
}

.popOut {
    animation: popOut 0.3s ease-out forwards;
}

/* Loot Loading Overlay */
.loot-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.loot-loading-content {
    text-align: center;
    padding: 2rem;
}

.loot-loading-icon {
    font-size: 3rem;
    animation: bounce 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

.loot-loading-message {
    font-size: 1.1rem;
    font-weight: bold;
    color: #f7931e;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Make info-card relative for overlay positioning */
.info-card {
    position: relative;
}

/* Item Hover Cards */
.loot-item-link {
    position: relative;
    cursor: pointer;
}

.item-hover-card {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background-color: #151f25;
    border: 2px solid #e7bf8f;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    margin-bottom: 10px;
    overflow: hidden;
}

.loot-item-link:hover .item-hover-card {
    display: block;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.item-hover-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 2px solid #e7bf8f;
}

.item-hover-card-body {
    padding: 1rem;
}

.item-hover-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e7bf8f;
    margin-bottom: 0.5rem;
}

.item-hover-card-rarity {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.item-hover-card-stats {
    display: flex;
    justify-content: space-between;
    margin: 0.75rem 0;
    font-size: 0.875rem;
}

.item-hover-card-stat {
    text-align: center;
}

.item-hover-card-stat-label {
    color: rgba(231, 191, 143, 0.7);
    font-size: 0.75rem;
    display: block;
}

.item-hover-card-stat-value {
    color: #e7bf8f;
    font-weight: 600;
}

.item-hover-card-description {
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(231, 191, 143, 0.9);
    margin-top: 0.5rem;
}

/* Position adjustment for cards that would go off screen */
.item-hover-card.card-position-right {
    left: auto;
    right: -10px;
    transform: none;
}

.item-hover-card.card-position-left {
    left: -10px;
    right: auto;
    transform: none;
}

