/* ===================================
   Lord of the Rings Theme - unsalaslan.me
   Full Edition
   =================================== */

:root {
    /* LOTR Color Palette */
    --lotr-dark: #1a1510;
    --lotr-brown: #2d2214;
    --lotr-gold: #c9a227;
    --lotr-copper: #b87333;
    --lotr-green: #4a7c59;
    --lotr-cream: #f5e6c8;
    --lotr-parchment: #e8d4a8;
    --lotr-silver: #c0c0c0;
    --lotr-purple: #8b5cf6;

    /* Semantic Colors */
    --bg-primary: var(--lotr-dark);
    --bg-secondary: var(--lotr-brown);
    --bg-card: rgba(45, 34, 20, 0.95);
    --accent: var(--lotr-gold);
    --accent-glow: rgba(201, 162, 39, 0.3);
    --text-primary: var(--lotr-cream);
    --text-secondary: var(--lotr-parchment);
    --text-muted: rgba(232, 212, 168, 0.6);
    --border-subtle: rgba(201, 162, 39, 0.3);

    --font-main: 'Crimson Text', Georgia, serif;
    --font-display: 'Cinzel', serif;

    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
    font-size: 18px;
}

/* Parchment Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, transparent 0%, var(--bg-primary) 70%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s, visibility 0.8s;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-ring {
    width: 80px;
    height: 80px;
    border: 3px solid var(--lotr-gold);
    border-radius: 50%;
    margin: 0 auto 2rem;
    position: relative;
    animation: ringPulse 2s ease-in-out infinite;
}

.loading-ring::before {
    content: '◇';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: var(--lotr-gold);
}

@keyframes ringPulse {

    0%,
    100% {
        box-shadow: 0 0 20px var(--accent-glow);
    }

    50% {
        box-shadow: 0 0 40px var(--accent-glow), 0 0 60px var(--accent-glow);
    }
}

.loading-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--lotr-gold);
    letter-spacing: 4px;
    text-align: center;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Chronicle Card */
.chronicle-card {
    background: linear-gradient(135deg, var(--bg-card), rgba(26, 21, 16, 0.98));
    border: 3px double var(--lotr-gold);
    padding: 3rem;
    max-width: 700px;
    width: 100%;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.chronicle-card::before {
    content: '⚜';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.25rem;
    color: var(--lotr-gold);
}

.chronicle-card::after {
    content: '⚜';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 1.25rem;
    color: var(--lotr-gold);
    transform: rotate(180deg);
}

.chronicle-label {
    text-align: center;
    color: var(--lotr-copper);
    font-size: 0.85rem;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.chronicle-title {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--lotr-gold);
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.chronicle-subtitle {
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

/* Fellowship Stats */
.fellowship-stats {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 2rem 0;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-label {
    width: 130px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.stat-track {
    flex: 1;
    height: 12px;
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--border-subtle);
    position: relative;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lotr-copper), var(--lotr-gold));
    transition: width 1.5s ease-out;
}

.stat-value {
    width: 50px;
    text-align: right;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--lotr-gold);
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--lotr-gold);
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Quote Block */
.quote-block {
    text-align: center;
    padding: 3rem 2rem;
    margin: 0 auto;
    max-width: 800px;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.quote-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 1rem;
}

.quote-author {
    color: var(--lotr-gold);
    font-size: 0.9rem;
}

/* Section Styling */
.section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lotr-gold), transparent);
}

.section-ornament {
    color: var(--lotr-gold);
    font-size: 1.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--lotr-gold);
    letter-spacing: 3px;
}

.section-subtitle {
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Journey Timeline */
.journey-scroll {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.journey-scroll::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--lotr-gold), var(--lotr-copper), transparent);
}

.journey-entry {
    padding-left: 50px;
    margin-bottom: 2.5rem;
    position: relative;
}

.journey-entry::before {
    content: '◆';
    position: absolute;
    left: 7px;
    top: 5px;
    color: var(--lotr-copper);
    font-size: 1rem;
}

.journey-entry.legendary::before {
    color: var(--lotr-gold);
}

.journey-entry.active::before {
    color: var(--lotr-green);
}

.journey-era {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--lotr-copper);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.journey-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.journey-location {
    color: var(--lotr-gold);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.lotr-link {
    color: var(--lotr-gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

.lotr-link:hover {
    text-decoration: underline;
}

.journey-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.journey-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.journey-progress {
    background: rgba(201, 162, 39, 0.1);
    height: 8px;
    position: relative;
    margin-top: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lotr-copper), var(--lotr-gold));
}

.progress-text {
    position: absolute;
    right: 0;
    top: -22px;
    font-size: 0.75rem;
    color: var(--lotr-gold);
}

/* Powers Grid */
.powers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.power-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
}

.power-card:hover {
    border-color: var(--lotr-gold);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-5px);
}

.power-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.power-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--lotr-gold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.power-rank {
    font-style: italic;
    font-size: 0.85rem;
    color: var(--lotr-copper);
    margin-bottom: 1rem;
}

.power-bar {
    height: 8px;
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--border-subtle);
    margin-bottom: 1rem;
}

