/* ============================================
   ATTACKS PANEL — Боевые навыки (inside game-window)
   ============================================ */

.attacks-slots-info {
    font-size: 0.8em;
    color: var(--color-text-dim);
    background: rgba(0,0,0,0.25);
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

/* Секция экипированных */
.attacks-equipped-section {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.attacks-section-label {
    font-size: 0.72em;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 600;
}

/* Слоты экипированных атак */
.equipped-attacks-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.equipped-slot {
    border-radius: 6px;
    background: var(--color-panel);
    border: 2px dashed rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 64px;
}

.equipped-slot:hover {
    border-color: var(--color-accent);
    border-style: solid;
    background: rgba(155, 44, 44, 0.08);
}

.equipped-slot.filled {
    border-style: solid;
    border-color: var(--color-accent);
    background: rgba(155, 44, 44, 0.1);
}

.equipped-slot.filled:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
}

.equipped-slot .slot-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e74c3c;
    border: 1px solid rgba(0,0,0,0.3);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.equipped-slot:hover .slot-remove {
    opacity: 1;
}

.equipped-slot .slot-remove:hover {
    background: #c0392b;
    transform: scale(1.15);
}

.equipped-slot .slot-icon {
    font-size: 1.4em;
}

.equipped-slot .slot-number {
    font-size: 0.65em;
    color: var(--color-text-muted);
}

.equipped-slot .slot-name {
    font-size: 0.65em;
    color: var(--color-text);
    text-align: center;
    line-height: 1.15;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* Вкладки атак */
.attacks-tabs {
    flex-shrink: 0;
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.attack-tab {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.8em;
    font-weight: 500;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-text-dim);
    cursor: pointer;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.attack-tab:hover { 
    color: var(--color-text);
    background: rgba(155, 44, 44, 0.06);
}

.attack-tab.active {
    color: var(--color-accent-bright);
    border-bottom-color: var(--color-accent);
    background: rgba(155, 44, 44, 0.1);
}

/* Контейнер контента (одна секция — изученные атаки; полный список в Бестиарии) */
.attacks-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.attacks-content .attacks-section-label {
    margin-bottom: 8px;
}

/* Панели вкладок */
.attack-tab-panel {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
}

.attack-tab-panel.active {
    display: block;
}

.attack-tab-panel::-webkit-scrollbar {
    width: 6px;
}
.attack-tab-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}
.attack-tab-panel::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

/* Сетка атак — список вместо grid для лучшей читаемости */
.attacks-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Ячейка атаки — горизонтальная строка */
.attack-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--color-panel-light);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.attack-cell:hover {
    border-color: var(--color-accent);
    background: var(--color-panel-hover);
}

/* Атака экипирована */
.attack-cell.equipped {
    border-color: var(--color-accent);
    background: rgba(155, 44, 44, 0.12);
}

/* Атака недоступна */
.attack-cell.locked {
    opacity: 0.45;
    filter: grayscale(40%);
    cursor: not-allowed;
}

.attack-cell.locked:hover {
    border-color: var(--color-border);
    background: var(--color-panel-light);
}

/* Иконка атаки */
.attack-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
}

/* Цвета элементов */
.attack-icon.physical { background: linear-gradient(135deg, #5a5a5a, #3a3a3a); border-color: #6a6a6a; }
.attack-icon.fire { background: linear-gradient(135deg, #ff6b35, #cc4400); border-color: #ff8855; }
.attack-icon.water { background: linear-gradient(135deg, #4dabf7, #1c7ed6); border-color: #74c0fc; }
.attack-icon.earth { background: linear-gradient(135deg, #8b7355, #5c4d3d); border-color: #a08060; }
.attack-icon.air { background: linear-gradient(135deg, #a0e8ff, #74c0fc); border-color: #c5f0ff; }
.attack-icon.life { background: linear-gradient(135deg, #51cf66, #2f9e44); border-color: #69db7c; }
.attack-icon.shadow { background: linear-gradient(135deg, #845ef7, #5f3dc4); border-color: #9775fa; }

/* Информация об атаке */
.attack-cell-info {
    flex: 1;
    min-width: 0;
}

.attack-name {
    font-size: 0.82em;
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attack-cell-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

/* Характеристики атаки */
.attack-stats {
    display: flex;
    gap: 10px;
    font-size: 0.72em;
    flex-shrink: 0;
}

.attack-stat {
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.attack-stat.power { color: #ff6b6b; }
.attack-stat.mp { color: #74c0fc; }

/* Кнопка действия */
.attack-action-btn {
    padding: 4px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: rgba(0,0,0,0.2);
    color: var(--color-text-dim);
    font-size: 0.7em;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.attack-action-btn:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

.attack-action-btn.unequip-btn {
    color: #ff6b6b;
    border-color: rgba(255,107,107,0.3);
}

.attack-action-btn.unequip-btn:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

/* Бейдж элемента */
.attack-element-tag {
    font-size: 0.65em;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Бейдж «Экипировано» */
.attack-equipped-badge {
    font-size: 0.6em;
    color: var(--color-accent-bright);
    background: rgba(155, 44, 44, 0.15);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
}

/* Пустое состояние */
.attacks-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--color-text-dim);
}

.attacks-empty-icon {
    font-size: 2.4em;
    margin-bottom: 8px;
    opacity: 0.4;
}

.attacks-empty-text {
    font-size: 0.85em;
    line-height: 1.5;
}

/* Скрываем старый бейдж типа */
.attack-type-badge {
    display: none;
}

/* ============================================
   ATTACK TOOLTIP
   ============================================ */
.attack-tooltip {
    position: fixed;
    z-index: 10001;
    background: var(--color-panel);
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    padding: 12px 14px;
    min-width: 200px;
    max-width: 280px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(155, 44, 44, 0.15);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.attack-tooltip.visible {
    opacity: 1;
}

.attack-tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

.attack-tooltip-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
}

.attack-tooltip-name {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--color-text);
}

.attack-tooltip-element {
    font-size: 0.75em;
    color: var(--color-text-dim);
}

.attack-tooltip-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.attack-tooltip-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
}

.attack-tooltip-stat-label {
    color: var(--color-text-dim);
}

.attack-tooltip-stat-value {
    color: var(--color-text);
    font-weight: 500;
}

.attack-tooltip-stat-value.power { color: #ff6b6b; }
.attack-tooltip-stat-value.mp { color: #74c0fc; }

.attack-tooltip-effect {
    font-size: 0.75em;
    color: var(--color-accent-bright);
    padding: 6px 8px;
    background: rgba(155, 44, 44, 0.1);
    border-radius: 4px;
    margin-top: 6px;
    line-height: 1.4;
}

.attack-tooltip-debuffs {
    margin-top: 6px;
    font-size: 0.75em;
    padding: 6px 8px;
    background: rgba(132, 94, 247, 0.1);
    border-radius: 4px;
    color: #b794f4;
    line-height: 1.4;
}
