/**
 * D&D AI RPG - Inventory System Styles
 * Video game style layout: Portrait | Equipment Column | Inventory Grid
 */

/* ============================================================================
   INVENTORY PANEL
   ============================================================================ */

#inventory-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    backdrop-filter: blur(4px);
    display: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

#inventory-backdrop.visible {
    display: block;
}

#inventory-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1400px;
    height: 85vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #f39c12;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#inventory-panel.hidden {
    display: none;
}

.panel-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #d68910;
    flex-shrink: 0;
}

.panel-header h2 {
    color: white;
    margin: 0;
    font-size: 22px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ============================================================================
   MAIN CONTENT LAYOUT - Three Column Design
   ============================================================================ */

.inventory-content {
    padding: 20px;
    flex: 1;
    display: flex;
    gap: 20px;
    overflow: hidden;
}

/* ============================================================================
   LEFT SECTION - Portrait Only (No Overlays!)
   Full-body portrait display - 1024x1792 aspect ratio (approx 1:1.75)
   ============================================================================ */

.equipment-grid {
    width: 500px;
    min-width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.equipment-grid h3 {
    display: none; /* Hide the old title */
}

.character-portrait-container {
    width: 100%;
    flex: 1;
    min-height: 500px;
    max-height: calc(85vh - 120px);
    aspect-ratio: 1024 / 1792;
    position: relative;
    display: flex;
    align-items: stretch;
}

.character-portrait {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(30, 30, 50, 0.9) 0%, rgba(20, 20, 35, 0.95) 100%);
    border: 3px solid #3498db;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 0 50px rgba(52, 152, 219, 0.1);
    position: relative;
}

#character-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    position: relative;
}

#character-portrait-img.loaded {
    opacity: 1;
}

.portrait-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #3498db;
    z-index: 1;
}

.portrait-placeholder.hidden {
    display: none;
    pointer-events: none;
}

/* Loading spinner for portrait */
.portrait-placeholder.loading .portrait-icon {
    animation: portraitSpin 1.5s linear infinite;
}

.portrait-placeholder.loading .portrait-text {
    animation: portraitPulse 1.5s ease-in-out infinite;
}

.portrait-placeholder.loading .portrait-text::after {
    content: '...';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

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

@keyframes portraitPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

.portrait-icon {
    font-size: 48px;
    opacity: 0.5;
}

.portrait-text {
    font-size: 12px;
    font-weight: bold;
    opacity: 0.7;
}

/* HIDE the overlay equipment slots completely */
.equipment-overlay {
    display: none !important;
}

.overlay-slot {
    display: none !important;
}

/* ============================================================================
   CENTER SECTION - Equipment Slots Column
   ============================================================================ */

.equipment-slots {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 180px;
    flex-shrink: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 2px solid #3498db;
    overflow-y: auto;
    max-height: 100%;
}

.equipment-slot {
    background: rgba(52, 152, 219, 0.1);
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 8px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    cursor: pointer;
}

.equipment-slot:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: #5dade2;
    border-style: solid;
}

.slot-icon {
    font-size: 18px;
    text-align: center;
}

.slot-label {
    font-size: 9px;
    color: #3498db;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}

.slot-item {
    width: 100%;
    text-align: center;
}

.equipped-item {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3), rgba(39, 174, 96, 0.3));
    border: 2px solid #2ecc71;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.equipped-item:hover {
    border-color: #58d68d;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.5), rgba(39, 174, 96, 0.5));
}

.equipped-item .item-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.equipped-item .item-name {
    font-size: 9px;
    color: white;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* ============================================================================
   RIGHT SECTION - Inventory Grid and Tabs
   ============================================================================ */

.inventory-right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
    overflow: hidden;
}

/* Gold Display - Top of right section */
.gold-display {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: bold;
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    flex-shrink: 0;
}

.gold-icon {
    font-size: 24px;
    animation: goldShine 3s infinite;
}

@keyframes goldShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3) drop-shadow(0 0 10px #f1c40f); }
}

/* Tabs */
.inventory-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.tab-btn {
    background: rgba(52, 152, 219, 0.2);
    border: 2px solid #3498db;
    color: #3498db;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: #5dade2;
}

.tab-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #5dade2;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* Inventory Grid Container */
.inventory-grid-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
}

.inventory-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow-y: auto;
    align-content: start;
}

.inventory-item {
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.6), rgba(44, 62, 80, 0.6));
    border: 2px solid #34495e;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    aspect-ratio: 1;
}

.inventory-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: #5dade2;
}

