/* Стили для модального окна предметов */
.items-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.items-modal-content {
    background: linear-gradient(145deg, #1a1e2a 0%, #0f1217 100%);
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #4a6c8f;
    border-radius: 12px;
    width: 80%;
    max-width: 800px;
    color: #fff;
    box-shadow: 0 0 30px rgba(0,0,0,0.7);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #4a6c8f;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #ffd700;
    font-size: 1.5em;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: #ffd700;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border-left: 4px solid #4a6c8f;
    transition: all 0.2s;
}

.item-row:hover {
    background: rgba(74,108,143,0.2);
    border-left-color: #ffd700;
}

.item-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid #4a6c8f;
    flex-shrink: 0;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: bold;
    color: #fff;
    font-size: 1.1em;
}

.item-details {
    display: flex;
    gap: 20px;
    margin-top: 5px;
    color: #ccc;
    font-size: 0.9em;
}

.item-quantity {
    color: #ffd700;
}

.item-included {
    color: #4caf50;
}

.item-excluded {
    color: #f44336;
}

.items-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4a6c8f;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8em;
    margin-left: 8px;
}

.contract-items-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4em;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #4a6c8f;
}

.contract-items-btn:hover {
    background: rgba(74,108,143,0.3);
    color: #ffd700;
    transform: scale(1.1);
}

.contract-items-btn.has-items {
    color: #4caf50;
}

.no-items {
    text-align: center;
    padding: 40px;
    color: #aaa;
    font-size: 1.2em;
}

.items-loading {
    text-align: center;
    padding: 40px;
    color: #ffd700;
}

/* Стили для скроллбара */
.items-list::-webkit-scrollbar {
    width: 8px;
}

.items-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.items-list::-webkit-scrollbar-thumb {
    background: #4a6c8f;
    border-radius: 4px;
}

.items-list::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

/* Дополнительные стили для карточек статистики */
.active-stats-bar {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #1a1e2a 0%, #151a22 100%);
    border-radius: 12px;
    border-left: 6px solid #ffd700;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.pilot-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    transition: all 0.2s;
}

.pilot-badge:hover {
    background: rgba(74,108,143,0.3);
    transform: translateX(2px);
}

.pilot-portrait {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #4a6c8f;
}

.pilot-name {
    font-size: 0.85em;
    font-weight: bold;
}

.pilot-stats {
    font-size: 0.7em;
    color: #ffd700;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .items-modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 15px;
    }
    
    .item-row {
        flex-wrap: wrap;
    }
    
    .item-icon {
        width: 32px;
        height: 32px;
    }
    
    .item-details {
        flex-direction: column;
        gap: 5px;
    }
}