﻿/* === BASE === */
body {
    background: radial-gradient(circle at top, #0d0d0d 0%, #1f2c3a 100%);
    color: #e2d3a2;
    font-family: 'Cinzel', serif;
}

html {
    scroll-behavior: smooth;
}

/* === HEADER === */
.wiki-header {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(6px);
    padding: 3rem 1rem;
    color: #e2d3a2;
    text-align: center;
    text-shadow: 0 0 15px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* === CONTAINER === */
.wiki-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    background-color: transparent;
}

/* === SIDEBAR === */
.wiki-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: fit-content;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 10;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .wiki-sidebar::-webkit-scrollbar {
        display: none;
    }

    .wiki-sidebar ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .wiki-sidebar li {
        margin-bottom: 1rem;
    }

    .wiki-sidebar a {
        display: block;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        color: #c5b88a;
        text-decoration: none;
        transition: all 0.2s ease;
    }

        .wiki-sidebar a:hover,
        .wiki-sidebar a.active {
            background-color: #2c7171;
            color: #fff;
            font-weight: bold;
            box-shadow: 0 0 10px rgba(46, 142, 142, 0.4);
        }

/* === MAIN === */
.wiki-main {
    flex-grow: 1;
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    color: #f4f4f4;
}

    .wiki-main section {
        margin-bottom: 4rem;
    }

    .wiki-main h2 {
        font-size: 1.8rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        color: #e2d3a2;
        text-shadow: 0 0 10px rgba(234, 200, 123, 0.3);
    }

/* === CARDS === */
.race-card,
.attribute-item,
.class-card,
.skill-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 5px solid #2c7171;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .race-card:hover,
    .attribute-item:hover,
    .class-card:hover,
    .skill-item:hover {
        transform: scale(1.02);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }

.lore-box {
    background: rgba(255, 255, 255, 0.02);
    border-left: 6px solid #2c7171;
    border-radius: 12px;
    padding: 2rem;
    color: #d4c7a1;
    line-height: 1.8;
    font-size: 1.05rem;
    font-family: 'Cinzel', serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    white-space: pre-wrap;
    transition: transform 0.3s ease;
}

    .lore-box:hover {
        transform: scale(1.01);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }

.character-creation-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.creation-step h3 {
    font-size: 1.6rem;
    color: #e2d3a2;
    margin-bottom: 0.5rem;
}

.creation-step p {
    color: #d4c7a1;
    line-height: 1.7;
}

.media-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.step-media {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
    flex: 1 1 45%;
    object-fit: contain;
}


/* === LISTS === */
.wiki-main ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.wiki-main li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 1rem;
    color: #ccc;
}

ul.details li::before,
.attribute-item li::before,
#tips li::before,
#invDetails::before {
    content: '🔹';
    color: #1ec6d6;
    margin-right: 0.3rem;
}

#invFeature::before {
    content: '✅';
    color: #1ec6d6;
    margin-right: 0.3rem;
}

.class-card li::before {
    content: none !important;
}

.class-card li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#tips li {
    background-color: #111;
    padding: 0.5rem 0.75rem;
    border-left: 4px solid #1ec6d6;
    border-radius: 4px;
}

/* === GRIDS === */
.race-grid,
.attribute-list,
.class-grid,
.skill-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* === IMAGES === */
.wiki-image {
    width: 100%;
    max-width: 600px;
    border-radius: 0.5rem;
    margin: 1rem auto;
    display: block;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* === LIGHTBOX === */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

    .lightbox-overlay img {
        max-width: 90%;
        max-height: 90%;
        border-radius: 8px;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
        object-fit: contain;
        background: #111;
        cursor: zoom-out;
    }

/* === ICONS === */
.race-icon,
.skill-icon,
.class-icon {
    width: 102px;
    height: 102px;
    object-fit: contain;
    display: block;
    margin-bottom: 0.5rem;
}

.skill-icon,
.class-icon,
.feature-icon{
    filter: brightness(0) saturate(100%) invert(50%) sepia(45%) saturate(300%) hue-rotate(340deg);
}

.feature-icon {
    width: 35px;
    height: 35px;
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

/* === ATTRIBUTE CIRCLES === */
.attribute-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.circle {
    width: 75px;
    text-align: center;
    color: #fff;
    font-size: 0.8rem;
}

.circle-bg {
    fill: none;
    stroke: #444;
    stroke-width: 2.8;
}

.circle-base {
    fill: none;
    stroke: #1ec6d6;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.circle-bonus {
    fill: none;
    stroke: #FFD700;
    stroke-width: 2.8;
    stroke-linecap: round;
    filter: drop-shadow(0 0 1px #FFD700);
    transition: stroke-dasharray 0.6s ease;
}

.circle-penalty {
    fill: none;
    stroke: #B22222;
    stroke-width: 2.8;
    stroke-linecap: round;
    filter: drop-shadow(0 0 1px #B22222);
    transition: stroke-dasharray 0.6s ease;
}

.circle-text {
    fill: #fff;
    font-size: 0.35rem;
    text-anchor: middle;
    dominant-baseline: middle;
}

.bonus-text {
    font-size: 0.25rem;
    fill: #ccc;
}

    .bonus-text.bonus {
        fill: #FFD700;
    }

    .bonus-text.penalty {
        fill: #B22222;
    }

.circle-label {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: #ccc;
}

/* === EXTENDED STATS === */
.extended-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 0.4rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: #eee;
}

    .extended-stats div {
        display: flex;
        align-items: center;
    }

.stat-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

/* === INVENTORY BLOCK === */
#wiki-main #inventory {
    background-color: #111;
    padding: 2rem;
    border: 1px solid #222;
    border-radius: 10px;
    box-shadow: 0 0 10px #000;
}

    #wiki-main #inventory h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        color: #1ec6d6;
    }

    #wiki-main #inventory h4 {
        margin-top: 2rem;
        font-size: 1.3rem;
        color: #ddd;
        border-bottom: 1px solid #333;
        padding-bottom: 0.3rem;
    }

.inventory-overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.inventory-text {
    max-width: 700px;
    margin: 0 auto;
}

.inventory-image {
    max-width: 600px;
    margin: 0 auto;
}

    .inventory-image img {
        width: 100%;
        border-radius: 12px;
        box-shadow: 0 0 10px rgba(0,0,0,0.3);
    }
.wiki-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 90vh;
    text-align: center;
    color: #e2d3a2;
    padding: 2rem;
    font-family: 'Cinzel', serif;
}

    .wiki-placeholder p {
        font-size: 1.1rem;
        color: #c5b88a;
        margin-bottom: 2rem;
        line-height: 1.6;
    }

.fuzzy-canvas {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    height: auto;
    display: block;
    border-radius: 12px;
}


/* === RESPONSIVE === */
@media screen and (max-width: 768px) {
    .wiki-container {
        flex-direction: column;
    }

    .wiki-sidebar {
        width: 100%;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #222;
        padding: 1rem;
    }

    .wiki-main {
        padding: 1rem;
    }

    .fuzzy-canvas {
        max-width: 100%;
        margin: 1rem auto;
        border-radius: 8px;
    }
}
