/* =========================================
           BASE STYLES & VARIABLES
========================================= */
:root {
    --bg-dark: #0a0b10;
    --surface-dark: #151620;
    --surface-light: #1f202e;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b5;
    --gold-accent: #FFD700;
    --gold-glow: rgba(255, 215, 0, 0.4);
    --border-color: #2a2b3d;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    display: flex;
    overflow-x: hidden;
    cursor: default;
    user-select: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.text-gold {
    color: var(--gold-accent);
    text-shadow: 0 0 10px var(--gold-glow);
    animation: textRadiance 4s ease-in-out infinite;
}

.divider {
    height: 2px;
    width: 60px;
    background-color: var(--gold-accent);
    margin: 1rem 0 2rem 0;
    animation: boxRadiance 4s ease-in-out infinite;
}

.text-center {
    text-align: center;
}

.dark-bg {
    background-color: var(--bg-dark);
}

/* =========================================
           GLOBAL WOVEN LIGHT AURA & SCROLLBAR
========================================= */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9997;
    animation: edgeRadiance 6s ease-in-out infinite;
}

@keyframes edgeRadiance {
    0%, 100% {
        box-shadow: inset 0 0 50px rgba(255, 215, 0, 0.05), inset 0 0 150px rgba(255, 215, 0, 0.02);
    }

    50% {
        box-shadow: inset 0 0 80px rgba(255, 215, 0, 0.15), inset 0 0 200px rgba(255, 215, 0, 0.08);
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 215, 0, 0.6);
    }

::selection {
    background: rgba(255, 215, 0, 0.3);
    color: var(--text-primary);
}


/* =========================================
           MAIN CONTENT & SECTIONS
========================================= */
.main-content {
    flex: 1;
    padding-bottom: 60px;
}

.gdd-section {
    padding: 5rem 5%;
    position: relative;
    z-index: 2;
}

    .gdd-section:not(.dark-bg) {
        background-color: var(--surface-dark);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .gdd-section p, .gdd-section ul {
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
        font-size: 1.1rem;
    }

    .gdd-section ul {
        padding-left: 2rem;
    }

    .gdd-section h2 {
        font-size: 2.2rem;
    }

    .gdd-section h3 {
        color: var(--gold-accent);
        margin: 2rem 0 1rem 0;
        font-size: 1.5rem;
    }

.btn {
    padding: 0.8rem 2rem;
    border-radius: 2px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.outline-btn {
    background-color: transparent;
    border: 1px solid var(--gold-accent);
    color: var(--gold-accent);
}

    .outline-btn:hover {
        background-color: var(--gold-accent);
        color: var(--bg-dark);
        box-shadow: 0 0 15px var(--gold-glow);
    }

/* =========================================
               HERO SECTION
========================================= */
.hero {
    position: relative;
    background: url('https://placehold.co/1920x1080/0a0b10/333333?text=RADIANT') center/cover;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Changed to flex-start for left alignment */
    min-height: 90vh;
    text-align: left;
    padding-left: 5%; /* Aligning with the rest of the page */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(10,11,16,0.6) 0%, rgba(10,11,16,1) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.subtitle {
    color: var(--gold-accent);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: bold;
}

.main-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 650px;
    position: relative;
    z-index: 2;
}

@media (max-width: 900px) {
    .main-title {
        font-size: 3rem;
    }

    .watermark-text {
        font-size: 6rem;
        left: 0;
        top: 60%;
    }
}

/* =========================================
    GDD ELEMENTS (Grids, Details, Tables)
========================================= */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--surface-light);
    padding: 2rem;
    border-radius: 4px;
    border-top: 2px solid var(--gold-accent);
}

    .card h4 {
        color: var(--gold-accent);
        margin-bottom: 1rem;
        font-size: 1.2rem;
    }

.skill-dropdown {
    background: var(--surface-light);
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

    .skill-dropdown summary {
        padding: 1.5rem;
        color: var(--text-primary);
        font-weight: bold;
        cursor: pointer;
        font-family: var(--font-heading);
        font-size: 1.2rem;
        outline: none;
    }

        .skill-dropdown summary:hover {
            color: var(--gold-accent);
        }

    .skill-dropdown ul {
        padding: 0 2rem 1.5rem 3rem;
    }

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-light);
    margin-top: 1rem;
}

    .data-table th, .data-table td {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        text-align: left;
    }

    .data-table th {
        color: var(--gold-accent);
        font-family: var(--font-heading);
        background: var(--bg-dark);
    }

    .data-table td {
        color: var(--text-secondary);
    }

