/* CSS Variables */
:root {
    --loading-gradient: linear-gradient(161deg, #f30968 0%, #6e08e8 40%, #1717af 60%, #f30968 80%, #6f0836 100%) 0% 0% / 100% no-repeat text;
    --primary-gradient: linear-gradient(135deg, #7F5AF0 0%, #00CFFF 100%) ;
    --bg-dark: #0d0d0d;
    --transition-standard: all 0.6s ease;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Utility Classes */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
    background: var(--primary-gradient);
    padding: 2px;
    border-radius: 0.5rem;
}

.gradient-border-inner {
    background: var(--bg-dark);
    border-radius: 0.375rem;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(127, 90, 240, 0.5);
    transition: all 0.3s ease;
}

/* Layout Components */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
}

/* Mobile touch optimization for particles */
@media (max-width: 768px) {
    .particle-container {
        pointer-events: none !important;
    }

    .particle-container canvas {
        pointer-events: auto !important;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Desktop particle interactions */
@media (min-width: 769px) {
    .particle-container {
        pointer-events: auto;
    }
}

.full-viewport {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Styles */
.nav-content,
.logo-container,
.logo-main,
.logo-line,
.logo-tagline {
    transition: var(--transition-standard);
}

.navbar-scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-scrolled .logo-container {
    transform: translateX(-30vw);
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.loading-text {
    font-size: 12rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    white-space: nowrap;
    text-align: center;
    line-height: 0.8;
    margin: 0;
    padding: 0.25rem 0.5rem 0 0.5rem;
    display: inline-block;
    position: relative;
    user-select: none;
}

.loading-line {
    width: 8rem;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Gradient Animation Base Styles */
.gradient-static,
.gradient-anim {
    display: block;
    white-space: pre;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.gradient-static {
    background: var(--loading-gradient) 0% 0% / 100% no-repeat text;
}

.gradient-anim {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--loading-gradient);
    background-size: 200% 200%;
    background-position: 100% 100%;
    opacity: 0.8;
    pointer-events: none;
}

/* Loading Text Gradient */
.loading-text .gradient-anim {
    animation: gradientSweep 4000ms cubic-bezier(.22,.9,.3,1) 1s forwards;
}

/* Hero Title Gradient */
.hero-title .title-word {
    position: relative;
    display: inline-block;
}

.hero-title .title-word .gradient-anim {
    top: 0;
}

.hero-title .title-word.animate .gradient-anim {
    animation: gradientSweep 3000ms cubic-bezier(.22,.9,.3,1) forwards;
}

.hero-title .title-word.hover-animate .gradient-anim {
    animation: gradientSweep 1500ms cubic-bezier(.22,.9,.3,1) forwards;
}

/* Shared Gradient Animation */
@keyframes gradientSweep {
    from {
        background-position: 100% 100%;
        background-size: 200% 200%;
    }
    to {
        background-position: 0% 0%;
        background-size: 100% 100%;
    }
}

/* 2XP Logo */
.two-xp-logo {
    background: var(--loading-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 123px;
    font-weight: 900;
    display: inline-block;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .full-viewport {
        min-height: 100vh;
        height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
        overflow: visible;
    }

    #hero {
        height: 100vh;
        max-height: 100vh;
        overflow: visible;
    }

    #about {
        margin-top: 0;
        position: relative;
        z-index: 1;
    }

    .about-header {
        margin-bottom: 3rem !important;
    }

    .about-content {
        position: relative;
        z-index: 2;
    }

    /* Navigation mobile styles */
    .nav-container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .navbar-scrolled {
        background: rgba(13, 13, 13, 0.9);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(127, 90, 240, 0.2);
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .navbar-scrolled .logo-container {
        transform: none;
    }

    .navbar-scrolled .logo-main {
        font-size: 1.25rem;
    }

    .navbar-scrolled .logo-tagline {
        font-size: 0.55rem;
    }

    .navbar-scrolled .logo-line {
        width: 1.5rem;
        height: 1px;
    }

    /* Loading screen mobile styles */
    .loading-text {
        font-size: 8rem;
    }

    .loading-line {
        width: 6rem;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .loading-text {
        font-size: 6rem;
    }

    .loading-line {
        width: 4rem;
        height: 2px;
    }

    .loading-container {
        gap: 0.1rem;
    }
}