html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0d1117 100%);
    color: #e0e6ff;
    padding: 40px 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 60px;
    border-bottom: 3px solid #b8860b;
    padding-bottom: 30px;
}

h1 {
    font-size: 2.8em;
    color: #ffd700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2em;
    color: #a89968;
    font-style: italic;
    margin-bottom: 15px;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 20px;
    font-size: 0.95em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-valyria {
    background: #8b0000;
}

.dot-targaryen {
    background: #d4af37;
}

.dot-civil {
    background: #c41e3a;
}

.dot-conflict {
    background: #ff6b6b;
}

.dot-prophecy {
    background: #9d4edd;
}

.timeline {
    position: relative;
    padding: 40px 0;
}



.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) .content {
    margin-left: 0;
    margin-right: 52%;
    text-align: right;
}

.timeline-item:nth-child(even) .content {
    margin-left: 52%;
    margin-right: 0;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    top: 0;
    border: 4px solid #0a0e27;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.timeline-marker:hover {
    transform: translateX(-50%) scale(1.4);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

.marker-valyria {
    background: #8b0000;
}

.marker-targaryen {
    background: #d4af37;
}

.marker-civil {
    background: #c41e3a;
}

.marker-conflict {
    background: #ff6b6b;
}

.marker-prophecy {
    background: #9d4edd;
}

.content {
    background: rgba(30, 35, 60, 0.8);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.content:hover {
    background: rgba(40, 45, 75, 0.95);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.2);
}

.year {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.era {
    font-size: 0.85em;
    color: #9d4edd;
    margin-bottom: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.title {
    font-size: 1.3em;
    color: #e0e6ff;
    margin-bottom: 10px;
    font-weight: bold;
}

.description {
    font-size: 0.95em;
    color: #b0b8d8;
    line-height: 1.6;
    margin-bottom: 12px;
}

.significance {
    font-size: 0.85em;
    color: #a89968;
    font-style: italic;
    background: rgba(139, 0, 0, 0.15);
    padding: 10px 12px;
    border-left: 3px solid #8b0000;
    margin-top: 12px;
}

.prophecy-note {
    font-size: 0.85em;
    color: #d4a5ff;
    font-style: italic;
    background: rgba(157, 78, 221, 0.15);
    padding: 10px 12px;
    border-left: 3px solid #9d4edd;
    margin-top: 8px;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag {
    background: rgba(212, 175, 55, 0.2);
    color: #ffd700;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-note {
    font-size: 0.8em;
    color: #808899;
    margin-top: 8px;
    border-top: 1px solid rgba(128, 136, 153, 0.3);
    padding-top: 8px;
}

.milestone {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid #d4af37;
    padding-left: 15px;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-marker {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .content,
    .timeline-item:nth-child(even) .content {
        margin-left: 60px;
        margin-right: 0;
        text-align: left;
    }

    h1 {
        font-size: 2em;
    }

    .legend {
        gap: 15px;
    }
}

.thematic-section {
    background: rgba(80, 20, 20, 0.3);
    border: 2px solid #8b0000;
    border-radius: 8px;
    padding: 20px;
    margin: 40px 0;
    text-align: center;
}

.thematic-title {
    color: #ff9999;
    font-size: 1.3em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.thematic-text {
    color: #d0a0a0;
    font-size: 0.95em;
    line-height: 1.6;
}

/* Table of Contents */
.toc-container {
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid #b8860b;
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    text-align: left;
}

.toc-title {
    color: #ffd700;
    text-align: center;
    margin-bottom: 15px;
    font-family: 'Georgia', serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 1.1em;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.toc-link {
    color: #e0e6ff;
    text-decoration: none;
    font-size: 0.9em;
    padding: 5px 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: rgba(212, 175, 55, 0.05);
}

.toc-link:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

/* Footer & References */
.site-footer {
    background: #050714;
    border-top: 3px solid #b8860b;
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
}

.footer-content h3 {
    color: #a89968;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.references-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.references-list a {
    color: #ffd700;
    text-decoration: none;
    font-style: italic;
    border-bottom: 1px dotted #ffd700;
    transition: color 0.3s ease;
}

.references-list a:hover {
    color: #fff;
    border-bottom-style: solid;
}

.site-footer p {
    color: #5d6582;
    font-size: 0.8em;
}

@media (max-width: 768px) {
    .toc-list {
        flex-direction: column;
        align-items: center;
    }

    .references-list {
        flex-direction: column;
        gap: 15px;
    }
}