/* =========================================
           CHARACTER & BESTIARY ROWS
========================================= */
.character-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.character-row {
    display: flex;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

    .character-row:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
        border-color: var(--gold-accent);
    }

.character-image {
    flex: 0 0 35%;
    max-width: 35%;
    background: #000;
}

    .character-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.character-info {
    flex: 1;
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.char-role {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

.character-info h3 {
    font-size: 2.5rem;
    margin: 0.5rem 0 1rem 0;
}

/* =========================================
           INTERACTIVE WOW FACTORS
========================================= */
.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.toggle-label {
    font-weight: bold;
    color: var(--text-secondary);
    transition: 0.3s;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

    .toggle-label.active-label {
        color: var(--gold-accent);
        text-shadow: 0 0 10px var(--gold-glow);
    }

.power-label.active-label {
    color: #8A2BE2;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #8A2BE2;
    transition: .4s;
    border-radius: 34px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

    .switch-slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
        box-shadow: 0 0 10px rgba(255,255,255,0.8);
    }

input:checked + .switch-slider {
    background-color: var(--gold-accent);
}

    input:checked + .switch-slider:before {
        transform: translateX(26px);
    }

.morality-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.5s ease;
    background: var(--surface-light);
}

.compassion-theme {
    border-color: var(--gold-accent);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1);
}

.power-theme {
    border-color: #8A2BE2;
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.1);
}

.compassion-theme h3 {
    color: var(--gold-accent);
}

.power-theme h3 {
    color: #8A2BE2;
}

.before-after-container {
    position: relative;
    max-width: 900px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--gold-accent);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.img-background, .img-foreground {
    width: 100%;
    display: block;
    object-fit: cover;
}

.img-foreground-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-right: 3px solid #fff;
    box-shadow: 5px 0 15px rgba(255, 215, 0, 0.5);
}

.img-foreground {
    width: 900px;
    height: 100%;
    max-width: none;
}

.ba-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    margin: 0;
    z-index: 10;
    cursor: ew-resize;
}

    .ba-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 40px;
        height: 100%;
        background: transparent;
        cursor: ew-resize;
    }

.ancient-scroll {
    max-width: 600px;
    margin: 2rem auto 0;
    background: #e8dcc4;
    color: #3b2f2f;
    border-radius: 4px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 1s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-top: 15px solid #8b5a2b;
    border-bottom: 15px solid #8b5a2b;
}

    .ancient-scroll.open {
        max-height: 500px;
    }

.scroll-content {
    padding: 3rem 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    font-family: 'Georgia', serif;
}

    .scroll-content h4 {
        font-family: var(--font-heading);
        font-size: 1.5rem;
        margin-bottom: 1rem;
        color: #b8860b;
        text-align: center;
    }

/* Generative Audio Button */
.music-player {
    position: fixed;
    bottom: 80px;
    left: 4px;
    z-index: 9996;
    cursor: pointer;
}

.music-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: rgba(10,11,16,0.9);
    border: 2px solid var(--gold-accent);
    border-radius: 50%;
    font-size: 1.8rem;
    box-shadow: 0 0 20px var(--gold-glow);
    transition: 0.3s;
    animation: boxRadiance 3s infinite;
}

    .music-icon:hover {
        transform: scale(1.1);
        background: var(--gold-accent);
    }

.music-playing {
    animation: pulseMusic 1s infinite alternate;
}

@keyframes pulseMusic {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px var(--gold-accent);
    }

    100% {
        transform: scale(1.1);
        box-shadow: 0 0 30px var(--gold-accent);
    }
}

/* Village Progress */
.village-progress-container {
    position: fixed;
    bottom: 0;
    width: calc(100%);
    background: rgba(10,11,16,0.95);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    z-index: 9998;
    backdrop-filter: blur(5px);
}

.village-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px var(--gold-accent));
}

.village-bar {
    flex: 1;
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #555;
}

.village-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #b8860b, var(--gold-accent));
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--gold-accent);
}

.village-text {
    font-family: var(--font-heading);
    color: var(--gold-accent);
    font-size: 1rem;
    font-weight: bold;
}

/* =========================================
              GALLERY MODAL
========================================= */
.hero-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 11, 16, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.4s ease;
    align-items: center;
    justify-content: center;
}

    .hero-modal.show {
        display: flex;
        opacity: 1;
    }

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-secondary);
    font-size: 4rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
    z-index: 10;
}

    .close-modal:hover {
        color: var(--gold-accent);
        text-shadow: 0 0 15px var(--gold-glow);
    }

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-image-container {
    flex: 1;
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #000;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

    .modal-image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: opacity 0.3s ease;
    }

.modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10,11,16,0.6);
    color: var(--gold-accent);
    border: 1px solid var(--gold-accent);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .modal-btn:hover {
        background: var(--gold-accent);
        color: var(--bg-dark);
        box-shadow: 0 0 20px var(--gold-glow);
    }

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-footer {
    text-align: center;
    padding-top: 2rem;
}

    .modal-footer h3 {
        font-size: 2rem;
        margin-bottom: 1rem;
        letter-spacing: 2px;
    }

.modal-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* =========================================
          WATER DROP TO PARTICLE
========================================= */
.radiance-drop {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    animation: dropToParticle 18s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes dropToParticle {
    0% {
        width: 0px;
        height: 0px;
        transform: translate(-50%, -50%) translateY(0);
        opacity: 1;
        background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
        border: 2px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 0 15px rgba(255, 255, 255, 1), inset 0 0 15px rgba(255, 255, 255, 1);
    }

    5% {
        width: 80px;
        height: 80px;
        transform: translate(-50%, -50%) translateY(0);
        opacity: 0.8;
        background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
        border: 2px solid rgba(255, 255, 255, 0.6);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.4);
    }

    14% {
        width: 150px;
        height: 150px;
        transform: translate(-50%, -50%) translateY(0);
        opacity: 0.6;
        background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
        border: 2px solid rgba(255, 140, 0, 0.6);
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.5), inset 0 0 30px rgba(255, 140, 0, 0.4);
    }

    17% {
        width: 12px;
        height: 12px;
        transform: translate(-50%, -50%) translateY(0);
        opacity: 0.9;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 215, 0, 0.8) 40%, transparent 80%);
        border: none;
        box-shadow: 0 0 20px rgba(255, 215, 0, 1);
        filter: blur(1px);
    }

    100% {
        width: 12px;
        height: 12px;
        transform: translate(-50%, -50%) translateY(-100vh);
        opacity: 0;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 215, 0, 0.8) 40%, transparent 80%);
        border: none;
        box-shadow: 0 0 20px rgba(255, 215, 0, 1);
        filter: blur(2px);
    }
}

.light-particle {
    position: fixed;
    bottom: -20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 215, 0, 0.6) 40%, transparent 80%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: floatUp linear forwards;
    z-index: 9996;
    filter: blur(1px);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    80% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-110vh) scale(1.5);
        opacity: 0;
    }
}

@keyframes textRadiance {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    }

    50% {
        text-shadow: 0 0 25px rgba(255, 215, 0, 0.9), 0 0 8px rgba(255, 255, 255, 0.5);
    }
}

@keyframes boxRadiance {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

footer {
    text-align: center;
    padding: 2rem;
    background: #050508;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .village-progress-container {
        left: 0;
        width: 100%;
    }

    .music-player {
        left: 20px;
    }

    .character-row {
        flex-direction: column;
    }

    .character-image {
        max-width: 100%;
        height: 350px;
    }

    .character-info {
        padding: 2rem;
    }

    .secret-project-logo {
        width: 90%;
    }
}


/* =========================================
           VERTICAL SLICE TIMELINE & CHECKLISTS
        ========================================= */
.timeline {
    border-left: 2px solid var(--gold-accent);
    padding-left: 2.2rem;
    margin: 2rem 0 2rem 1rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

    .timeline-item:last-child {
        margin-bottom: 0;
    }

    /* The glowing golden dot on the timeline */
    .timeline-item::before {
        content: '';
        position: absolute;
        left: -2.85rem; /* Aligns dot perfectly over the border line */
        top: 0.2rem;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--bg-dark);
        border: 2px solid var(--gold-accent);
        box-shadow: 0 0 10px var(--gold-glow);
        transition: 0.3s;
    }

    .timeline-item:hover::before {
        background: var(--gold-accent);
        box-shadow: 0 0 15px var(--gold-accent);
    }

.time-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold-accent);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    letter-spacing: 1px;
}

.timeline-item h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    margin-bottom: 0;
}

/* Checklist styling for the cards */
ul.checklist {
    list-style: none;
    padding-left: 0;
}

    ul.checklist li {
        position: relative;
        padding-left: 1.5rem;
        margin-bottom: 0.8rem;
        color: var(--text-secondary);
    }

        ul.checklist li::before {
            content: '✦'; /* Mystic diamond bullet point */
            position: absolute;
            left: 0;
            top: 0;
            color: var(--gold-accent);
            font-size: 1rem;
        }

        ul.checklist li strong {
            color: var(--text-primary);
        }