/* --- IMPORTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;400;700&family=Playfair+Display:ital,wght@1,400;1,700&display=swap');

:root {
    --abyss: #f8fafc;
    --deep-blue: #ffffff;
    --mid-blue: #e2e8f0;
    /* Deep purple-blue base */
    --accent-primary: #00e5ff;
    /* Bright Cyan */
    --accent-secondary: #e6007e;
    /* Vibrant Magenta */
    --foam: #1e293b;
    /* Dark text for light mode */
    --glass-bg: rgba(0, 0, 0, 0.04);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-highlight: rgba(0, 0, 0, 0.1);

    /* New Variables for previously hardcoded values */
    --nav-bg: rgba(255, 255, 255, 0.8);
    --footer-bg: #f1f5f9;
    --download-grad: rgba(226, 232, 240, 0.8);

    /* Text Colors */
    --text-main: #1e293b;
    --text-muted: rgba(30, 41, 59, 0.7);

    /* Component Backgrounds */
    --btn-bg: rgba(0, 0, 0, 0.05);
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

[data-theme="dark"] {
    --abyss: #050510;
    --deep-blue: #120a2e;
    --mid-blue: #24124a;
    --foam: #f0f4f8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.2);

    --nav-bg: rgba(1, 2, 5, 0.8);
    --footer-bg: #02040a;
    --download-grad: rgba(18, 10, 46, 0.8);

    /* Text Colors */
    --text-main: #f0f4f8;
    --text-muted: rgba(240, 244, 248, 0.7);

    /* Component Backgrounds */
    --btn-bg: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* --- GLOBAL STYLES --- */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor */
}

body {
    background-color: var(--abyss);
    color: var(--foam);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- CUSTOM CURSOR --- */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-primary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* --- BACKGROUND ANIMATION --- */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-image: url('../../image/blockb.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.bg-canvas::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--abyss);
    opacity: 0.8;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: drift 20s infinite alternate ease-in-out;
    z-index: 1;
}

[data-theme="dark"] .orb {
    opacity: 0.4;
    /* Stronger in dark mode */
    filter: blur(80px);
}

.orb-1 {
    width: 60vh;
    height: 60vh;
    background: radial-gradient(circle, var(--accent-secondary), transparent);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 80vh;
    height: 80vh;
    background: radial-gradient(circle, var(--mid-blue), transparent);
    bottom: -20%;
    right: -20%;
    animation-delay: -5s;
}

.orb-3 {
    width: 40vh;
    height: 40vh;
    background: radial-gradient(circle, var(--accent-primary), transparent);
    top: 40%;
    left: 40%;
    opacity: 0.2;
    animation: drift 15s infinite alternate-reverse ease-in-out;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--foam), var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

}

.italic-accent {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--accent-primary);
    font-weight: 400;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: background 0.3s, padding 0.3s;
    border-bottom: 1px solid var(--glass-border);
}

nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* --- BUTTONS --- */
.btn {
    padding: 14px 32px;
    border: 1px solid var(--glass-border);
    background: var(--btn-bg);
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border-radius: 2px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s var(--ease-out);
}

.btn:hover {
    background: var(--accent-primary);
    color: var(--abyss);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
    border-color: transparent;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--foam);
    color: var(--abyss);
    font-weight: 800;
    border: none;
}

.btn-primary:hover {
    background: var(--accent-secondary);
    color: white;
    box-shadow: 0 0 30px rgba(112, 0, 255, 0.5);
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 120px 10% 0;
    position: relative;
    perspective: 1000px;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 8rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(50px) rotateX(20deg);
    animation: revealText 1.2s var(--ease-out) forwards 0.2s;
}

.hero p {
    font-size: 1.25rem;
    max-width: 500px;
    margin-bottom: 3rem;
    opacity: 0.8;
    border-left: 2px solid var(--accent-primary);
    padding-left: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: revealText 1s var(--ease-out) forwards 0.6s;
}

.hero-actions {
    display: flex;
    gap: 20px;
    opacity: 0;
    animation: revealText 1s var(--ease-out) forwards 0.8s;
}

/* --- SECTIONS --- */
section {
    padding: 120px 10%;
    position: relative;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 4rem;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--accent-primary);
}

