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

:root {
    --bg: #050508;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #4f46e5;
    --secondary: #a855f7;
    --danger: #ef4444;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --glow-primary: rgba(79, 70, 229, 0.4);
    --glow-danger: rgba(239, 68, 68, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: 'Poppins', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Typography */
.gradient-text {
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.danger-text {
    color: var(--danger);
    text-shadow: 0 0 10px var(--glow-danger);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--glow-primary));
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 0 20px var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--glow-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: var(--surface-hover);
    border-color: var(--text-muted);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 6rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Demo Video */
#demo {
    background: #0b0b0f;
}

.demo-shell {
    width: min(1100px, 95vw);
    margin: 0 auto;
}

.demo-container {
    position: relative;
    border-radius: clamp(16px, 3vw, 24px);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    isolation: isolate;
    background: radial-gradient(circle at 20% 15%, rgba(95, 90, 255, 0.25), rgba(10, 10, 18, 0) 50%),
        linear-gradient(160deg, #080810 0%, #121220 50%, #0c1022 100%);
    border: 1px solid rgba(169, 165, 255, 0.32);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 34px rgba(109, 97, 255, 0.26);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.demo-container::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, rgba(119, 91, 255, 0.9), rgba(64, 148, 255, 0.65), rgba(169, 99, 255, 0.85));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.72;
    pointer-events: none;
}

.demo-container:hover {
    transform: scale(1.015);
    box-shadow:
        0 36px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 0 58px rgba(88, 103, 255, 0.46);
}

.demo-thumbnail-layer,
.demo-iframe-layer {
    position: absolute;
    inset: 0;
}

.demo-thumbnail-layer {
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.demo-thumbnail-layer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 10, 21, 0.15), rgba(5, 6, 12, 0.75));
    z-index: 1;
}

.demo-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-play-overlay {
    position: absolute;
    z-index: 2;
    display: grid;
    gap: 1rem;
    justify-items: center;
    text-align: center;
    padding: 1.2rem;
    color: #e7e9ff;
}

.demo-play-overlay p {
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    letter-spacing: 0.02em;
}

.demo-play-button {
    width: clamp(74px, 10vw, 96px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(12px);
    box-shadow:
        0 14px 40px rgba(65, 83, 255, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    display: grid;
    place-items: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.demo-play-button svg {
    width: 46%;
    fill: #ffffff;
    transform: translateX(2px);
}

.demo-thumbnail-layer:hover .demo-play-button,
.demo-thumbnail-layer:focus-visible .demo-play-button {
    transform: scale(1.06);
    box-shadow:
        0 16px 45px rgba(111, 85, 255, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.24) inset;
}

.demo-thumbnail-layer:focus-visible {
    outline: 2px solid rgba(132, 123, 255, 0.9);
    outline-offset: -2px;
}

.demo-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.demo-container.is-playing .demo-thumbnail-layer {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
}

.demo-controls {
    position: absolute;
    right: clamp(0.65rem, 1.8vw, 1rem);
    bottom: clamp(0.65rem, 1.8vw, 1rem);
    z-index: 4;
    display: flex;
    gap: 0.6rem;
}

.demo-control-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(8, 9, 18, 0.55);
    color: #eef2ff;
    backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.demo-control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.demo-control-btn:not(:disabled):hover {
    transform: translateY(-2px);
    border-color: rgba(151, 139, 255, 0.9);
    background: rgba(24, 20, 48, 0.78);
}

@media (max-width: 768px) {
    .demo-controls {
        right: 0.5rem;
        bottom: 0.5rem;
        gap: 0.45rem;
    }

    .demo-control-btn {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
}

/* Features */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(79, 70, 229, 0.2);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-card.danger:hover {
    border-color: var(--danger);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px var(--glow-danger);
}
.feature-card.danger .feature-icon {
    color: var(--danger);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* How It Works (Timeline) */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border);
}

.timeline-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-step:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 45%;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 15px var(--glow-primary);
}

.timeline-step.warning .timeline-dot {
    background: var(--danger);
    box-shadow: 0 0 15px var(--glow-danger);
}

/* Live Preview */
.preview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.extension-mock {
    width: 340px;
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(239, 68, 68, 0.15);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    position: relative;
    overflow: hidden;
}

.extension-mock::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid var(--danger);
    border-radius: 12px;
    opacity: 0.5;
    animation: pulse-border 2s infinite;
    pointer-events: none;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.extension-mock:hover {
    transform: rotateY(0) rotateX(0) scale(1.02);
}

.mock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.mock-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--danger);
    margin-bottom: 1rem;
    box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.2);
}

.mock-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-box .label { font-size: 0.8rem; color: var(--text-muted); }
.stat-box .value { font-size: 1.2rem; font-weight: 600; }

.mock-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.mock-btn:hover { background: var(--surface-hover); }

/* Download & Structure */
.download-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.step-num {
    width: 40px;
    height: 40px;
    background: rgba(79, 70, 229, 0.2);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.code-block {
    background: #0d0d12;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    font-family: 'JetBrains Mono', monospace;
    color: #a5b4fc;
    overflow-x: auto;
    max-width: 600px;
    margin: 0 auto;
}


.download-cta-wrapper {
    display: flex;
    justify-content: center;
}

.download-cta {
    --cta-grad: linear-gradient(120deg, #7c3aed 0%, #4f46e5 48%, #2563eb 100%);
    --cta-shadow: 0 16px 40px rgba(67, 56, 202, 0.45), 0 0 38px rgba(96, 165, 250, 0.28);
    --cta-shadow-hover: 0 22px 52px rgba(76, 29, 149, 0.56), 0 0 55px rgba(96, 165, 250, 0.5);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.95rem 2.2rem;
    border-radius: 999px;
    color: #fff;
    font-size: clamp(1rem, 2.4vw, 1.15rem);
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.01em;
    background: var(--cta-grad);
    border: 1px solid rgba(191, 219, 254, 0.35);
    box-shadow: var(--cta-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    isolation: isolate;
    overflow: hidden;
    width: min(100%, 420px);
}

.download-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
    opacity: 0.45;
    pointer-events: none;
}

.download-cta:hover {
    transform: scale(1.03);
    box-shadow: var(--cta-shadow-hover);
    filter: brightness(1.05);
}

.download-cta:active {
    transform: scale(0.98);
    box-shadow: 0 12px 32px rgba(67, 56, 202, 0.45), 0 0 28px rgba(96, 165, 250, 0.3);
}

.download-cta:focus-visible {
    outline: 2px solid #c4b5fd;
    outline-offset: 4px;
}

.download-cta__icon {
    width: 1.45rem;
    height: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.download-cta__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* GitHub */
.github-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .timeline::before { left: 30px; }
    .timeline-dot { left: 30px; }
    .timeline-step, .timeline-step:nth-child(even) { flex-direction: column; align-items: flex-start; padding-left: 80px; }
    .timeline-content { width: 100%; }
    .hero-btns { flex-direction: column; }
    .download-cta-wrapper { width: 100%; }
    .download-cta { width: 100%; }
    .section-header h2 { font-size: 2rem; }
    .demo-shell { width: 95%; }
}
