/* 
 * TESSAWORLD.COM - Hytale Premium Theme v3.0 (The "Void" Update)
 * Designed for immersion, cinematic experience, and professional polish.
 */

:root {
    /* --- PALETTE: THE VOID & MAGIC --- */
    --void-deep: #050810;
    /* Deepest Black/Blue */
    --void-bg: #0b1021;
    /* Main Background */
    --void-card: #151b2e;
    /* Card Background */

    --accent-cyan: #00e5ff;
    /* Magic / Tech */
    --accent-gold: #fbbf24;
    /* Legendary / Prestige */
    --accent-purple: #8b5cf6;
    /* Void Magic */

    --text-primary: #f1f5f9;
    /* Starlight White */
    --text-secondary: #94a3b8;
    /* Muted Slate */
    --text-muted: #64748b;
    /* Darker Slate */

    /* --- GLASSMORPHISM --- */
    --glass-bg: rgba(21, 27, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shine: rgba(255, 255, 255, 0.03);

    /* --- GLOWS --- */
    --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.3);
    --glow-gold: 0 0 20px rgba(251, 191, 36, 0.3);

    /* --- TYPOGRAPHY --- */
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Lato', sans-serif;

    /* --- SPACING & UI --- */
    --navbar-height: 80px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* --- LEGACY ALIASES --- */
    --tessa-gold: var(--accent-gold);
    --tessa-blue: var(--accent-cyan);
}

/* --- RESET & BASICS --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--void-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    margin: 0;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--void-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--void-card);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h3 {
    font-size: 1.75rem;
    color: var(--accent-cyan);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* --- LAYOUT WRAPPER --- */
.website-wrapper {
    background-color: var(--void-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
    /* Fix horizontal scroll */
    position: relative;
    /* Ensure it contains absolutes */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 229, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 40%);
}

/* --- NAVBAR (Floating Glass) --- */
.navbar-tessa {
    background: rgba(11, 16, 33, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    height: var(--navbar-height);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff !important;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-family: var(--font-heading);
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0.8rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language Switcher */
.btn-lang-switch {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-lang-switch:hover {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #000;
    box-shadow: var(--glow-cyan);
}

/* --- HERO SECTION (Cinematic) --- */
.hero-section {
    position: relative;
    height: 85vh;
    /* Taller, more cinematic */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax feel */
    overflow: hidden;
    margin-top: -80px;
    /* Pull behind navbar */
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(5, 8, 16, 0.3) 0%,
            rgba(5, 8, 16, 0.6) 50%,
            var(--void-bg) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* --- BUTTONS (RPG Style) --- */
.btn-tessa {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #00bcd4 100%);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    padding: 1rem 3.5rem;
    border: none;
    border-radius: 2px;
    position: relative;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 1px;
}

.btn-tessa:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
    color: #000;
}

.btn-outline-tessa {
    background: transparent;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 0.8rem 2.5rem;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline-tessa::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #fff;
    z-index: -1;
    transition: all 0.3s ease;
}

.btn-outline-tessa:hover {
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-outline-tessa:hover::before {
    width: 100%;
}

/* --- UTILITIES & OVERRIDES --- */
.text-muted {
    color: var(--text-secondary) !important;
}

/* --- CARDS (Glass & Glow) --- */
.game-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.game-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.game-card:hover::before {
    opacity: 1;
    height: 4px;
    box-shadow: 0 0 15px var(--accent-cyan);
}

.card-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    transition: all 0.4s;
    display: inline-block;
}

.game-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
}

.card-title {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* --- SECTIONS --- */
.bg-dark-alt {
    background: #0f1525;
    /* Slightly lighter than main bg */
}

/* --- FOOTER (Big & Clean) --- */
footer {
    background: #050810;
    border-top: 1px solid var(--glass-border);
    padding-top: 5rem;
    padding-bottom: 2rem;
    font-size: 0.95rem;
    margin-top: auto;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    display: block;
    letter-spacing: -1px;
}

.footer-heading {
    color: var(--accent-gold);
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* --- UTILITIES --- */
.text-tessa {
    color: var(--accent-cyan) !important;
}

.text-gold {
    color: var(--accent-gold) !important;
}

.text-purple {
    color: var(--accent-purple) !important;
}

.border-glass {
    border-color: var(--glass-border) !important;
}

.bg-glass {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(5px);
}

/* Varyn/Crosslink Box */
.crosslink-box {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s;
}

.crosslink-box:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
    border-color: var(--accent-purple);
}

.btn-varyn {
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    font-family: var(--font-heading);
    transition: all 0.3s;
    display: inline-block;
}

.btn-varyn:hover {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--void-card);
        padding: 1.5rem;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        border: 1px solid var(--glass-border);
        border-top: none;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section {
        height: auto;
        min-height: 500px;
        padding-top: 160px;
        /* Increased to prevent navbar overlap */
        padding-bottom: 80px;
    }
}

/* Timeline Text Overrides */
.tl-content .text-muted,
.tl-content p {
    color: var(--text-secondary) !important;
    /* Force lighter text on dark cards */
    line-height: 1.6;
}

/* --- PAGE SPECIFIC COMPONENTS --- */

/* 1. SERVER PAGE */
.step-list {
    text-align: left;
    max-width: 700px;
    margin: 2rem auto;
    font-size: 1.1rem;
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.intro-heading {
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.join-section {
    background: linear-gradient(to bottom, var(--void-bg), #000);
    border-top: 1px solid var(--glass-border);
    padding: 80px 0;
    position: relative;
}

.display-premium {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.btn-premium-cta {
    background: var(--accent-gold);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.3rem;
    padding: 1.2rem 4rem;
    border: none;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
    display: inline-block;
    margin-top: 2rem;
    transition: all 0.3s;
}

.btn-premium-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(251, 191, 36, 0.6);
    background: #fff;
    color: #000;
}

.about-icon {
    font-size: 8rem;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.2));
}

/* 2. TIMELINE COMPONENT */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-cyan), transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    box-shadow: 0 0 15px var(--accent-cyan);
}

.container-tl {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.container-tl::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    top: 25px;
    background-color: var(--void-bg);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before,
.right::before {
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    top: 22px;
    z-index: 1;
    border: medium solid transparent;
}

.left::before {
    right: 30px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--glass-border);
}

.right::before {
    left: 30px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--glass-border) transparent transparent;
}

