/* ======================================= */
/* ========== ТАБЛИЦА ЩИТОВ ========== */
/* ======================================= */

.shields-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;
}

.shields-table th,
.shields-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.shields-table th {
    background: #4a4a8a;
    font-weight: 700;
    color: white;
}

.shields-table th a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.shields-table th a:hover {
    color: #ffd700;
}

.shields-table td {
    color: #000000;
    font-weight: 700;
    text-align: center;
}

.shields-table td.number {
    color: #2c3e50;
    font-weight: 700;
    font-family: monospace;
}

.shields-table .icon {
    width: 50px;
    text-align: center;
}

.shields-table .icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.shields-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.shields-table tbody tr:hover {
    background-color: #e8e8ff;
}

/* ======================================= */
/* ========== ЗНАЧЕНИЯ В ТАБЛИЦЕ ЩИТОВ ========== */
/* ======================================= */

.shields-table .value-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    background: #f0f0f0;
    border: 1px solid #ddd;
    min-width: 45px;
}

/* Уровень - зеленый */
.shields-table .value-badge.level {
    color: #006400;
    font-size: 1.1em;
}

/* Защита (в ячейке с классом number) */
.shields-table td.number {
    color: #2c3e50;
    font-weight: 700;
    font-family: monospace;
}

/* Если защиту тоже хотим в рамке */
.shields-table td.number span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #2c3e50;
}

/* Или если хотим отдельный класс для защиты */
.shields-table .value-badge.defense {
    color: #C71585;
    font-size: 1.4em;
}

/* ======================================= */
/* ========== ГРЕЙДЫ ЩИТОВ ========== */
/* ======================================= */

.shields-table .grade-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;
}

.grade-badge.Type-N { background: #6c757d; }
.grade-badge.Type-B { background: #ffc107; color: #1a1a2e; }
.grade-badge.Type-A { background: #b19cd9; color: #1a1a2e; }
.grade-badge.Type-C { background: #fd7e14; }
.grade-badge.Relict { background: #0d6efd; }
.grade-badge.Booster { background: #6610f2; }
.grade-badge.Elan { background: #e83e8c; }
.grade-badge.Rei { background: #198754; }
.grade-badge.Leon { background: #20c997; }
.grade-badge.Unical { background: #6f42c1; }
.grade-badge.Rare { background: #dc3545; }

.shields-table td strong.Type-N { color: #000000; }
.shields-table td strong.Type-B { color: #ffc107; }
.shields-table td strong.Type-A { color: #b19cd9; }
.shields-table td strong.Type-C { color: #fd7e14; }
.shields-table td strong.Relict { color: #0d6efd; }
.shields-table td strong.Booster { color: #6610f2; }
.shields-table td strong.Elan { color: #e83e8c; }
.shields-table td strong.Rei { color: #198754; }
.shields-table td strong.Leon { color: #20c997; }
.shields-table td strong.Unical { color: #6f42c1; }
.shields-table td strong.Rare { color: #dc3545; }

/* ======================================= */
/* ========== РАСЫ ========== */
/* ======================================= */

.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_cora {
    background: #28a745;
}

.civil-badge.acretia {
    background: #dc3545;
}

.civil-badge.unknown {
    background: #6c757d;
}

/* ======================================= */
/* ========== ФИЛЬТРЫ ========== */
/* ======================================= */

.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: 120px;
}

.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;
}

/* ======================================= */
/* ========== СТРАНИЦА ЩИТА ========== */
/* ======================================= */

.shield-header {
    margin: 20px 0;
    padding: 25px;
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 20px;
}

.shield-header[data-grade="0"] { background: linear-gradient(135deg, #6c757d 0%, #495057 100%); }
.shield-header[data-grade="1"] { background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%); }
.shield-header[data-grade="2"] { background: linear-gradient(135deg, #b19cd9 0%, #8a6bb5 100%); }
.shield-header[data-grade="3"] { background: linear-gradient(135deg, #fd7e14 0%, #dc3545 100%); }
.shield-header[data-grade="4"] { background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%); }
.shield-header[data-grade="5"] { background: linear-gradient(135deg, #6610f2 0%, #520dc2 100%); }
.shield-header[data-grade="6"] { background: linear-gradient(135deg, #e83e8c 0%, #d63384 100%); }
.shield-header[data-grade="7"] { background: linear-gradient(135deg, #198754 0%, #146c43 100%); }
.shield-header[data-grade="8"] { background: linear-gradient(135deg, #20c997 0%, #198754 100%); }
.shield-header[data-grade="9"] { background: linear-gradient(135deg, #6f42c1 0%, #6610f2 100%); }
.shield-header[data-grade="10"] { background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%); }

.shield-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shield-icon-large img {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

.shield-title {
    flex: 1;
}

.shield-title h1 {
    margin: 0 0 5px 0;
    font-size: 2em;
}

.shield-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.shield-level {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

.shield-code {
    display: none;
}

.shield-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.stat-card h3 {
    margin: 0 0 12px 0;
    color: #4a4a8a;
    font-size: 1.1em;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 5px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.95em;
}

.stats-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: #555;
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    color: #2c3e50;
}

/* ======================================= */
/* ========== ЭФФЕКТЫ ========== */
/* ======================================= */

/* Положительные эффекты (зеленый) */
.stats-row .effect-positive,
.stat-value .effect-positive {
    color: #28a745 !important;
    font-weight: 700;
}

/* Отрицательные эффекты (красный) */
.stats-row .effect-negative,
.stat-value .effect-negative {
    color: #dc3545 !important;
    font-weight: 700;
}

/* ======================================= */
/* ========== РАСЫ В ДЕТАЛЬНОЙ КАРТОЧКЕ ========== */
/* ======================================= */

.stat-value.civil-value {
    font-weight: 700;
}

.stat-value.civil-value.all {
    color: #4a4a8a;
}

.stat-value.civil-value.bellato_cora {
    color: #28a745;
}

.stat-value.civil-value.acretia {
    color: #dc3545;
}

/* ======================================= */
/* ========== ССЫЛКА НАЗАД ========== */
/* ======================================= */

.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;
}

/* ======================================= */
/* ========== СЕКЦИЯ ВЫПАДЕНИЯ ========== */
/* ======================================= */

.drops-section {
    margin: 30px 0;
}

.drops-section h2 {
    color: #4a4a8a;
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 5px;
}

.drops-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.drops-table th {
    background: #4a4a8a;
    color: white;
    padding: 12px;
    font-weight: 600;
    text-align: left;
}

.drops-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-weight: 500;
}

.drops-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.drops-table tbody tr:hover {
    background-color: #e8e8ff;
}

.drops-table .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.drops-table .badge.boss {
    background: #dc3545;
    color: white;
}

.drops-table .badge.elite {
    background: #ffc107;
    color: #333;
}

.drops-table .chance {
    position: relative;
    width: 150px;
    font-weight: 600;
    color: #27ae60;
}

.drops-table .chance-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(74, 74, 138, 0.15);
    z-index: 0;
}

.drops-table .chance span {
    position: relative;
    z-index: 1;
}

/* предметы не найдены текст */
.no-data {
    color: #dc3545 !important;
}