:root {
    --bg-dark: #0a0a0a;
    --text-light: #f5f5f5;
    --accent: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.5);
    --glass-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    /* We need to allow scrolling but prevent horizontal overflow */
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
}

.loading-content {
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.logo-pulse {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite alternate;
}

.accent {
    color: var(--accent);
}

/* Helper Classes */
.left-align { align-self: flex-start; }
.right-align { align-self: flex-end; }
.center-align { align-self: center; text-align: center; }

/* Animations */
@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

@keyframes scroll {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.loading-bar-wrapper {
    width: 100%;
    height: 4px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.1s linear;
    box-shadow: 0 0 15px var(--accent);
    position: relative;
    overflow: hidden;
}

.loading-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    bottom: 0;
    width: 50px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: loading-sweep 1s infinite linear;
}

@keyframes loading-sweep {
    0% { left: -50px; }
    100% { left: 100%; }
}

.loading-text {
    font-size: 0.9rem;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

/* Scroll Progress Bar */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    top: 20px;
    width: 90%;
    max-width: 1200px;
    padding: 0.8rem 1.5rem;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar.scrolled.hidden {
    transform: translate(-50%, -150%);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-img {
    height: 35px;
    width: auto;
}

.nav-logo-text {
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.nav-logo-anonym {
    color: var(--accent);
    font-weight: 800;
}

.nav-logo-creator {
    color: var(--text-light);
    font-weight: 300;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

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

/* ================= BUTTONS ================= */
[class*="btn-"] {
    display: inline-block;
    background: rgba(0, 240, 255, 0.05);
    color: var(--text-light);
    border-radius: 50px;
    font-weight: 600 !important;
    position: relative;
    border: 1px solid rgba(0, 240, 255, 0.3) !important;
    transition: box-shadow 0.6s ease, background 0.6s ease, transform 0.6s ease, color 0.6s ease;
    text-decoration: none;
}

[class*="btn-"]::before {
    content: '';
    position: absolute;
    inset: -1px;
    border: 2px solid var(--accent);
    border-radius: 50px;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.7s ease;
    pointer-events: none;
    z-index: 10;
}

[class*="btn-"]:hover::before {
    opacity: 1;
    clip-path: inset(0 0 0 0);
}

[class*="btn-"]:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
    color: var(--text-light) !important;
}

.btn-primary-small {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

/* Canvas Background */
#scroll-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    object-fit: cover;
}

/* Content Container */
.content-container {
    position: relative;
    z-index: 1;
}

.scroll-section {
    height: 175vh;
    padding: 0 5%;
    position: relative;
    margin-bottom: 50vh;
}

#hero-spacer {
    height: 100vh;
}

#contact {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 16px;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: sticky;
    top: 25vh;
}

.final-card {
    position: relative; /* Disable sticky */
    top: auto;
}

/* 3D Effect triggers when class .visible is added */
.glass-card.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

.glass-card h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.glass-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.glass-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Alignments */
.right-align { margin-left: auto; }
.left-align { margin-right: auto; }
.center-align { margin: 0 auto; text-align: center; }

.scroll-indicator {
    font-size: 2rem;
    animation: bounce 2s infinite;
    display: inline-block;
    color: var(--accent);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .glass-card {
        padding: 2rem;
        margin-top: 20vh;
    }
    .glass-card h1 { font-size: 2.5rem; }
    .glass-card h2 { font-size: 2rem; }

    .nav-right {
        display: none;
    }
    .navbar {
        justify-content: center;
    }
}