.right::after {
    left: -10px;
}

.tl-content {
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    position: relative;
    transition: transform 0.3s;
}

.tl-content:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.date-badge {
    display: inline-block;
    background: var(--accent-gold);
    color: #000;
    padding: 2px 12px;
    font-weight: 800;
    border-radius: 20px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.tl-img {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.tl-content:hover .tl-img {
    opacity: 1;
}

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

    .container-tl {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .container-tl::after {
        left: 21px;
        right: auto;
        /* Reset desktop right:-10px to prevent overflow */
    }

    .left::before {
        display: none;
    }

    .right {
        left: 0;
    }
}

/* 3. LORE / ARTICLE PAGES */
.article-hero {
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    margin-top: -80px;
    padding-top: 80px;
}

.article-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--void-bg), transparent 80%);
}

.article-title-box {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.article-title-box h1 {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
}

.article-title-box p {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.story-text {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-primary);
}

.story-text p {
    margin-bottom: 1.5rem;
}

.dropcap::first-letter {
    font-family: var(--font-heading);
    font-size: 4rem;
    float: left;
    line-height: 0.8;
    padding-right: 10px;
    color: var(--accent-gold);
}

.lore-quote {
    border-left: 4px solid var(--accent-cyan);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.25rem;
    background: rgba(0, 229, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.lore-sidebar {
    background: rgba(11, 16, 33, 0.95);
    /* Darker, less transparent for readability */
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--radius-md);
    position: sticky;
    top: 100px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sidebar-title {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-align: center;
    font-weight: 700;
}

.fact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.8rem;
}

.fact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fact-label {
    color: rgba(255, 255, 255, 0.7);
    /* Brighter than text-secondary */
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.fact-value {
    color: #fff;
    font-weight: 700;
    text-align: right;
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.4);
}

/* 4. ALLIES HUB */
.ally-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s;
}

.ally-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.ally-img-container {
    height: 250px;
    overflow: hidden;
}

.ally-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.ally-card:hover img {
    transform: scale(1.1);
}

.ally-content {
    padding: 1.5rem;
    text-align: center;
}

.ally-title {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

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

.btn-card {
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-card:hover {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 15px var(--accent-cyan);
}