/* ============================
   RÚNA OLDALAK
============================ */

body.runes-page {
    margin: 0;
    min-height: 100vh;
    padding: 0 24px 60px;
    box-sizing: border-box;
    color: #eaf7ff;
    font-family: "Outfit", sans-serif;
    background-image:
        linear-gradient(180deg, rgba(2, 6, 12, 0.55), rgba(2, 6, 12, 0.75)),
        url('../image/gui_challange/background-collection.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

#runes-gallery.hidden, #runes-editor.hidden { display: none; }

.runes-view {
    min-height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
}

/* ---------- Galéria ---------- */

.runes-view-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.runes-title {
    text-align: center;
    font-family: "AOW", serif;
    font-size: 2.2rem;
    letter-spacing: 1px;
    margin: 0 0 4px;
    text-shadow: 0 0 16px rgba(176, 107, 255, 0.5);
}

.runes-subtitle {
    text-align: center;
    color: #b9d3e0;
    opacity: 0.85;
    margin: 0 0 40px;
    font-size: 0.9rem;
}

.runes-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.rune-card {
    --rune-accent: #4cd4ff;
    width: 170px;
    padding: 20px 14px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(6, 16, 28, 0.65), rgba(2, 6, 12, 0.9));
    border: 1px solid color-mix(in srgb, var(--rune-accent) 45%, transparent);
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.rune-card:hover {
    transform: translateY(-6px);
    border-color: var(--rune-accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 24px color-mix(in srgb, var(--rune-accent) 45%, transparent);
}

.rune-card-icon-wrap {
    width: 92px;
    height: 92px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--rune-accent) 25%, transparent), transparent 70%);
    border: 2px solid color-mix(in srgb, var(--rune-accent) 60%, transparent);
}

.rune-card-icon {
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rune-accent) 70%, transparent));
}

.rune-card-add .rune-card-icon-wrap {
    --rune-accent: #8fb0c4;
    border-style: dashed;
}

.rune-card-add-icon {
    width: 42%;
    height: 42%;
    object-fit: contain;
    opacity: 0.85;
}

.rune-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

/* ---------- Szerkesztő ---------- */

#runes-editor {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.rune-editor-toolbar {
    position: fixed;
    top: 112px;
    left: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rune-gold-btn {
    padding: 9px 16px;
    border-radius: 6px;
    font-family: "Outfit", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rune-gold-btn--outline {
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.55), rgba(10, 9, 6, 0.55));
    border: 1px solid #C8AA6E;
    color: #C8AA6E;
}
.rune-gold-btn--outline:hover {
    background: linear-gradient(180deg, rgba(40, 34, 22, 0.65), rgba(14, 12, 8, 0.65));
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}

.rune-gold-btn--solid {
    background: linear-gradient(180deg, #e8d3a3, #C8AA6E);
    border: none;
    color: #1a1206;
    box-shadow: 0 0 16px rgba(200, 170, 110, 0.3);
}
.rune-gold-btn--solid:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(200, 170, 110, 0.5);
}
.rune-gold-btn--solid:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(240, 230, 210, 0.55);
    cursor: not-allowed;
    box-shadow: none;
}

.rune-gold-btn--danger {
    border-color: #ff6f6f;
    color: #ff9d9d;
}
.rune-gold-btn--danger:hover {
    background: rgba(255, 77, 77, 0.15);
    box-shadow: 0 0 12px rgba(255, 77, 77, 0.3);
}
.rune-gold-btn--danger.hidden { display: none; }

#rune-page-name {
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.55), rgba(10, 9, 6, 0.55));
    border: 1px solid #C8AA6E;
    border-radius: 6px;
    padding: 9px 14px;
    color: #eaf7ff;
    font-size: 0.85rem;
    width: 220px;
}

.rune-page-summary {
    position: fixed;
    top: 162px;
    left: 24px;
    z-index: 9;
    max-width: 620px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(6, 16, 28, 0.75), rgba(2, 6, 12, 0.85));
    border: 1px solid rgba(0, 195, 255, 0.25);
}
.rune-page-summary.hidden { display: none; }

