/* ============================================
   KendoCraft :: Guide (Гайд по серверу)
   Same palette as the rest of the site:
   #8a2be2 / #b967ff / #16111f
   ============================================ */

:root {
    --accent-1: #8a2be2;
    --accent-2: #b967ff;
    --surface: #16111f;
    --surface-soft: rgba(185, 103, 255, 0.06);
    --border-soft: rgba(185, 103, 255, 0.25);
    --border-strong: rgba(185, 103, 255, 0.55);

    /* Цвета редкости — как в игровых тултипах: чем выше редкость, тем ярче */
    --rarity-1: #9a9a9a;   /* обычный */
    --rarity-2: #5fd97e;   /* необычный */
    --rarity-3: #4fa8ff;   /* редкий */
    --rarity-4: #b967ff;   /* эпический */
    --rarity-5: #ffcc4d;   /* легендарный */
    --rarity-6: #ff2d55;   /* особенный */
}

/* ============================================
   Раздел "Гайд по серверу" — на главной странице
   ============================================ */

.guide-section {
    padding: 20px 0 40px;
}

.guide-title {
    text-align: center;
    font-family: 'Minecraft Ten', sans-serif;
    font-size: 2.6rem;
    letter-spacing: 0.06em;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(185, 103, 255, 0.25);
}

.guide-subtitle {
    text-align: center;
    font-family: 'MinecraftFont', sans-serif;
    color: #a79bb8;
    font-size: 1rem;
    margin-bottom: 36px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 22px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-soft);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(185, 103, 255, 0.12);
}

.guide-card img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.guide-card:hover img {
    transform: scale(1.08);
}

.guide-card span {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #f1ecf9;
    letter-spacing: 0.03em;
}

/* Заглушка для будущих разделов, которых пока нет */
.guide-card.guide-card--soon {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.guide-card.guide-card--soon span::after {
    content: " (скоро)";
    color: #766c85;
    font-weight: 400;
    font-size: 0.85em;
}

/* ============================================
   Страница списка артефактов (guide/artifacts.html)
   ============================================ */

.artifacts-page {
    padding: 60px 0 90px;
}

.artifacts-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.artifacts-title {
    font-family: 'Minecraft Ten', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.08em;
    color: #fff;
    text-shadow: 0 0 40px rgba(185, 103, 255, 0.25);
    margin-bottom: 20px;
}

.artifacts-divider {
    width: 120px;
    height: 3px;
    margin: 0 auto 22px;
    background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
    border-radius: 2px;
}

.artifacts-description {
    font-family: 'MinecraftFont', sans-serif;
    color: #cfc7dd;
    font-size: 1.05rem;
    line-height: 1.8;
}

.artifacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.artifact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 22px 16px 18px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.artifact-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(185, 103, 255, 0.16), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.artifact-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.artifact-card:hover::before {
    opacity: 1;
}

/* Обводка карточки подсвечивается цветом редкости — сразу видно ценность */
.artifact-card[data-rarity="1"] { border-color: rgba(154, 154, 154, 0.35); }
.artifact-card[data-rarity="2"] { border-color: rgba(95, 217, 126, 0.35); }
.artifact-card[data-rarity="3"] { border-color: rgba(79, 168, 255, 0.35); }
.artifact-card[data-rarity="4"] { border-color: rgba(185, 103, 255, 0.4); }
.artifact-card[data-rarity="5"] { border-color: rgba(255, 204, 77, 0.45); }
.artifact-card[data-rarity="6"] { border-color: rgba(250, 39, 25, 0.45); }

.artifact-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
    position: relative;
}

.artifact-card__name {
    position: relative;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #f1ecf9;
}

.artifact-card__stars {
    position: relative;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Пустое состояние, пока данные не заполнены */
.artifacts-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #766c85;
    font-family: 'MinecraftFont', sans-serif;
    padding: 40px 0;
}

/* ============================================
   Модалка с описанием артефакта
   ============================================ */

.artifact-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 5, 14, 0.82);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.artifact-modal.open {
    display: flex;
    animation: artifactModalIn 0.25s ease both;
}

@keyframes artifactModalIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.artifact-modal__content {
    position: relative;
    width: min(94%, 640px);
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #1c1628, var(--surface));
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 0 0 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(185, 103, 255, 0.08);
    animation: artifactCardIn 0.3s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes artifactCardIn {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.artifact-modal__screenshot-wrap {
    position: relative;
    width: 100%;
    max-height: 50vh;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
    background: #0d0a14;
    display: flex;
    justify-content: center;
}

.artifact-modal__screenshot-wrap img {
    width: 100%;
    height: 100%;
    max-height: 50vh;
    object-fit: contain;
    display: block;
}

.artifact-modal__screenshot-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--surface) 0%, transparent 55%);
}

.artifact-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(8, 5, 14, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.artifact-modal__close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.artifact-modal__body {
    padding: 22px 32px 0;
}

.artifact-modal__eyebrow {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-2);
    opacity: 0.85;
    margin-bottom: 6px;
}

.artifact-modal__title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 14px;
}

.artifact-modal__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.artifact-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    font-size: 0.85rem;
    color: #d8d2e6;
}

.artifact-stat strong {
    color: var(--accent-2);
    font-weight: 700;
}

.artifact-modal__section {
    margin-bottom: 18px;
}

.artifact-modal__section:last-child {
    margin-bottom: 0;
}

.artifact-modal__label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8f84a3;
    margin-bottom: 6px;
}

.artifact-modal__text {
    color: #d8d2e6;
    line-height: 1.75;
    font-size: 0.95rem;
}

.artifact-modal__text--empty {
    color: #6e6480;
    font-style: italic;
}

@media (max-width: 640px) {
    .artifacts-title { font-size: 2.2rem; }
    .artifact-modal__body { padding: 20px 22px 0; }
    .artifact-modal__title { font-size: 1.35rem; }
}