.item-icon {
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.item-name {
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

.item-quantity {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 5px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.item-equipped {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #3498db;
    color: white;
    padding: 2px 5px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
}

/* Capacity */
.inventory-capacity {
    text-align: center;
    color: #3498db;
    font-size: 13px;
    font-weight: bold;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    flex-shrink: 0;
}

/* Rarity Colors */
.rarity-common { border-color: #95a5a6; }
.rarity-uncommon { border-color: #27ae60; box-shadow: 0 0 10px rgba(39, 174, 96, 0.3); }
.rarity-rare { border-color: #3498db; box-shadow: 0 0 10px rgba(52, 152, 219, 0.4); }
.rarity-epic { border-color: #9b59b6; box-shadow: 0 0 15px rgba(155, 89, 182, 0.5); }
.rarity-legendary { border-color: #f39c12; box-shadow: 0 0 20px rgba(243, 156, 18, 0.6); animation: legendaryGlow 2s infinite; }

@keyframes legendaryGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(243, 156, 18, 0.6); }
    50% { box-shadow: 0 0 30px rgba(243, 156, 18, 0.9); }
}

/* ============================================================================
   ITEM DETAIL PANEL
   ============================================================================ */

.item-detail {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 320px;
    max-height: 75vh;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 3px solid #3498db;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 1100;
    overflow-y: auto;
}

.item-detail.hidden {
    display: none;
}

.item-detail-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.item-detail-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    font-size: 28px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.item-detail-icon.rarity-common { border-color: #95a5a6; }
.item-detail-icon.rarity-uncommon { border-color: #27ae60; }
.item-detail-icon.rarity-rare { border-color: #3498db; }
.item-detail-icon.rarity-epic { border-color: #9b59b6; }
.item-detail-icon.rarity-legendary { border-color: #f39c12; box-shadow: 0 0 10px rgba(243, 156, 18, 0.5); }

.item-detail-title { flex: 1; }

.item-detail h3 {
    color: white;
    margin: 0 0 4px 0;
    font-size: 18px;
    text-align: left;
}

.item-type {
    color: #95a5a6;
    font-size: 11px;
    margin-top: 4px;
}

.item-rarity {
    display: inline-block;
    font-weight: bold;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.item-rarity.rarity-common { background: #95a5a6; color: white; }
.item-rarity.rarity-uncommon { background: #27ae60; color: white; }
.item-rarity.rarity-rare { background: #3498db; color: white; }
.item-rarity.rarity-epic { background: #9b59b6; color: white; }
.item-rarity.rarity-legendary { background: #f39c12; color: white; }

.item-stats {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child { border-bottom: none; }
.stat-name { color: #3498db; font-weight: bold; font-size: 13px; }
.stat-value { color: #2ecc71; font-weight: bold; font-size: 13px; }
.stat-value.positive { color: #2ecc71; }
.stat-value.negative { color: #e74c3c; }

.item-description {
    color: #ecf0f1;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.item-lore {
    color: #95a5a6;
    font-size: 11px;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid #f39c12;
    border-radius: 5px;
}

.item-meta {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 12px;
}

.item-meta-row {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-label { color: #95a5a6; font-size: 12px; }
.meta-value { color: #ecf0f1; font-weight: bold; font-size: 13px; }
.no-stats { color: #7f8c8d; font-style: italic; text-align: center; padding: 8px; }

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5dade2, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #58d68d, #2ecc71);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ec7063, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes equipmentChange {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(52, 152, 219, 0); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(52, 152, 219, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(52, 152, 219, 0); }
}

.equipment-slot.equipment-changed { animation: equipmentChange 0.5s ease-out; }
.equipped-item.equipping { animation: equipmentEquipped 0.4s ease-out; }
.equipped-item.unequipping { animation: equipmentUnequipped 0.3s ease-out; }

@keyframes equipmentEquipped {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes equipmentUnequipped {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5); opacity: 0; }
}

/* Portrait regeneration indicator */
.portrait-regenerating::after {
    content: 'Updating...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #f39c12;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    animation: pulse 1.5s infinite;
}

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

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1400px) {
    .equipment-grid {
        width: 420px;
        min-width: 350px;
    }
}

@media (max-width: 1200px) {
    .inventory-content {
        flex-wrap: wrap;
    }

    .equipment-grid {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
    }

    .character-portrait-container {
        width: 350px;
        /* Let aspect-ratio calculate height: 350 * 1.75 = 612px */
        min-height: 400px;
        flex-shrink: 0;
    }

    .equipment-slots {
        flex: 1;
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
        max-height: 600px;
    }

    .equipment-slot {
        width: calc(50% - 4px);
    }

    .inventory-right-section {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .character-portrait-container {
        width: 300px;
        /* Let aspect-ratio calculate height: 300 * 1.75 = 525px */
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    #inventory-panel {
        width: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        max-height: -webkit-fill-available;
        border-radius: 0;
        border: none;
        top: 0;
        left: 0;
        transform: none;
    }

    .panel-header {
        padding: 12px 15px;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .panel-header h2 {
        font-size: 16px;
    }

    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .inventory-content {
        padding: 10px;
        gap: 10px;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .equipment-grid {
        flex-direction: column;
        align-items: center;
        width: 100%;
        order: 2; /* Move portrait below equipment on mobile */
    }

    .character-portrait-container {
        width: 100%;
        max-width: 280px;
        min-height: 200px;
        max-height: 350px;
        aspect-ratio: 1024 / 1792;
    }

    .equipment-slots {
        width: 100%;
        max-height: none;
        order: 1; /* Equipment first on mobile */
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .equipment-slot {
        width: calc(25% - 6px);
        min-width: 70px;
        padding: 6px;
        min-height: 60px;
    }

    .slot-icon {
        font-size: 16px;
    }

    .slot-label {
        font-size: 8px;
    }

    .inventory-right-section {
        order: 3;
        width: 100%;
    }

    .gold-display {
        padding: 8px 12px;
        font-size: 14px;
    }

    .inventory-tabs {
        gap: 4px;
        justify-content: center;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
        padding: 10px;
        max-height: 40vh;
    }

    .inventory-item {
        padding: 8px;
    }

    .item-icon {
        font-size: 22px;
    }

    .item-name {
        font-size: 9px;
    }

    /* Item detail panel - full screen on mobile */
    .item-detail {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        transform: none;
        border-radius: 0;
        z-index: 1200;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .panel-header h2 {
        font-size: 14px;
    }

    .inventory-content {
        padding: 8px;
        gap: 8px;
    }

    /* Hide portrait on very small screens - user can scroll to see it */
    .character-portrait-container {
        max-width: 200px;
        min-height: 150px;
        max-height: 250px;
    }

    .equipment-slot {
        width: calc(25% - 4px);
        min-width: 60px;
        padding: 4px;
        min-height: 50px;
    }

    .slot-icon {
        font-size: 14px;
    }

    .slot-label {
        font-size: 7px;
    }

    .equipped-item .item-name {
        display: none; /* Just show icon on tiny screens */
    }

    .tab-btn {
        padding: 5px 8px;
        font-size: 10px;
    }

    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
        padding: 8px;
    }

    .item-icon {
        font-size: 18px;
    }

    .item-name {
        font-size: 8px;
    }

    .gold-display {
        padding: 6px 10px;
        font-size: 12px;
    }

    .gold-icon {
        font-size: 18px;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #inventory-panel {
        height: 100vh;
        height: 100dvh;
    }

    .inventory-content {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .equipment-grid {
        width: auto;
        flex: 0 0 auto;
        flex-direction: column;
        order: 1;
    }

    .character-portrait-container {
        width: 150px;
        min-height: 200px;
        max-height: calc(100vh - 80px);
    }

    .equipment-slots {
        flex-direction: column;
        width: 100px;
        order: 2;
    }

    .equipment-slot {
        width: 100%;
    }

    .inventory-right-section {
        flex: 1;
        order: 3;
    }

    .inventory-grid {
        max-height: calc(100vh - 180px);
    }
}

/* ============================================================================
   EQUIPMENT STATS SUMMARY
   ============================================================================ */

.equipment-stats-summary {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15) 0%, rgba(39, 174, 96, 0.1) 100%);
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
    flex-shrink: 0;
}

.stat-summary-title {
    font-size: 0.9em;
    font-weight: bold;
    color: #2ecc71;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(46, 204, 113, 0.3);
}

.stat-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 6px;
}

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

.stat-label {
    color: #ecf0f1;
    font-size: 0.85em;
    font-weight: 500;
}

.stat-value {
    color: #2ecc71;
    font-size: 1em;
    font-weight: bold;
    font-family: 'Consolas', 'Monaco', monospace;
    text-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

/* Equipment stats hover effect */
.stat-summary-row:hover {
    background: rgba(46, 204, 113, 0.2);
}

/* Mobile adjustments for equipment stats */
@media (max-width: 768px) {
    .equipment-stats-summary {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
        margin-top: 8px;
    }

    .stat-summary-title {
        width: 100%;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }

    .stat-summary-row {
        flex: 1;
        min-width: 80px;
        margin-bottom: 0;
        padding: 8px 10px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .stat-label {
        font-size: 0.75em;
    }

    .stat-value {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .equipment-stats-summary {
        flex-direction: row;
        justify-content: space-around;
    }

    .stat-summary-row {
        min-width: 60px;
        padding: 6px;
    }
}
