/* ===== artifact-info.css – портальный стиль страницы предмета ===== */

/* Импорт основных переменных (если не подключены глобально) */
@import url('../main.css');

/* Фон страницы – прозрачный, так как основной фон задан в main.css (банк-бг) */
.bgnew {
    background: transparent !important;
    min-height: 100vh;
    position: relative;
}

/* Убираем старую декоративную сетку, она теперь в bank-bg__decor */
.bgnew::before {
    display: none !important;
}

/* Основной контейнер – портальная карточка */
.artifact-container {
    max-width: 850px;
    margin: 20px auto;
    padding: 25px;
    background: var(--chat-bg, rgba(26, 17, 12, 0.35));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: var(--chat-border, 1.5px solid #8b5a2b);
    box-shadow: var(--chat-shadow, 0 10px 25px rgba(0,0,0,0.7)), inset 0 0 20px rgba(212,175,55,0.08);
    color: var(--chat-text, #f5e6d3);
    font-family: var(--chat-font, 'Palatino Linotype', 'Book Antiqua', Palatino, serif);
    transition: var(--chat-transition, all 0.3s ease);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

.artifact-container:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,175,55,0.4), inset 0 0 30px rgba(212,175,55,0.12);
}

/* Декоративная линия сверху */
.artifact-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, #8b4513, #d4af37, transparent);
    z-index: 1;
}

/* Заголовок предмета */
.artifact-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.3);
}

.artifact-icon-container {
    flex-shrink: 0;
}

.artifact-icon-frame {
    width: 104px;
    height: 104px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 2px solid #8b5a2b;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}

.artifact-icon-frame:hover {
    transform: translateY(-3px);
    border-color: #d4af37;
    box-shadow: 0 10px 20px rgba(0,0,0,0.6), 0 0 15px rgba(255,215,0,0.3);
}

.artifact-icon {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px black);
}

.artifact-info-main {
    flex: 1;
}

.artifact-name-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.artifact-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd966;
    margin: 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.2);
    line-height: 1.2;
}

.grind-level {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2ecc71;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}

.grind-level.negative {
    color: #e74c3c;
    text-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

.artifact-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #d2b48c;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-label {
    opacity: 0.8;
}

.meta-value {
    font-weight: 600;
    color: #f0e6d2;
}

