/* ======================================= */
/* ========== ТАБЛИЦА МОНСТРОВ ========== */
/* ======================================= */

.monsters-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;
}

.monsters-table th,
.monsters-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.monsters-table th {
    background: #4a4a8a;
    font-weight: 700;
    color: white;
}

.monsters-table th a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.monsters-table th a:hover {
    color: #ffd700;
}

.monsters-table td {
    color: #000000;
    font-weight: 700;
}

.monsters-table td.number {
    color: #2c3e50;
    font-weight: 700;
    font-family: monospace;
}

.monsters-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.monsters-table tbody tr:hover {
    background-color: #e8e8ff;
    cursor: pointer;
}

/* ======================================= */
/* ========== БЕЙДЖИ ========== */
/* ======================================= */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 8px;
}

.badge.boss {
    background: #dc3545;
    color: white;
}

.badge.elite {
    background: #ffc107;
    color: #333;
}

/* ======================================= */
/* ========== СТИХИИ ========== */
/* ======================================= */

.elements {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.element {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    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; }

/* ======================================= */
/* ========== ПАГИНАЦИЯ ========== */
/* ======================================= */

.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;
}

/* ======================================= */
/* ========== СТРАНИЦА МОНСТРА ========== */
/* ======================================= */

.monster-header {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #4a4a8a 0%, #2c2c5a 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.monster-header .grade-badge {
    margin: 0;
}

/* ======================================= */
/* ========== ХЛЕБНЫЕ КРОШКИ ========== */
/* ======================================= */

.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;
}

/* ======================================= */
/* ========== КАРТОЧКИ СТАТИСТИКИ ========== */
/* ======================================= */

.monster-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.stat-card h3 {
    margin: 0 0 15px 0;
    color: #4a4a8a;
    font-size: 1.3em;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 8px;
    font-weight: 700;
}

.stat-card.compact {
    padding: 15px;
}

.stat-card.compact h3 {
    margin: 0 0 12px 0;
    font-size: 1.1em;
}

