/* styles.css */
:root {
    --hytale-bg-dark: #15243A;
    --hytale-bg-darker: #162039;
    --hytale-bg-footer: #0a0e14;
    --hytale-gold: #daa444;
    --hytale-gold-light: #ffe98a;
    --hytale-border-gold: #816632;
    --hytale-text: #DCE8EB;
    --hytale-text-muted: rgba(220, 232, 235, 0.7);
    --discord: #5865F2;
    --discord-hover: #4752C4;
    --glass-bg: rgba(16, 23, 36, 0.6);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body.dark-theme {
    font-family: 'Inter', sans-serif;
    background-color: var(--hytale-bg-dark);
    color: var(--hytale-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .nav-brand-text {
    font-family: 'Lexend', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Typography Utilities */
.text-muted { color: var(--hytale-text-muted); margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* === Navbar === */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    background: transparent;
    transition: background 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 50px;
    object-fit: contain;
}

.nav-brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hytale-gold);
    letter-spacing: 1px;
}

.desktop-nav {
    display: none;
    background: rgba(16, 23, 36, 0.5);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

@media (min-width: 992px) {
    .desktop-nav { 
        display: block; 
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: linear-gradient(360deg, rgba(99,110,209,0.15) 0%, rgba(50,56,107,0.15) 100%);
}

.nav-item.active {
    background: linear-gradient(270deg, var(--hytale-gold-light) 0%, var(--hytale-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.copy-ip-header {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--hytale-text-muted);
    transition: color 0.3s;
}

@media (min-width: 768px) {
    .copy-ip-header { display: flex; }
}

.copy-ip-header:hover {
    color: white;
}

.nav-btn-primary {
    background: var(--hytale-gold);
    color: #000;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(218, 164, 68, 0.4);
    transition: all 0.3s ease;
}

.nav-btn-primary:hover {
    background: var(--hytale-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(218, 164, 68, 0.6);
}

/* Mobile Nav */
.mobile-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (min-width: 992px) {
    .mobile-toggle { display: none; }
}

.mobile-nav {
    display: none;
    background: #182037;
    position: absolute;
    top: 100%; left: 0; width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav.open {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    padding: 1rem;
}

.mobile-nav-item {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-nav-item.active {
    color: var(--hytale-gold);
}

/* === Upper Section / Hero === */
.upper-section {
    position: relative;
    padding-bottom: 6rem;
    border-bottom: 1px solid var(--hytale-border-gold);
}

.hero-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 0 2rem;
}

.hero-bg {
    background-image: url('public/hytale_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(21,36,58,0.3) 0%, rgba(21,36,58,0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-logo {
    max-width: 180px;
    width: 100%;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
}

.hero-title {
    font-size: 2.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

@media (min-width: 768px) {
    .hero-title { font-size: 3.5rem; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.hero-cta-container {
    margin-top: 2rem;
    padding: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.button-gold {
    display: inline-block;
    background: linear-gradient(180deg, #dfa947 0%, #a47625 100%);
    color: #fff;
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 1rem 3rem;
    border: 2px solid #ffdb7c;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.3), 0 5px 15px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: 2px;
}

.button-gold:hover {
    background: linear-gradient(180deg, #ecc172 0%, #b88d3e 100%);
    transform: translateY(-2px);
}

/* About Split Section */
.about-container {
    position: relative;
    z-index: 2;
    margin-top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 992px) {
    .about-container {
        flex-direction: row;
        align-items: center;
    }
    .about-text { width: 50%; padding-right: 3rem; }
    .about-media { width: 50%; }
}

.section-heading {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.button-outline {
    display: inline-block;
    border: 1px solid var(--hytale-gold);
    color: var(--hytale-gold);
    padding: 0.6rem 1.5rem;
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    background: rgba(218, 164, 68, 0.05);
}

.button-outline:hover {
    background: var(--hytale-gold);
    color: #000;
}

.video-placeholder {
    position: relative;
    border: 2px solid rgba(175,203,218,0.7);
    padding: 5px;
    background: rgba(0,0,0,0.2);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
}

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

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(51,51,51,0.8);
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 2rem;
    color: white;
    transition: background 0.3s;
}

.video-thumbnail:hover .play-overlay {
    background: var(--hytale-gold);
    color: #000;
}

.watch-trailer-btn {
    position: absolute;
    bottom: -1.2rem;
    left: 50%; transform: translateX(-50%);
    background: var(--hytale-bg-darker);
    border: 1px solid var(--hytale-border-gold);
}

/* === Lower Section (News) === */
.lower-section {
    background-color: var(--hytale-bg-darker);
    padding: 5rem 0;
    border-top: 1px solid var(--hytale-border-gold);
}

.gold-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--hytale-gold) 0%, transparent 100%);
    margin-bottom: 2rem;
    width: 100px;
}

.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
}

.news-item:hover {
    background: rgba(255,255,255,0.03);
}

.news-link {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .news-link {
        flex-direction: row;
        align-items: flex-start;
    }
    .news-thumbnail { width: 270px; height: 140px; flex-shrink: 0; }
}

.news-thumbnail {
    height: 200px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.news-thumbnail img {
    width: 100%; height: 100%; object-fit: cover;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    color: var(--hytale-gold);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.news-excerpt {
    color: var(--hytale-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-top: auto;
}

/* === Footer === */
.footer {
    background: var(--hytale-bg-footer);
    text-align: center;
    border-top: 1px solid #10161e;
}

.footer-top {
    padding: 3rem 1rem;
    border-bottom: 1px solid #10161e;
}

.footer-heading {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.8);
    color: #000;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #fff;
    transform: scale(1.1);
}

.footer-bottom {
    padding: 4rem 1rem;
    background: url('https://hytale.com/images/footer.webp') top center/auto repeat;
}

.footer-brand {
    font-family: 'Lexend', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.8);
    letter-spacing: 2px;
    margin-bottom: 2rem;
    display: block;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--hytale-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.3s;
}

.footer-links a:hover { color: #fff; }

.footer-legal {
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--hytale-gold);
    color: #000;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Particles from previous */
.particles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(218, 164, 68, 0.6);
    border-radius: 50%;
    filter: blur(1px);
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}
