/* ============================================
   XTENSIFY - Premium Extension Store
   Modern Gen-Z Design with Rich Animations
   ============================================ */

:root {
    /* Colors */
    --bg-dark: #050508;
    --bg-darker: #020203;
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-card-hover: rgba(255, 255, 255, 0.05);

    /* Accent Gradient */
    --accent-primary: #a855f7;
    --accent-secondary: #6366f1;
    --accent-tertiary: #ec4899;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%);
    --accent-glow: rgba(168, 85, 247, 0.5);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(168, 85, 247, 0.5);

    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbar - Theme Matching */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-left: 1px solid var(--border);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-tertiary), var(--accent-primary));
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-darker);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html.scroll-locked {
    overflow: hidden;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 2rem;
    opacity: 0;
    animation: logoReveal 1s var(--ease-out-expo) 0.3s forwards;
}

.logo-x {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: logoXPulse 2s ease-in-out infinite;
}

.logo-rest {
    color: var(--text-primary);
}

@keyframes logoReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoXPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

.loader-bar-container {
    width: 250px;
    height: 4px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    position: relative;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 10px;
    position: relative;
    transition: width 0.1s linear;
}

.loader-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.8;
}

.loader-percentage {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.loader-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* ============================================
   MAIN WRAPPER
   ============================================ */
.main-wrapper {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s var(--ease-out-expo), visibility 1s;
}

.main-wrapper.visible {
    opacity: 1;
    visibility: visible;
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   HERO SECTION - Scroll Locked
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-dark) 70%);
    z-index: 1;
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-expo);
}

.hero-badge.animate {
    opacity: 1;
    transform: translateY(0);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Hero Title */
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.title-line {
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: all 1s var(--ease-out-expo);
}

.title-word.animate {
    opacity: 1;
    transform: translateY(0);
}

.accent-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Tagline */
.hero-tagline {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--text-secondary);
}

.tagline-word {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s var(--ease-out-expo);
}

.tagline-word.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Description */
.hero-description {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s var(--ease-out-expo) 0.6s;
}

.hero-description.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-expo) 0.8s;
}

.hero-stats.animate {
    opacity: 1;
    transform: translateY(0);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.8s var(--ease-out-expo) 1.2s, transform 0.3s ease;
}

.scroll-indicator.animate {
    opacity: 1;
}

.scroll-indicator:hover {
    transform: translateY(-5px);
}

.scroll-indicator:hover .scroll-text {
    color: var(--accent-primary);
}

.scroll-text {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.scroll-line {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    width: 3px;
    height: 8px;
    background: var(--accent-primary);
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDot 1.5s ease-in-out infinite;
    border-radius: 10px;
    box-shadow: 0 0 8px var(--accent-primary);
}

@keyframes scrollDot {
    0% {
        top: 0;
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.scroll-arrow {
    color: var(--accent-primary);
    animation: scrollArrow 1.5s ease-in-out infinite;
}

.scroll-arrow svg {
    width: 16px;
    height: 16px;
}

@keyframes scrollArrow {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateY(8px);
        opacity: 1;
    }
}

/* Hero Progress Bar */
.hero-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border);
    z-index: 20;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    transition: width 0.1s linear;
}

/* ============================================
   EXTENSIONS SECTION
   ============================================ */
.extensions {
    position: relative;
    z-index: 5;
    padding: 8rem 2rem;
    min-height: 100vh;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s var(--ease-out-expo);
}

.section-header.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Extensions Grid */
.extensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Extension Card */
.extension-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2rem;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: all 0.8s var(--ease-out-expo),
        background 0.3s ease,
        border-color 0.3s ease;
}

.extension-card.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.extension-card:nth-child(1) {
    transition-delay: 0s;
}

.extension-card:nth-child(2) {
    transition-delay: 0.15s;
}

.extension-card:nth-child(3) {
    transition-delay: 0.3s;
}

.extension-card:nth-child(4) {
    transition-delay: 0.45s;
}

.card-glow {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.extension-card:hover .card-glow {
    opacity: 1;
}

/* Top accent line on hover */
.extension-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 24px 24px 0 0;
}

.extension-card:hover::before {
    opacity: 1;
}

.card-border {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 1px solid var(--border);
    pointer-events: none;
    transition: border-color 0.3s ease;
}

.extension-card:hover .card-border {
    border-color: var(--border-hover);
}

.card-content {
    position: relative;
    z-index: 2;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-icon-wrapper {
    position: relative;
    z-index: 5;
}

.card-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s var(--ease-bounce), box-shadow 0.4s ease;
    position: relative;
    z-index: 2;
}

.extension-card:hover .card-icon {
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.3);
}

.icon-ring {
    display: none;
}

/* Icon glow effect on hover - no covering */
.card-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 22px;
    background: var(--accent-gradient);
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.4s ease;
    z-index: -1;
}

.extension-card:hover .card-icon-wrapper::after {
    opacity: 0.4;
}

.card-badge {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-badge.new-badge {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
    color: var(--accent-primary);
    animation: newBadgePulse 2s ease-in-out infinite;
}

@keyframes newBadgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
    }
}

/* Card Title & Description */
.card-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.extension-card:hover .card-title {
    color: var(--accent-primary);
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Card Buttons */
.card-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
}

.btn img {
    width: 18px;
    height: 18px;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.2);
}

.btn-coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-coming-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.btn-learn {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--accent-primary);
}

.btn-learn:hover {
    background: rgba(168, 85, 247, 0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    z-index: 5;
    padding: 4rem 2rem;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, transparent 0%, rgba(168, 85, 247, 0.02) 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    margin-bottom: 2rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
}

.footer-tagline {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.footer-link svg {
    width: 18px;
    height: 18px;
}

.footer-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.coffee-link:hover {
    color: #ffdd00;
}

.footer-bottom {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   COMING SOON SECTION
   ============================================ */
.coming-soon-section {
    margin-top: 6rem;
    padding: 4rem 2rem;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 24px;
    background: rgba(168, 85, 247, 0.02);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease-out-expo);
}

.coming-soon-section.animate {
    opacity: 1;
    transform: translateY(0);
}

.coming-soon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.coming-soon-icon {
    width: 60px;
    height: 60px;
    color: var(--accent-primary);
    animation: spinSlow 8s linear infinite;
}

.coming-soon-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.coming-soon-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coming-soon-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 400px;
    line-height: 1.7;
}

.coming-soon-dots {
    display: flex;
    gap: 8px;
    margin-top: 0.5rem;
}

.coming-soon-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: comingSoonDot 1.5s ease-in-out infinite;
}

.coming-soon-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.coming-soon-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes comingSoonDot {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .extensions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(3rem, 12vw, 5rem);
    }

    .hero-tagline {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .extensions-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .extension-card {
        padding: 1.5rem;
    }

    .card-icon {
        width: 60px;
        height: 60px;
    }

    .card-buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .scroll-indicator {
        bottom: 2rem;
    }

    .scroll-line {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 1rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .loader-logo {
        font-size: 2.5rem;
    }

    .loader-bar-container {
        width: 200px;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .extensions {
        padding: 4rem 1rem;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}