.power-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lotr-copper), var(--lotr-gold));
}

.power-fill.gold {
    background: linear-gradient(90deg, var(--lotr-gold), #ffd700);
    box-shadow: 0 0 10px var(--accent-glow);
}

.power-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.power-skills span {
    background: rgba(201, 162, 39, 0.1);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Kingdoms Grid */
.kingdoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.kingdom-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    transition: var(--transition-normal);
}

.kingdom-card:hover {
    border-color: var(--lotr-copper);
}

.kingdom-card.legendary-kingdom {
    border-color: var(--lotr-gold);
    background: linear-gradient(135deg, var(--bg-card), rgba(201, 162, 39, 0.05));
}

.kingdom-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--lotr-copper);
    margin-bottom: 1rem;
}

.legendary-kingdom .kingdom-name {
    color: var(--lotr-gold);
}

.kingdom-fortresses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fortress {
    background: rgba(184, 115, 51, 0.1);
    border: 1px solid rgba(184, 115, 51, 0.3);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.fortress:hover {
    border-color: var(--lotr-copper);
    color: var(--lotr-copper);
}

.fortress.legendary {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--lotr-gold);
    color: var(--lotr-gold);
}

/* Deeds Grid */
.deeds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.deed-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-normal);
}

.deed-card:hover {
    border-color: var(--lotr-gold);
    transform: translateY(-3px);
}

.deed-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.deed-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--lotr-gold);
    margin-bottom: 0.25rem;
}

.deed-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Scrolls Grid */
.scrolls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.scroll-card {
    background: var(--bg-card);
    border: 2px solid var(--lotr-copper);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.scroll-seal {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: var(--lotr-gold);
    border-radius: 50%;
    opacity: 0.3;
}

.scroll-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.scroll-degree {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--lotr-gold);
    margin-bottom: 0.5rem;
}

.scroll-field {
    color: var(--lotr-copper);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.scroll-institution {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.scroll-focus {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Featured Section - Fellowship */
.featured-section {
    background: linear-gradient(180deg, var(--bg-primary), rgba(201, 162, 39, 0.03));
}

.fellowship-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 3px double var(--lotr-gold);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.fellowship-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.05) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fellowship-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.fellowship-badge {
    display: inline-block;
    background: var(--lotr-gold);
    color: var(--bg-primary);
    padding: 0.5rem 1.5rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.fellowship-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.fellowship-tagline {
    font-style: italic;
    color: var(--lotr-gold);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.fellowship-desc {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.fellowship-tech {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.fellowship-tech span {
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.fellowship-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary {
    background: var(--lotr-gold);
    color: var(--bg-primary);
    padding: 1rem 2rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.9rem;
    transition: var(--transition-normal);
}

.btn-primary:hover {
    background: var(--text-primary);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--lotr-gold);
    border: 2px solid var(--lotr-gold);
    padding: 1rem 2rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.9rem;
    transition: var(--transition-normal);
}

.btn-secondary:hover {
    background: rgba(201, 162, 39, 0.1);
    transform: translateY(-3px);
}

/* Quests Grid */
.quests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quest-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
}

.quest-card:hover {
    border-color: var(--lotr-copper);
    transform: translateY(-5px);
}

.quest-card.upcoming {
    border-style: dashed;
    border-color: var(--lotr-purple);
}

.upcoming-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--lotr-purple);
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.6rem;
    font-family: var(--font-display);
    letter-spacing: 1px;
}

.quest-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.quest-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.quest-type {
    font-size: 0.75rem;
    color: var(--lotr-copper);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.quest-brief {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Contact */
.contact-scroll {
    max-width: 600px;
    margin: 0 auto;
}

.parchment {
    background: rgba(201, 162, 39, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.parchment-text {
    font-style: italic;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.parchment-author {
    color: var(--lotr-gold);
    font-size: 0.9rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.contact-link:hover {
    border-color: var(--lotr-gold);
    color: var(--lotr-gold);
}

.link-icon {
    font-size: 1.25rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--border-subtle);
}

.footer-quote {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--lotr-gold);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Theme Navigation */
.theme-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
}

.theme-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.75rem;
    font-family: var(--font-display);
    transition: var(--transition-fast);
}

.theme-btn:hover {
    border-color: var(--lotr-gold);
    color: var(--lotr-gold);
}

.theme-btn.active {
    background: var(--lotr-gold);
    color: var(--bg-primary);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .chronicle-card {
        padding: 2rem 1.5rem;
    }

    .chronicle-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stats-row {
        flex-direction: column;
        gap: 1rem;
    }

    .journey-scroll::before {
        left: 8px;
    }

    .journey-entry {
        padding-left: 35px;
    }

    .journey-entry::before {
        left: 1px;
        font-size: 0.8rem;
    }

    .powers-grid,
    .kingdoms-grid,
    .scrolls-grid,
    .quests-grid {
        grid-template-columns: 1fr;
    }

    .fellowship-card {
        padding: 2rem 1.5rem;
    }

    .fellowship-title {
        font-size: 1.75rem;
    }

    .fellowship-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .theme-nav {
        bottom: 10px;
        left: 10px;
        flex-direction: column;
    }
}