.rune-page-summary-empty {
    font-size: 0.8rem;
    color: #b9d3e0;
    opacity: 0.75;
}

.rune-page-summary-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #dcefff;
    white-space: nowrap;
}

.rune-page-summary-stat img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex: 0 0 auto;
}

.rune-page-summary-stat strong {
    color: #fff;
}

.rune-editor-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 90px;
}

.rune-banner-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 190px;
    justify-content: flex-end;
}

.rune-banner-glow {
    position: absolute;
    top: -120%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 1100px;
    background-color: #4cd4ff;
    -webkit-mask-image: url('../image/runák/runa_banner.png');
    mask-image: url('../image/runák/runa_banner.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: background-color 0.4s ease;
    pointer-events: none;
    opacity: 0.85;
}

.rune-editor-title {
    position: relative;
    font-family: "AOW", serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    margin: 0 0 12px;
    text-shadow: 0 0 12px rgba(0, 195, 255, 0.4);
}

.rune-spine-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* --- Lélek korong --- */

.rune-soul-disc {
    position: relative;
    z-index: 2;
    width: 150px;
    height: 150px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rune-soul-disc-ring {
    position: absolute;
    inset: 0;
    background-image: url('../image/runák/lélek_hatter.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.rune-soul-disc-icon {
    position: relative;
    width: 78%;
    height: 78%;
    object-fit: contain;
}

/* --- Lélek választó sor --- */

.rune-soul-row {
    position: relative;
    z-index: 5;
    margin-top: -6px;
    display: flex;
    gap: 10px;
    background: rgba(4, 10, 18, 0.92);
    border: 1px solid rgba(0, 195, 255, 0.3);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
.rune-soul-row.hidden { display: none; }

.rune-soul-option {
    --rune-accent: #4cd4ff;
    width: 68px;
    background: none;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 8px 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.45;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.rune-soul-option img { width: 34px; height: 34px; object-fit: contain; }
.rune-soul-option span { font-size: 0.65rem; text-align: center; color: #dcefff; }

.rune-soul-option:hover {
    opacity: 1;
    transform: scale(1.08);
    border-color: var(--rune-accent);
}
.rune-soul-option.is-active {
    opacity: 1;
    border-color: var(--rune-accent);
    background: color-mix(in srgb, var(--rune-accent) 18%, transparent);
}

/* --- Rúna gerinc (függőleges vonal + 3 szint) --- */

.rune-spine {
    --rune-accent: #4cd4ff;
    position: relative;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.rune-spine-line {
    position: absolute;
    top: -6%;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--rune-accent), color-mix(in srgb, var(--rune-accent) 40%, transparent));
    opacity: 0.85;
    z-index: 0;
}

.rune-tier {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    width: 100%;
}

.rune-tier-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
}

.rune-tier-row.is-open::before {
    content: "";
    position: absolute;
    left: 46px;
    right: 46px;
    top: 50%;
    height: 3px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, var(--rune-accent), transparent);
    opacity: 0.6;
    z-index: -1;
}

.rune-slot {
    position: relative;
    z-index: 1;
    width: 90px;
    height: 90px;
    background: url('../image/runák/rúna_item_hatter.png') center / contain no-repeat;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.rune-slot:disabled { cursor: not-allowed; opacity: 0.4; }
.rune-slot:not(:disabled):hover { transform: scale(1.08); }
.rune-slot.is-current { filter: drop-shadow(0 0 14px var(--rune-accent)); }

.rune-slot-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(50% 6%, 94% 50%, 50% 94%, 6% 50%);
}

/* --- Rúna hatás-tooltip (item-tooltip alaprendszer újrahasznosítva) --- */

.item-tooltip.visible {
    opacity: 1;
}

.item-tooltip-stat.has-icon {
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-tooltip-stat.has-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex: 0 0 auto;
}