.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.fire .stat-value { color: #c0392b; }
.stats-row.water .stat-value { color: #2980b9; }
.stats-row.earth .stat-value { color: #27ae60; }
.stats-row.wind .stat-value { color: #16a085; }

/* ======================================= */
/* ========== ГРЕЙДЫ ========== */
/* ======================================= */

.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.normal { background: #6c757d; }
.grade-badge.elite { background: #ffc107; color: #1a1a2e; }
.grade-badge.boss { background: #dc3545; }
.grade-badge.rare { background: #17a2b8; }
.grade-badge.legendary { background: #28a745; }
.grade-badge.mythic { background: #6610f2; }
.grade-badge.solo { background: #ffc107; color: #000; }

.monster-header .grade-badge {
    font-size: 1.2em;
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ======================================= */
/* ========== ЛУТ (ПО ГРУППАМ) ========== */
/* ======================================= */

.loot-section {
    margin: 30px 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.loot-section h2 {
    color: #4a4a8a;
    font-size: 1.3em;
    margin-bottom: 20px;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 8px;
}

.loot-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loot-group {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.loot-group-header {
    background: #4a4a8a;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.loot-group-title {
    font-weight: 600;
    font-size: 0.9em;
}

.loot-group-chance {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 1.0em;
}

.loot-group-items {
    display: flex;
    gap: 20px;
    padding: 15px;
}

.loot-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loot-cell {
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    border-bottom: 1px solid #e0e0e0;
    color: #000;
}

.loot-cell:last-child {
    border-bottom: none;
}

.loot-item-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.loot-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    vertical-align: middle;
}
/* ======================================= */
/* ========== КАЛЬКУЛЯТОР ЛУТА ========== */
/* ======================================= */

.calculator-block {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    border: 1px solid rgba(74, 74, 138, 0.5);
    transition: all 0.3s ease;
}

.calculator-header {
    background: linear-gradient(135deg, #2c2c5a 0%, #1a1a3e 100%);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.calculator-header:hover {
    background: linear-gradient(135deg, #3a3a6e 0%, #2a2a4e 100%);
}

.calculator-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #ffd966;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.calculator-toggle {
    font-size: 1.3rem;
    color: #ffd966;
    font-weight: bold;
    transition: transform 0.3s;
    display: inline-block;
}

.calculator-body {
    padding: 55px;
    transition: all 0.3s;
}

.calc-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 130px;
}

.calc-field {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.calc-field label {
    display: block;
    margin-bottom: 8px;
    color: #d4d4dc;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.calc-field input {
    width: 100%;
    padding: 12px 15px;
    background: #0f0f1a;
    border: 2px solid #4a4a8a;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.calc-field input:focus {
    border-color: #ffd966;
    box-shadow: 0 0 0 3px rgba(255,217,102,0.2);
}

.calc-btn {
    background: linear-gradient(135deg, #4a4a8a 0%, #2c2c5a 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74,74,138,0.4);
    background: linear-gradient(135deg, #5c5caa 0%, #3c3c6a 100%);
}

.calc-btn:active {
    transform: translateY(0);
}

/* Подсказки */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 2px solid #4a4a8a;
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a4a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.suggestion-item:hover {
    background: #2a2a4e;
    transform: translateX(5px);
}

.suggestion-name {
    font-weight: 600;
    color: #fff;
}

.suggestion-grade {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.suggestion-grade.normal { background: #6c757d; color: white; }
.suggestion-grade.elite { background: #ffc107; color: #1a1a2e; }
.suggestion-grade.boss { background: #dc3545; color: white; }
.suggestion-grade.rare { background: #17a2b8; color: white; }
.suggestion-grade.legendary { background: #28a745; color: white; }
.suggestion-grade.mythic { background: #6610f2; color: white; }
.suggestion-grade.solo { background: #FFA500; color: #FFA500; }

.suggestion-no {
    padding: 15px;
    text-align: center;
    color: #aaa;
}

/* Результаты */
.calc-result {
    margin-top: 25px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calc-loading {
    text-align: center;
    padding: 40px;
    background: rgba(26,26,46,0.8);
    border-radius: 16px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #4a4a8a;
    border-top-color: #ffd966;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.calc-result-header {
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-badge {
    background: linear-gradient(135deg, #2c2c5a 0%, #1a1a3e 100%);
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    color: #ffd966;
}

.calc-group {
    background: rgba(26,26,46,0.6);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(74,74,138,0.3);
    transition: all 0.3s;
}

.calc-group:hover {
    border-color: rgba(74,74,138,0.8);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.calc-group-header {
    background: linear-gradient(135deg, #1e1e32 0%, #151528 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #4a4a8a;
}

.group-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.group-number {
    background: #4a4a8a;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.group-chance {
    font-weight: bold;
    color: #ffd966;
}

.group-rolls {
    color: #070;
    font-size: 1.2rem;
    font-weight: bold;
}

.calc-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    padding: 20px;
}

.calc-item {
    background: rgba(15,15,26,0.6);
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.calc-item:hover {
    transform: translateX(5px);
    background: rgba(30,30,50,0.8);
    border-color: #4a4a8a;
}

.calc-item-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-item-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-icon {
    font-size: 1.5rem;
}

.calc-item-info {
    flex: 1;
}

.calc-item-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.calc-item-qty {
    color: #ffd966;
    font-size: 0.85rem;
    font-weight: bold;
}

.calc-error, .calc-empty {
    text-align: center;
    padding: 40px;
    background: rgba(26,26,46,0.8);
    border-radius: 16px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.empty-hint {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 8px;
}

/* Быстрые кнопки в таблице */
.quick-calc-btn {
    background: linear-gradient(135deg, #4a4a8a 0%, #2c2c5a 100%);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    color: white;
}

.quick-calc-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(74,74,138,0.4);
}

.calc-action {
    text-align: center;
}

/* Уведомления */
.calc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 10px;
    background: #1a1a2e;
    color: white;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
    display: none;
}

.calc-notification.warning {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.calc-notification.info {
    background: linear-gradient(135deg, #4a4a8a 0%, #2c2c5a 100%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* ======================================= */
/* ========== ИНФО БЛОК УРОВНИ ========== */
/* ======================================= */

.level-impact-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    margin: 15px 0 20px;
    padding: 0;
    border: 1px solid rgba(74, 74, 138, 0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    overflow: hidden;
}

.impact-header {
    background: linear-gradient(135deg, #2c2c5a 0%, #1a1a3e 100%);
    padding: 10px 15px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffd966;
    text-align: center;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #4a4a8a;
}

.impact-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.impact-col {
    flex: 1;
    padding: 12px 15px;
    min-width: 220px;
}

.impact-col.positive {
    background: rgba(40, 167, 69, 0.08);
    border-right: 1px solid rgba(74, 74, 138, 0.3);
}

.impact-col.negative {
    background: rgba(220, 53, 69, 0.05);
}

.impact-col-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.impact-col.positive .impact-col-title {
    color: #8bc34a;
}

.impact-col.negative .impact-col-title {
    color: #ffa726;
}

.impact-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.impact-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.75rem;
    padding: 3px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
}

.impact-row span:first-child {
    color: #ccc;
    font-weight: 500;
}

.impact-row span:last-child {
    color: #ffd966;
    font-weight: 600;
    font-family: monospace;
}

.impact-note {
    font-size: 0.7rem;
    color: #aaa;
    text-align: center;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Адаптивность */
@media (max-width: 640px) {
    .impact-columns {
        flex-direction: column;
    }
    .impact-col.positive {
        border-right: none;
        border-bottom: 1px solid rgba(74, 74, 138, 0.3);
    }
    .impact-row {
        font-size: 0.7rem;
    }
    .impact-header {
        font-size: 0.85rem;
    }
}
/* ======================================= */
/* ========== АДАПТИВНОСТЬ ========== */
/* ======================================= */

@media (max-width: 768px) {
    .monsters-table {
        font-size: 0.85em;
    }
    
    .monsters-table th,
    .monsters-table td {
        padding: 8px;
    }
    
    .monster-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .loot-group-items {
        flex-direction: column;
        gap: 10px;
    }
    
    .loot-group-header {
        flex-direction: column;
        text-align: center;
    }
    
    .breadcrumbs a {
        font-size: 0.9em;
        padding: 6px 12px;
    }
}

.no-data {
    color: #dc3545 !important;
}