/* HISTORIA (TIMELINE) STYLES */

.lore-hero {
    position: relative;
    height: 60vh;
    padding-top: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.lore-header-content {
    font-family: var(--font-title);
    padding-top: 5rem;
    position: relative;
    z-index: 2;
}

.warning-badge {
    color: var(--gold);
    font-family: monospace;
    font-size: 0.8rem;
    border: 1px solid var(--gold);
    padding: 5px 15px;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.lore-hero h1 {
    letter-spacing: 3px;
    font-size: 3.5rem;
    color: #fff;
}

.lore-intro {
    color: #ccc;
    letter-spacing: 1px;
    max-width: 800px;
    margin: 1rem auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.scroll-down-icon {
    margin-top: 2rem;
    color: var(--gold);
    letter-spacing: 2px;
    font-size: 0.8rem;
    animation: pulse 2s infinite;
}

/* TIMELINE */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 5rem;
    padding-top: 5rem;
    margin-top: 2rem;
}

.fate-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--gold), #444, transparent);
    transform: translateX(-50%);
    z-index: 1;
}

/* MYSTIC EFFECTS */
.mystic-smoke {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(200, 170, 110, 0.08), transparent 80%);
    pointer-events: none;
    z-index: 1;
    animation: smokeFloat 25s ease-in-out infinite;
}

.dust-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 400px 400px;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, rgba(200, 170, 110, 0.2), rgba(0, 0, 0, 0)),
        radial-gradient(1.5px 1.5px at 50px 160px, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 80px 120px, rgba(200, 170, 110, 0.15), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 1;
    animation: dustDrift 80s linear infinite;
    opacity: 0.7;
}

@keyframes smokeFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translate(-30px, -20px) scale(1.15);
        opacity: 0.8;
    }
}

@keyframes dustDrift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 400px 800px;
    }
}

/* TIMELINE NODES */
.timeline-compact-node {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.timeline-compact-node:hover {
    transform: scale(1.02);
}

.compact-date {
    width: 40%;
    text-align: right;
    padding-right: 2rem;
    font-family: var(--font-title);
    color: #888;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.date-tag {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.act-tag {
    font-size: 0.65rem;
    color: #555;
    margin-top: 2px;
}

.timeline-compact-node:hover .compact-date {
    color: var(--gold);
}

.compact-dot {
    width: 10px;
    height: 10px;
    background: #111;
    border: 1px solid #444;
    border-radius: 50%;
    position: relative;
    z-index: 3;
    transition: all 0.3s;
}

.timeline-compact-node:hover .compact-dot {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold);
    transform: scale(1.2);
}

.compact-content {
    width: 40%;
    padding-left: 2rem;
    text-align: left;
}

.compact-title {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #ccc;
    transition: color 0.3s;
}

.timeline-compact-node:hover .compact-title {
    color: #fff;
}

.compact-badge {
    font-size: 0.6rem;
    font-family: monospace;
    border: 1px solid #333;
    padding: 2px 6px;
    color: #666;
    margin-top: 5px;
    display: inline-block;
    letter-spacing: 1px;
}

.timeline-separator {
    text-align: center;
    margin: 4rem 0;
    position: relative;
    z-index: 2;
}

.timeline-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(198, 168, 114, 0.2);
    z-index: 1;
}

.timeline-separator span {
    background: #000;
    padding: 0 20px;
    color: var(--gold);
    font-family: var(--font-title);
    letter-spacing: 3px;
    font-size: 0.9rem;
    position: relative;
    z-index: 3;
}

.timeline-compact-node.community .compact-dot {
    border-color: #8bbcd4;
}

.timeline-compact-node.community:hover .compact-dot {
    background: #8bbcd4;
    border-color: #8bbcd4;
    box-shadow: 0 0 15px #8bbcd4;
}

.timeline-compact-node.community .compact-title {
    color: #8bbcd4;
    opacity: 0.8;
}

.timeline-compact-node.community:hover .compact-title {
    opacity: 1;
}

.locked .compact-dot {
    border-style: dashed;
    opacity: 0.3;
}

.locked .compact-title {
    color: var(--act2-violet);
    opacity: 0.5;
}

.locked .compact-badge {
    border-color: var(--act2-violet);
    color: var(--act2-violet);
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #050505;
    border: 1px solid #8bbcd4;
    padding: 3rem;
    max-width: 800px;
    width: 90%;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(139, 188, 212, 0.1);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #8bbcd4;
    cursor: pointer;
    font-size: 2rem;
    font-family: serif;
}

.modal-header {
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.modal-meta {
    color: #666;
    font-family: monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.modal-content h2 {
    color: #8bbcd4;
    font-family: var(--font-title);
    letter-spacing: 3px;
    margin-top: 10px;
}

.modal-author {
    color: var(--gold);
    font-size: 0.9rem;
    font-family: var(--font-title);
    margin-top: 5px;
}

.modal-body {
    color: #ccc;
    line-height: 1.8;
    font-size: 1.1rem;
    white-space: pre-wrap;
}

.modal-footer {
    margin-top: 3rem;
    text-align: center;
}

.btn-modal-back {
    width: auto;
    padding: 10px 40px;
    border: 1px solid #333;
    background: #111;
    color: var(--bone);
    font-family: var(--font-title);
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-modal-back:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .fate-line {
        left: 20px;
    }

    .timeline-compact-node {
        justify-content: flex-start;
    }

    .compact-date {
        width: 60px;
        text-align: left;
        padding-right: 0;
        order: 2;
        padding-left: 15px;
    }

    .compact-dot {
        order: 1;
        margin-left: 15px;
    }

    .compact-content {
        width: calc(100% - 100px);
        order: 3;
        padding-left: 15px;
    }
}