/* Флаги предмета */
.artifact-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.artifact-flag {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #8b5a2b;
    color: #e0d0b8;
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.artifact-flag:hover {
    transform: translateY(-1px);
    border-color: #d4af37;
    box-shadow: 0 0 10px gold;
    color: #ffd966;
}

.flag-bound { background: linear-gradient(145deg, #8b0000, #5a1a1a); border-color: #c0392b; color: #ffb3b3; }
.flag-tradeable { background: linear-gradient(145deg, #1e7a46, #145a32); border-color: #27ae60; color: #ccffcc; }
.flag-clan { background: linear-gradient(145deg, #6b2d8b, #4a1d63); border-color: #9b59b6; color: #e6ccff; }
.flag-boe { background: linear-gradient(145deg, #b85b14, #8a420c); border-color: #e67e22; color: #ffe0b3; }
.flag-noweight { background: linear-gradient(145deg, #1a5276, #0e3a5c); border-color: #3498db; color: #cce5ff; }
.flag-nosell { background: linear-gradient(145deg, #4a5c5c, #2e3b3b); border-color: #7f8c8d; color: #d9d9d9; }
.flag-cant-cold { background: linear-gradient(145deg, #1a6f73, #0e4f52); border-color: #2DA5AB; color: #cceeff; }

/* Время жизни */
.time-remaining {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #8b5a2b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffd966;
    font-weight: 600;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
}

.time-icon {
    font-size: 1.2rem;
}

/* Секции информации */
.info-section {
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1.5px solid #8b5a2b;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.info-section:hover {
    border-color: #d4af37;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 0 15px rgba(212,175,55,0.2);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #a0522d;
}

.section-icon {
    font-size: 1.6rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffd966;
    margin: 0;
    text-shadow: 1px 1px 2px black;
}

/* Сетка характеристик */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(44, 30, 21, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(139, 90, 43, 0.4);
    transition: all 0.2s ease;
}

.stat-row:hover {
    background: rgba(60, 40, 30, 0.8);
    border-color: #b8860b;
    transform: translateX(4px);
}

.stat-name {
    font-weight: 500;
    color: #d2b48c;
}

.stat-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #ffffff;
}
.desc-value {
    display: block;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #ffffff;
}

.base-value {
    color: #ffd966;
}

.enchant-bonus {
    color: #e74c3c;
    font-size: 0.9em;
}

.grind-bonus {
    color: #2ecc71;
    font-size: 0.9em;
}

/* Прочность */
.durability-display {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.durability-text {
    font-weight: 600;
    min-width: 65px;
    color: #ffd966;
}

.durability-bar {
    flex: 1;
    height: 10px;
    background: #2b1e0e;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #8b5a2b;
}

.durability-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.durability-high { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.durability-medium { background: linear-gradient(90deg, #f39c12, #f1c40f); }
.durability-low { background: linear-gradient(90deg, #e74c3c, #c0392b); }

/* Эффекты и заклинания */
.effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.effect-card {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    padding: 16px;
    border: 1.5px solid #8b5a2b;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.effect-card:hover {
    transform: translateY(-4px);
    border-color: #d4af37;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6), 0 0 15px rgba(255,215,0,0.3);
    background: rgba(60,40,30,0.6);
}

.effect-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    border: 2px solid #b8860b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.effect-icon img {
    max-width: 40px;
    max-height: 40px;
}

.effect-name {
    font-weight: 600;
    color: #ffd966;
    margin-bottom: 6px;
    font-size: 1rem;
}

.effect-description {
    color: #c0b09a;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Комплект */
.set-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 16px;
}

.set-item {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    padding: 16px;
    border: 1.5px solid #8b5a2b;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.set-item:hover {
    transform: translateY(-4px);
    border-color: #d4af37;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6), 0 0 15px rgba(255,215,0,0.3);
    background: rgba(60,40,30,0.6);
}

.set-item.equipped {
    border-color: #27ae60;
    background: rgba(39,174,96,0.15);
    box-shadow: 0 0 15px rgba(39,174,96,0.3);
}

.set-item-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    border: 2px solid #b8860b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.set-item-icon img {
    max-width: 40px;
    max-height: 40px;
}

.set-item-name {
    font-weight: 600;
    color: #ffd966;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.set-bonus {
    margin-top: 20px;
    padding: 18px;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    border: 1px solid #8b5a2b;
    backdrop-filter: blur(4px);
}

.set-bonus-title {
    font-weight: 600;
    color: #ffd966;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Цвета качества предметов */
.quality-0 { color: #acacac; }
.quality-1 { color: #38b728; }
.quality-2 { color: #0070dd; }
.quality-3 { color: #a335ee; }
.quality-4 { color: #ee3557; }
.quality-5 { color: #3ad3d3; }
.quality-6 { color: #ff8000; }
.quality-7 { color: #400d65; }

/* Индикаторы на иконке */
.icon-indicator {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 10;
}

.count-indicator {
    top: -6px;
    right: -6px;
    background: linear-gradient(145deg, #8d886f, #4f3a0b);
    color: white;
    padding: 3px 7px;
    min-width: 35px;
    height: 35px;
    font-size: 1.25rem;
    border: 2px solid #9f924f;
    box-shadow: 0 2px 6px black;
}

.enchant-indicator {
    bottom: -6px;
    right: -6px;
    background: rgba(0,0,0,0.8);
    color: #ffd700;
    padding: 2px 6px;
    font-size: 0.7rem;
    border: 1.5px solid #b8860b;
    border-radius: 12px;
}

/* Ссылки */
a.macros_artifact_quality0,
a.macros_artifact_quality1,
a.macros_artifact_quality2,
a.macros_artifact_quality3,
a.macros_artifact_quality4,
a.macros_artifact_quality5,
a.macros_artifact_quality6,
a.macros_artifact_quality7 {
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.2s;
}
a.macros_artifact_quality0:hover,
a.macros_artifact_quality1:hover,
a.macros_artifact_quality2:hover,
a.macros_artifact_quality3:hover,
a.macros_artifact_quality4:hover,
a.macros_artifact_quality5:hover,
a.macros_artifact_quality6:hover,
a.macros_artifact_quality7:hover {
    text-decoration: underline !important;
    filter: brightness(1.2);
}

/* Анимация */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .artifact-container {
        margin: 12px;
        padding: 18px;
    }
    .artifact-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .effects-grid{
        grid-template-columns: 1fr;
    }
}