/* --- CARDS (Features) --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: 12px;
    position: relative;
    transition: all 0.4s var(--ease-out);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(circle, var(--glass-highlight), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--glass-highlight);
    box-shadow: var(--card-hover-shadow);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.3));
    transition: all 0.3s;
}

.card:hover .card-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.5));
}


.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- VIDEO SECTION --- */
.video-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 100px rgba(112, 0, 255, 0.15);
    border: 1px solid var(--glass-border);
    background: #000;
    aspect-ratio: 16/9;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-highlight);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: white;
    z-index: 2;
    transition: all 0.3s;
}

.video-container:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.2);
    background: var(--accent-primary);
    color: black;
    box-shadow: 0 0 30px var(--accent-primary);
}

/* --- DOWNLOAD SECTION --- */
.download-section {
    position: relative;
    text-align: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, var(--download-grad), transparent);
}

.download-title {
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 1;
    margin-bottom: 2rem;
}

.download-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    margin-top: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: all 0.4s ease;
    text-align: left;
}

.download-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 229, 255, 0.2);
    border-color: var(--glass-highlight);
}

.download-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.app-icon-lg {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.app-details h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.app-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.app-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-desc {
    margin-bottom: 2rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.download-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 16px 30px;
    font-size: 1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-outline {
    padding: 16px 30px;
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    transition: all 0.3s;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: var(--abyss);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.download-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
    text-align: center;
}

@media (max-width: 600px) {
    .download-header {
        flex-direction: column;
        text-align: center;
    }

    .download-card {
        padding: 2rem;
        text-align: center;
    }

    .download-desc {
        text-align: center;
    }

    .download-actions {
        flex-direction: column;
    }
}

/* --- FOOTER --- */
footer {
    padding: 3rem 10%;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--footer-bg);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--accent-primary);
}

/* --- ANIMATIONS --- */
@keyframes revealText {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
    }

    .download-grid {
        flex-direction: column;
    }

    nav {
        padding: 1.5rem 5%;
    }
}

/* --- LOADING OVERLAY --- */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--abyss);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    /* Stack items */
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: opacity 0.5s var(--ease-out), visibility 0.5s var(--ease-out);
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 4px solid transparent;
    /* Gradient Border Trick */
    background:
        linear-gradient(var(--abyss), var(--abyss)) padding-box,
        linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) border-box;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.2);
}

[data-theme="light"] .loader-spinner {
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, var(--text-main), var(--accent-secondary)) border-box;
    box-shadow: 0 0 40px rgba(230, 0, 126, 0.15);
}

/* Friendly Loading Text */
.loader-overlay::after {
    content: 'LOADING...';
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    letter-spacing: 4px;
    color: var(--text-muted);
    font-weight: 500;
    animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* --- WELCOME MODAL --- */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--ease-out);
}

.welcome-modal.active {
    opacity: 1;
    visibility: visible;
}

.welcome-content {
    /* Base Style = LIGHT MODE (Default) */
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    max-width: 480px;
    width: 90%;
    /* Subtle light shadow + inner highlight */
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s var(--ease-elastic);
    position: relative;
    overflow: hidden;
}

/* Accent glow at the top */
.welcome-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.welcome-modal.active .welcome-content {
    transform: translateY(0) scale(1);
}

/* Override for DARK MODE */
[data-theme="dark"] .welcome-content {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.welcome-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    /* Base = LIGHT MODE (Dark Blue -> Magenta) */
    background: linear-gradient(135deg, var(--text-main), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .welcome-title {
    /* Override = DARK MODE (Foam -> Cyan) */
    background: linear-gradient(135deg, var(--foam), var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Base = LIGHT MODE (Magenta Shadow) */
.welcome-content img {
    filter: drop-shadow(0 0 20px rgba(230, 0, 126, 0.3));
    transition: filter 0.3s;
}

/* Override = DARK MODE (Cyan Shadow) */
[data-theme="dark"] .welcome-content img {
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.5));
}

.welcome-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* --- APP OBJECTIVE SECTION --- */
.objective-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.objective-item {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.objective-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.15);
}

.objective-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.objective-item:hover::before {
    transform: scaleX(1);
}

.objective-number {
    font-size: 4rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(100, 116, 139, 0.2);
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    opacity: 0.5;
    transition: all 0.4s ease;
}

[data-theme="dark"] .objective-number {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.objective-item:hover .objective-number {
    color: var(--glass-highlight);
    opacity: 0.1;
    transform: scale(1.2) rotate(-10deg);
}

.objective-content {
    z-index: 1;
}

.objective-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.objective-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}