@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Color Palette - HSL for better control over depth */
    --h-primary: 235;
    --s-primary: 85%;
    --l-primary: 60%;

    --h-accent: 260;
    --s-accent: 90%;
    --l-accent: 65%;

    /* Pure Colors */
    --primary: hsl(var(--h-primary), var(--s-primary), var(--l-primary));
    --primary-alt: hsl(var(--h-primary), var(--s-primary), 50%);
    --accent: hsl(var(--h-accent), var(--s-accent), var(--l-accent));

    /* Dark Theme Surface Levels */
    --bg-0: hsl(225, 25%, 3%);
    --bg-1: hsl(225, 25%, 5%);
    --bg-2: hsl(225, 25%, 8%);
    --bg-3: hsl(225, 25%, 12%);

    /* Text Palette */
    --text-1: hsl(210, 20%, 98%);
    --text-2: hsl(215, 15%, 80%);
    --text-3: hsl(215, 10%, 65%);
    --text-muted: hsl(215, 10%, 45%);

    /* UI Elements */
    --border: hsla(0, 0%, 100%, 0.08);
    --border-bright: hsla(0, 0%, 100%, 0.15);
    --glass-bg: hsla(225, 25%, 6%, 0.7);
    --glass-blur: 20px;

    /* Shadow & Glow */
    --glow-primary: hsla(var(--h-primary), var(--s-primary), var(--l-primary), 0.35);
    --glow-accent: hsla(var(--h-accent), var(--s-accent), var(--l-accent), 0.35);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);

    /* Motion */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-0);
    color: var(--text-1);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-0);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-3);
    border-radius: 10px;
}

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

/* Background Visuals */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.mesh-glow {
    position: absolute;
    width: 80vmax;
    height: 80vmax;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: meshFlow 20s infinite alternate ease-in-out;
}

.glow-1 {
    top: -40%;
    left: -20%;
    background: radial-gradient(circle, var(--primary), transparent 70%);
}

.glow-2 {
    bottom: -40%;
    right: -20%;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    animation-delay: -5s;
}

@keyframes meshFlow {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(10%, 10%) scale(1.1);
    }
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    text-wrap: balance;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 1320px;
    height: 72px;
    z-index: 1000;
    border-radius: 20px;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    top: 12px;
    height: 64px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-1);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-brand:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px var(--primary));
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    color: var(--text-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition-base);
    box-shadow: 0 0 10px var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-1);
    border-radius: 10px;
    transition: var(--transition-fast);
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-0);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    transition: var(--transition-slow);
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
}

.eye-wrapper {
    position: relative;
    width: 160px;
    height: 100px;
}

.eye-main {
    width: 100%;
    height: 100%;
    stroke: var(--primary);
    stroke-width: 2;
    fill: none;
    filter: drop-shadow(0 0 20px var(--glow-primary));
}

.pupil {
    fill: var(--primary);
    animation: pupilScan 3s infinite ease-in-out;
}

@keyframes pupilScan {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(15px);
    }
}

.loader-text {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glitch 1s infinite;
}

@keyframes glitch {

    0%,
    100% {
        transform: none;
        opacity: 1;
    }

    7% {
        transform: skew(-0.5deg, -0.9deg);
        opacity: 0.75;
    }

    10% {
        transform: none;
        opacity: 1;
    }

    27% {
        transform: none;
        opacity: 1;
    }

    30% {
        transform: skew(0.8deg, -0.1deg);
        opacity: 0.75;
    }

    35% {
        transform: none;
        opacity: 1;
    }
}

/* Sections */
section {
    padding: 120px 0;
    position: relative;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: hsla(var(--h-primary), var(--s-primary), var(--l-primary), 0.1);
    border: 1px solid hsla(var(--h-primary), var(--s-primary), var(--l-primary), 0.2);
    border-radius: 100px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-2);
    max-width: 650px;
    margin: 0 auto 3rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Buttons */
.btn {
    padding: 16px 36px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-base);
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    background: var(--primary-alt);
    box-shadow: 0 10px 30px var(--glow-primary);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-1);
    border-color: var(--border);
    backdrop-filter: blur(var(--glass-blur));
}

.btn-secondary:hover {
    background: var(--bg-3);
    border-color: var(--border-bright);
    transform: translateY(-4px);
}

/* Cards (Glassmorphism) */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px;
    transition: var(--transition-base);
}

.glass-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--glow-primary);
    transform: translateY(-8px);
}

/* Sections Branding */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
}

/* Stats */
.stats {
    background: var(--bg-1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
}

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

.stat-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary);
    font-family: 'Outfit';
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

/* About */
.about {
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: center;
}

.about-text h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--text-2);
    margin-bottom: 2.5rem;
}

.warning-box {
    background: hsla(0, 70%, 50%, 0.1);
    border: 1px solid hsla(0, 70%, 50%, 0.2);
    padding: 24px;
    border-radius: 20px;
    display: flex;
    gap: 20px;
}

.warning-icon {
    color: #ff4d4d;
    filter: drop-shadow(0 0 10px #ff4d4d);
}

/* Items Grid (Tools / Tutorials) */
.tools-section,
.tutorials-section {
    padding-top: 0;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.item-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.item-badge {
    background: hsla(var(--h-primary), var(--s-primary), var(--l-primary), 0.15);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 10px;
    width: fit-content;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.item-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.item-desc {
    color: var(--text-2);
    margin-bottom: 2.5rem;
    font-size: 1rem;
    flex-grow: 1;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4rem 0 6rem;
}

.filter-btn {
    padding: 12px 28px;
    border-radius: 100px;
    background: var(--bg-2);
    color: var(--text-3);
    border: 1px solid var(--border);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--border-bright);
    color: var(--text-2);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--glow-primary);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.contact-card {
    text-align: center;
    text-decoration: none;
    color: var(--text-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-base);
}

.contact-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    transition: var(--transition-base);
}

.contact-card:hover .contact-icon-wrapper {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 20px var(--glow-primary);
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-2);
}

/* Footer */
.footer {
    padding: 80px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-1);
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 2rem;
}

/* Password bar */
.password-info-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    padding: 24px 40px;
    border-radius: 20px;
    max-width: 1000px;
    margin: -40px auto 60px;
    position: relative;
    z-index: 20;
}

.password-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.password-value {
    background: var(--bg-0);
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 800;
    color: var(--primary);
    border: 1px solid var(--border);
}

/* Mascot */
.mascot-container {
    position: fixed;
    bottom: -20px;
    right: 20px;
    height: 55vh;
    z-index: 50;
    pointer-events: none;
    transition: var(--transition-base);
    animation: floatMascot 8s infinite ease-in-out;
}

@keyframes floatMascot {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.mascot-img {
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.5));
}

.speech-bubble {
    position: absolute;
    bottom: 80%;
    right: 60%;
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 20px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: var(--transition-base);
}

.speech-bubble.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Page Header */
.page-header {
    padding: 200px 0 100px;
    text-align: center;
}

/* Modal */
.download-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.download-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(10px);
}

.download-modal-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-bright);
    border-radius: 32px;
    padding: 2.5rem;
    z-index: 10;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.download-modal-icon {
    width: 64px;
    height: 64px;
    background: hsla(0, 70%, 50%, 0.1);
    color: #ef4444;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
}

.download-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px var(--glow-primary);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-8px);
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .mascot-container {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: calc(100% - 48px);
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(var(--glass-blur));
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 2rem;
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
        animation: slideIn 0.3s ease forwards;
    }

    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

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

    .items-grid {
        grid-template-columns: 1fr;
    }

    .password-info-bar {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

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