/* ======================================= */
/* ========== ТАБЛИЦА ОРУЖИЯ (СПИСОК) ========== */
/* ======================================= */

.weapons-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;
}
.weapons-table th,
.weapons-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.weapons-table th {
    background: #4a4a8a;
    font-weight: 700;
    color: white;
}
.weapons-table td {
    color: #000000;
    font-weight: 700;
}
.weapons-table td.number {
    color: #2c3e50;
    font-family: monospace;
}
.weapons-table .icon {
    width: 50px;
}
.weapons-table .icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}
.weapons-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
.weapons-table tbody tr:hover {
    background-color: #e8e8ff;
    cursor: pointer;
}

/* Бейджи значений (атака, уровень) */
.weapons-table .value-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    border: 1px solid #ddd;
}
.weapons-table .value-badge.phys { color: #c0392b; font-size: 1.2em; }
.weapons-table .value-badge.mag  { color: #2980b9; font-size: 1.2em; }
.weapons-table .value-badge.level { color: #006400; font-size: 1.2em; }

/* Грейды (цвета бейджей и текста названий в списке) */
.grade-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    color: white;
    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.Unical { background: #0dcaf0; }
.grade-badge.Elan { background: #e83e8c; }
.grade-badge.Rei { background: #198754; }
.grade-badge.Leon { background: #20c997; }
.grade-badge.PvP { background: #aa4cf0; }
.grade-badge.Guild { background: #8b0000; }

.weapons-table td strong.Type-N { color: #000000; }
.weapons-table td strong.Type-B { color: #ffc107; }
.weapons-table td strong.Type-A { color: #b19cd9; }
.weapons-table td strong.Type-C { color: #fd7e14; }
.weapons-table td strong.Relict { color: #0d6efd; }
.weapons-table td strong.Unical { color: #0dcaf0; }
.weapons-table td strong.Elan { color: #e83e8c; }
.weapons-table td strong.Rei { color: #198754; }
.weapons-table td strong.Leon { color: #20c997; }
.weapons-table td strong.PvP { color: #aa4cf0; }
.weapons-table td strong.Guild { color: #8b0000; }

/* ======================================= */
/* ========== ФИЛЬТРЫ И ПАГИНАЦИЯ ========== */
/* ======================================= */

.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;
}
.filters-form button {
    padding: 10px 25px;
    background: #4a4a8a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.filters-form button:hover { background: #5a5aaa; }
.clear-btn {
    padding: 10px 25px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}
.clear-btn:hover { background: #5a6268; }

.results-info {
    margin: 15px 0;
    padding: 10px 15px;
    background: rgba(74, 74, 138, 0.2);
    border-left: 4px solid #4a4a8a;
    color: #ffffff;
    font-weight: 600;
    border-radius: 0 5px 5px 0;
}

.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;
}
.pagination a:hover { background: #4a4a8a; color: white; }
.pagination a.active { background: #4a4a8a; font-weight: bold; }

/* ======================================= */
/* ========== ДЕТАЛЬНАЯ СТРАНИЦА ОРУЖИЯ ========== */
/* ======================================= */

.weapon-header {
    margin: 20px 0;
    padding: 25px;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.weapon-header[data-grade="0"] { background: linear-gradient(135deg, #6c757d, #495057); }
.weapon-header[data-grade="1"] { background: linear-gradient(135deg, #ffc107, #e0a800); }
.weapon-header[data-grade="2"] { background: linear-gradient(135deg, #b19cd9, #8a6bb5); }
.weapon-header[data-grade="3"] { background: linear-gradient(135deg, #fd7e14, #dc3545); }
.weapon-header[data-grade="4"] { background: linear-gradient(135deg, #0d6efd, #0b5ed7); }
.weapon-header[data-grade="5"] { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }
.weapon-header[data-grade="6"] { background: linear-gradient(135deg, #e83e8c, #d63384); }
.weapon-header[data-grade="7"] { background: linear-gradient(135deg, #198754, #146c43); }
.weapon-header[data-grade="8"] { background: linear-gradient(135deg, #20c997, #198754); }
.weapon-header[data-grade="9"] { background: linear-gradient(135deg, #aa4cf0, #8a3cc0); }
.weapon-header[data-grade="10"]{ background: linear-gradient(135deg, #8b0000, #660000); }

.weapon-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.weapon-icon-large img {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}
.weapon-title { flex: 1; }
.weapon-title h1 { margin: 0 0 5px; font-size: 2em; }
.weapon-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.weapon-type, .weapon-level {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

/* Сетка статистики */
.weapon-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.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;
    color: #4a4a8a;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 8px;
}
.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 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; }
.effect-positive { color: #28a745 !important; }
.effect-negative { color: #dc3545 !important; }
.spell-chance { color: #17a2b8 !important; }

/* Хлебные крошки */
.breadcrumbs {
    margin: 15px 0 20px;
}
.breadcrumbs a {
    display: inline-block;
    padding: 8px 16px;
    background: #4a4a8a;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: 0.3s;
}
.breadcrumbs a:hover {
    background: #2c2c5a;
    transform: translateX(-3px);
}
.breadcrumbs a::before {
    content: "←";
    margin-right: 8px;
}
.no-data {
    color: #dc3545 !important;
    text-align: center;
    padding: 40px;
}