:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.5);
    --secondary-accent: #7000ff;
    --grid-color: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(20, 20, 20, 0.8);
    --card-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
}

.glow-orb {
    position: fixed;
    top: -20%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--secondary-accent) 0%, transparent 70%);
    opacity: 0.15;
    transform: translateX(-50%);
    z-index: -1;
    filter: blur(100px);
    animation: drift 20s infinite alternate ease-in-out;
}

@keyframes drift {
    0% {
        transform: translateX(-50%) translateY(0);
    }

    100% {
        transform: translateX(-50%) translateY(50px);
    }
}

/* Header */
header {
    padding: 2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--card-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s;
    font-size: 0.9rem;
}

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

.btn-secondary {
    border: 1px solid var(--card-border);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color) !important;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 5% 4rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-text {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.btn-text:hover {
    border-color: var(--text-primary);
}

/* Hero Visual (Mockup) */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.server-mockup {
    width: 100%;
    max-width: 450px;
    background: #111;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.server-status {
    padding: 0.8rem 1rem;
    background: #0a0a0a;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 5px #00ff88;
}

.code-header {
    padding: 0.8rem;
    display: flex;
    gap: 0.5rem;
    background: #161616;
}

.code-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.code-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-color);
    min-height: 200px;
}

/* Sections */
section {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

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

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

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

/* Config Section */
.configuration {
    max-width: 900px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn.active,
.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.config-display {
    background: #0f0f0f;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.copy-header {
    background: #1a1a1a;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

pre {
    padding: 2rem;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: var(--font-mono);
    color: #e0e0e0;
    font-size: 0.9rem;
}

.instruction-note {
    background: rgba(0, 240, 255, 0.05);
    border-left: 3px solid var(--accent-color);
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.instruction-note code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 5px;
    border-radius: 3px;
    color: var(--accent-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 5%;
    border-top: 1px solid var(--card-border);
    margin-top: 4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dim {
    opacity: 0.5;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-group {
        justify-content: center;
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* Live Demo Section */
.live-demo {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.demo-container {
    display: flex;
    gap: 2rem;
    height: 500px;
    margin-top: 3rem;
    position: relative;
    z-index: 10;
}

/* Chat Interface */
.demo-chat {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.chat-header {
    padding: 1rem;
    background: #252525;
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
}

.chat-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    position: relative;
}

.chat-message {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    max-width: 85%;
    opacity: 0;
    transform: translateY(10px);
    animation: messagePop 0.5s forwards ease-out;
    /* Slower animation */
    line-height: 1.4;
}

.chat-message.user {
    align-self: flex-end;
    background: var(--accent-color);
    color: #000;
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

.chat-message.ai {
    align-self: flex-start;
    background: #333;
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
    border: 1px solid var(--card-border);
}

.chat-input-area {
    padding: 1rem;
    background: #252525;
    border-top: 1px solid var(--card-border);
}

.fake-input {
    height: 40px;
    background: #1a1a1a;
    border-radius: 20px;
    border: 1px solid #444;
    position: relative;
}

.fake-input::after {
    content: "Type a message...";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.85rem;
}

/* Browser Preview Interface */
.demo-browser {
    flex: 1.5;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.browser-header {
    background: #f0f0f0;
    display: flex;
    padding: 0.8rem;
    align-items: center;
    border-bottom: 1px solid #ddd;
    gap: 1rem;
}

.browser-controls {
    display: flex;
    gap: 6px;
}

.browser-address-bar {
    flex: 1;
    background: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #555;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #ddd;
}

.lock-icon {
    font-size: 0.7rem;
}

.browser-viewport {
    flex: 1;
    background: #fff;
    overflow-y: auto;
    position: relative;
    font-family: 'Outfit', sans-serif;
    /* Ensure simulated content uses correct font */
}

.browser-placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #aaa;
    font-size: 0.9rem;
}

/* Injected Content Styles (Simulated Website) */
.sim-nav {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    align-items: center;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.sim-hero {
    padding: 4rem 2rem;
    text-align: center;
    background: #f9f9f9;
    animation: fadeIn 0.5s ease-out;
}

.sim-hero h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    background: none;
    /* Reset gradient */
    -webkit-text-fill-color: initial;
    background-clip: border-box;
    -webkit-background-clip: border-box;
}

.sim-hero p {
    color: #666;
    margin-bottom: 2rem;
}

.sim-btn {
    background: #000;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    border: none;
    font-weight: 600;
}

.sim-menu {
    padding: 3rem 2rem;
    animation: slideUp 0.5s ease-out;
}

.sim-menu h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

.sim-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.sim-item {
    background: #fff;
    border: 1px solid #eee;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.sim-item-img {
    height: 100px;
    background: #eee;
    margin-bottom: 0.8rem;
    border-radius: 4px;
}

.sim-item h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: #333;
}

.sim-item span {
    color: #888;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Dark Mode Injection */
.browser-viewport.dark-mode {
    background: #121212;
    color: #fff;
}

.browser-viewport.dark-mode .sim-nav {
    background: #1a1a1a;
    border-color: #333;
}

.browser-viewport.dark-mode .sim-hero {
    background: #1a1a1a;
}

.browser-viewport.dark-mode .sim-hero h1 {
    color: #fff;
}

.browser-viewport.dark-mode .sim-hero p {
    color: #aaa;
}

.browser-viewport.dark-mode .sim-btn {
    background: var(--accent-color);
    color: #000;
}

.browser-viewport.dark-mode .sim-menu h2 {
    color: #fff;
}

.browser-viewport.dark-mode .sim-item {
    background: #1a1a1a;
    border-color: #333;
}

.browser-viewport.dark-mode .sim-item h3 {
    color: #fff;
}

.browser-viewport.dark-mode .sim-item-img {
    background: #333;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes messagePop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .demo-container {
        flex-direction: column;
        height: auto;
    }

    .demo-chat,
    .demo-editor {
        height: 400px;
        width: 100%;
    }
}