html {
    scroll-behavior: smooth;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #020617;
    --bg-card: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #10b981;
    --discord: #5865F2;
    --glass: rgba(15, 23, 42, 0.6);
    --border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Background Decoration */
.bg-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 2rem;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
}

header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 2rem;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05), transparent),
                url('../../hero.png') center/cover no-repeat;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(2, 6, 23, 0.4), var(--bg-dark) 95%);
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff 20%, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
    line-height: 1;
}

.hero-subtitle {
    font-size: Clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.cta-group {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(99, 102, 241, 0.5);
}

.btn-discord {
    background: var(--discord);
    color: white;
}

.btn-discord:hover {
    filter: brightness(1.1);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(88, 101, 242, 0.4);
}

.container {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

section {
    padding-top: 8rem;
    margin-bottom: 4rem;
}

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

.section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 3rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--primary);
    transition: transform 0.4s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Version List */
.version-section {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 4rem;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.version-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(10px);
}

.version-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.badge-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.4rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge.latest {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border-color: rgba(16, 185, 129, 0.2);
}

.changelog {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.download-link {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.download-link:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

/* Requirements Grid */
.req-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.req-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
}

.req-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.req-item strong {
    font-size: 1.1rem;
}

/* Wiki & Gallery Specifics */
.wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.wiki-card {
    text-decoration: none;
    color: inherit;
}

.block-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 2rem;
    align-items: start;
    transition: transform 0.3s;
}

.block-card:hover {
    transform: translateX(10px);
    border-color: var(--primary);
}

.block-icon {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: transform 0.3s;
}

.block-card:hover .block-icon {
    transform: scale(1.1) rotate(5deg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.gallery-item {
    background: var(--bg-card);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.gallery-img {
    width: 100%;
    aspect-ratio: 16/9;
    background: #1e293b;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h3 { margin-bottom: 0.5rem; font-weight: 700; }

.author-badge {
    display: inline-block;
    font-size: 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-block {
    background: #020617;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    color: #10b981;
    margin: 1.5rem 0;
    overflow-x: auto;
    line-height: 1.5;
}

.guide-content { max-width: 800px; margin: 0 auto; }
.guide-content h2 { margin: 3.5rem 0 1.25rem; border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 0.5rem; font-weight: 800; }
.guide-content p { margin-bottom: 1.5rem; color: var(--text-secondary); font-size: 1.1rem; }

/* Scroll Animation */
footer {
    text-align: center;
    padding: 8rem 2rem 4rem;
    border-top: 1px solid var(--border);
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.05));
}

.discord-cta {
    margin-bottom: 5rem;
    padding: 4rem;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(99, 102, 241, 0.05));
    border-radius: 40px;
    border: 1px solid rgba(88, 101, 242, 0.2);
    position: relative;
    overflow: hidden;
}

.discord-cta h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    .version-section {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-links {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        width: 100%;
        justify-content: center;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    header {
        padding-top: 8rem;
        min-height: 80vh;
    }

    h1 {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    section {
        padding-top: 5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .feature-card {
        padding: 2rem;
    }

    .version-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .version-card:hover {
        transform: translateY(-5px);
    }

    .download-link {
        justify-content: center;
    }

    .discord-cta {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .discord-cta h3 {
        font-size: 1.75rem;
    }

    .block-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .block-icon {
        margin: 0 auto;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cta-group {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .badge-group {
        gap: 0.4rem;
    }
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}
