/* ======================================= */
/* ========== ТАБЛИЦА ПРЕДМЕТОВ ========== */
/* ======================================= */

.resources-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.resources-table th,
.resources-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.resources-table th {
    background: #4a4a8a;
    font-weight: 700;
    color: white;
}

.resources-table td {
    color: #000000;
    font-weight: 500;
}

.resources-table .icon {
    width: 50px;
    text-align: center;
}

.resources-table .icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.resources-table .name-cell {
    text-align: left;
    font-weight: 600;
}

.resources-table .price-cell {
    font-weight: 700;
    color: #2c3e50;
}

.resources-table .price-value {
    color: #27ae60;
    font-size: 1.1em;
}

.resources-table .price-free {
    color: #95a5a6;
    font-style: italic;
}

.resources-table .status-cell {
    font-size: 1.2em;
    text-align: center;
}

.resources-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.resources-table tbody tr:hover {
    background-color: #e8e8ff;
    cursor: pointer;
}

/* ======================================= */
/* ========== БЕЙДЖИКИ ========== */
/* ======================================= */

.cash-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    font-size: 0.7em;
    font-weight: 700;
    border-radius: 12px;
    margin-left: 8px;
}

.cash-badge-large {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    font-size: 0.85em;
    font-weight: 700;
    border-radius: 20px;
    margin-left: 10px;
}

.money-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    background: #f0f0f0;
    color: #555;
}

/* ======================================= */
/* ========== ДЕТАЛЬНАЯ СТРАНИЦА ========== */
/* ======================================= */

.resource-header {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #4a4a8a 0%, #2c3e50 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 20px;
}

.resource-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-icon-large img {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

.resource-title {
    flex: 1;
}

.resource-title h1 {
    margin: 0 0 5px 0;
    font-size: 2em;
}

.resource-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.resource-stats-grid > * {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.stat-card h3 {
    margin: 0 0 15px 0;
    color: #4a4a8a;
    font-size: 1.2em;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 8px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.stats-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: #555;
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    color: #2c3e50;
}

.price-value-large {
    font-size: 1.3em;
    color: #27ae60;
}

.description-section {
    margin: 30px 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.description-section h2 {
    color: #4a4a8a;
    font-size: 1.3em;
    margin-bottom: 15px;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 5px;
}

.description-text {
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ======================================= */
/* ========== ФИЛЬТРЫ ========== */
/* ======================================= */

.filters-section {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid #4a4a8a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.filters-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filters-form .search-box {
    flex: 2;
    min-width: 250px;
}

.filters-form .filter-box {
    flex: 1;
    min-width: 150px;
}

.filters-form input,
.filters-form select {
    width: 100%;
    padding: 10px 15px;
    background: #1a1a2e;
    border: 2px solid #4a4a8a;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

.filters-form input:focus,
.filters-form select:focus {
    outline: none;
    border-color: #6a6aaa;
    box-shadow: 0 0 10px rgba(74, 74, 138, 0.3);
}

.filters-form button {
    padding: 10px 25px;
    background: #4a4a8a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filters-form button:hover {
    background: #5a5aaa;
}

.clear-btn {
    padding: 10px 25px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    transition: background 0.3s ease;
}

.clear-btn:hover {
    background: #5a6268;
}

/* ======================================= */
/* ========== ПАГИНАЦИЯ ========== */
/* ======================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    background: #1a1a2e;
    border: 1px solid #4a4a8a;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #4a4a8a;
    color: white;
}

.pagination a.active {
    background: #4a4a8a;
    color: white;
    font-weight: bold;
    border-color: #6a6aaa;
}

/* ======================================= */
/* ========== ИНФОРМАЦИЯ О РЕЗУЛЬТАТАХ ========== */
/* ======================================= */

.results-info {
    margin: 15px 0;
    padding: 10px 15px;
    background: rgba(74, 74, 138, 0.2);
    border-left: 4px solid #4a4a8a;
    color: #ffffff;
    font-size: 1em;
    font-weight: 600;
    border-radius: 0 5px 5px 0;
}

/* ======================================= */
/* ========== РАСЫ ========== */
/* ======================================= */

.civil-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    color: white;
    text-align: center;
    min-width: 80px;
}

.civil-badge.all { background: #4a4a8a; }
.civil-badge.bellato { background: #28a745; }
.civil-badge.cora { background: #17a2b8; }
.civil-badge.acretia { background: #dc3545; }
.civil-badge.unknown { background: #6c757d; }

/* ======================================= */
/* ========== ХЛЕБНЫЕ КРОШКИ ========== */
/* ======================================= */

.breadcrumbs {
    margin: 15px 0 20px;
}

.breadcrumbs a {
    display: inline-block;
    padding: 8px 16px;
    background: #4a4a8a;
    color: white !important;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.breadcrumbs a:hover {
    background: #2c2c5a;
    transform: translateX(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.breadcrumbs a::before {
    content: "←";
    margin-right: 8px;
    font-weight: bold;
}

/* ======================================= */
/* ========== АДАПТИВНОСТЬ ========== */
/* ======================================= */

@media (max-width: 768px) {
    .resources-table {
        font-size: 0.85em;
    }
    
    .resources-table th,
    .resources-table td {
        padding: 8px;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .filters-form .search-box,
    .filters-form .filter-box {
        width: 100%;
    }
    
    .resource-header {
        flex-direction: column;
        text-align: center;
    }
    
    .resource-stats-grid {
        grid-template-columns: 1fr;
    }
}
/* ======================================= */
/* ========== СТАТУСЫ (РАЗРЕШЕНО/ЗАПРЕЩЕНО) ========== */
/* ======================================= */

.status-allowed {
    color: #28a745;
    font-weight: 600;
}

.status-forbidden {
    color: #dc3545;
    font-weight: 600;
}

.status-cell {
    font-size: 0.9em;
    text-align: center;
    white-space: nowrap;
}
/* ======================================= */
/* ========== КОМПАКТНЫЕ КАРТОЧКИ ========== */
/* ======================================= */

.stat-card.compact,
.effects-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stat-card.compact h3 {
    margin: 0 0 12px 0;
    font-size: 1.1em;
}

.compact-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.compact-row:last-child {
    border-bottom: none;
}

.compact-label {
    color: #555;
    font-weight: 500;
    font-size: 0.95em;
}

/* ======================================= */
/* ========== СТАТУСЫ (ДА/НЕТ) ========== */
/* ======================================= */

.status-allowed {
    color: #28a745;
    font-weight: 600;
}

.status-forbidden {
    color: #dc3545;
    font-weight: 600;
}

/* ======================================= */
/* ========== ЭФФЕКТЫ ========== */
/* ======================================= */

.effects-section {
    margin: 30px 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.effects-section h2 {
    color: #4a4a8a;
    font-size: 1.3em;
    margin-bottom: 20px;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 8px;
}

.effects-list {
    flex: 1;
}

.effect-item {
    background: #f9f9f9;
    padding: 10px 15px;
    font-size: 0.95em;
}

.effect-name {
    font-weight: 600;
    color: #333;
}

.effect-positive {
    color: #28a745;
    font-weight: 600;
}

.effect-negative {
    color: #dc3545;
    font-weight: 600;
}

.effect-max {
    font-size: 0.8em;
    color: #000000;
    font-style: italic;
    margin-left: 5px;
}
/* ======================================= */
/* ========== АДАПТИВНОСТЬ ДЛЯ КОМПАКТНЫХ КАРТОЧЕК ========== */
/* ======================================= */

@media (max-width: 768px) {
    .compact-row {
        font-size: 0.9em;
    }
    
    .compact-label {
        font-size: 0.85em;
    }
}