/* ======================================= */
/* ========== ТАБЛИЦА КОЛЕЦ ========== */
/* ======================================= */

.rings-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;
}

.rings-table th,
.rings-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.rings-table th {
    background: #4a4a8a;
    font-weight: 700;
    color: white;
}

.rings-table td {
    color: #000000;
    font-weight: 700;
    text-align: center;
}

.rings-table .icon {
    width: 50px;
}

.rings-table .icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.rings-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.rings-table tbody tr:hover {
    background-color: #e8e8ff;
    cursor: pointer;
}

/* ======================================= */
/* ========== ГРЕЙДЫ ========== */
/* ======================================= */

.rings-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.Arhont { background: #6610f2; }
.grade-badge.CashShop { background: #e83e8c; }
.grade-badge.Rei { background: #198754; }
.grade-badge.Leon { background: #20c997; }
.grade-badge.Unical { background: #6f42c1; }
.grade-badge.Rare { background: #dc3545; }

.rings-table td strong.Type-N { color: #000000; }
.rings-table td strong.Type-B { color: #ffc107; }
.rings-table td strong.Type-A { color: #b19cd9; }
.rings-table td strong.Type-C { color: #fd7e14; }
.rings-table td strong.Relict { color: #0d6efd; }
.rings-table td strong.Arhont { color: #6610f2; }
.rings-table td strong.CashShop { color: #e83e8c; }
.rings-table td strong.Rei { color: #198754; }
.rings-table td strong.Leon { color: #20c997; }
.rings-table td strong.Unical { color: #6f42c1; }
.rings-table td strong.Rare { color: #dc3545; }

/* ======================================= */
/* ========== ЗНАЧЕНИЯ ========== */
/* ======================================= */

.rings-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;
}

.rings-table .value-badge.level {
    color: #006400;
    font-size: 1.1em;
}

.rings-table td.property-value {
    font-family: monospace;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

/* ======================================= */
/* ========== РАСЫ ========== */
/* ======================================= */

.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: 70px;
}

.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; }

.stat-value.civil-value.all { color: #4a4a8a; }
.stat-value.civil-value.bellato { color: #28a745; }
.stat-value.civil-value.cora { color: #17a2b8; }
.stat-value.civil-value.acretia { color: #dc3545; }

/* ======================================= */
/* ========== ФИЛЬТРЫ ========== */
/* ======================================= */

.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 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; }

/* ======================================= */
/* ========== ПАГИНАЦИЯ ========== */
/* ======================================= */

.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; }

.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;
}

/* ======================================= */
/* ========== ДЕТАЛЬНАЯ СТРАНИЦА ========== */
/* ======================================= */

.ring-header {
    margin: 20px 0;
    padding: 25px;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ring-header[data-grade="0"] { background: linear-gradient(135deg, #6c757d, #495057); }
.ring-header[data-grade="1"] { background: linear-gradient(135deg, #ffc107, #e0a800); }
.ring-header[data-grade="2"] { background: linear-gradient(135deg, #b19cd9, #8a6bb5); }
.ring-header[data-grade="3"] { background: linear-gradient(135deg, #fd7e14, #dc3545); }
.ring-header[data-grade="4"] { background: linear-gradient(135deg, #0d6efd, #0b5ed7); }
.ring-header[data-grade="5"] { background: linear-gradient(135deg, #6610f2, #520dc2); }
.ring-header[data-grade="6"] { background: linear-gradient(135deg, #e83e8c, #d63384); }
.ring-header[data-grade="7"] { background: linear-gradient(135deg, #198754, #146c43); }
.ring-header[data-grade="8"] { background: linear-gradient(135deg, #20c997, #198754); }
.ring-header[data-grade="9"] { background: linear-gradient(135deg, #6f42c1, #6610f2); }
.ring-header[data-grade="10"] { background: linear-gradient(135deg, #dc3545, #bb2d3b); }

.ring-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-icon-large img {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

.ring-title { flex: 1; }
.ring-title h1 { margin: 0 0 5px; font-size: 2em; }

.ring-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ring-level {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

.ring-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    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;
    color: #4a4a8a;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 5px;
}

.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; }

.elements { display: flex; gap: 10px; flex-wrap: wrap; }

.element {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    background: #f0f0f0;
    border: 1px solid #ddd;
    font-weight: 600;
}

.element.fire { color: #c0392b; }
.element.water { color: #2980b9; }
.element.earth { color: #27ae60; }
.element.wind { color: #16a085; }

/* Эффекты */
.effect-positive { color: #28a745 !important; font-weight: 700; }
.effect-negative { color: #dc3545 !important; font-weight: 700; }

/* Хлебные крошки */
.breadcrumbs { margin: 15px 0 20px; }
.breadcrumbs a {
    display: inline-block;
    padding: 8px 16px;
    background: #4a4a8a;
    color: white !important;
    text-decoration: none;
    border-radius: 30px;
}
.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; }

@media (max-width: 768px) {
    .rings-table { font-size: 0.8em; }
    .rings-table td.property-value { font-size: 0.85em; white-space: normal; }
    .ring-header { flex-direction: column; text-align: center; }
    .ring-meta { justify-content: center; }
    .rings-stats-grid { grid-template-columns: 1fr; }
}