/* Base Styles */
:root {
    --primary: #7b2cbf;
    --primary-dark: #5a189a;
    --primary-light: #9d4edd;
    --secondary: #00bbf9;
    --secondary-dark: #0096c7;
    --accent: #ff9e00;
    --accent-dark: #ff8500;
    --background: #121212;
    --surface: #1e1e1e;
    --surface-light: #2a2a2a;
    --surface-dark: #141414;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --error: #ff5a5f;
    --success: #4bb543;
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
    
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    position: relative;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--secondary-dark);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-fast);
}

/* Background Grid Effect */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(30, 30, 30, 0.9) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 30, 30, 0.9) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    opacity: 0.3;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--primary);
    margin-right: 10px;
    font-size: 1.8rem;
}

.logo-highlight {
    color: var(--secondary);
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-list a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button:active {
    transform: translateY(0);
}

.button-icon {
    transition: var(--transition);
}

.cta-button:hover .button-icon {
    transform: translateX(3px);
}

.pulse {
    animation: pulse 2s infinite 1.5s;
}

.hero-illustration {
    position: relative;
    perspective: 1000px;
}

.code-window {
    background-color: var(--surface);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: rotateY(-15deg) rotateX(5deg);
    transform-style: preserve-3d;
    opacity: 0;
    animation: fadeIn 0.8s ease 1s forwards, float 6s ease-in-out infinite 1.8s;
}

.window-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--surface-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background-color: var(--error);
}

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

.dot.green {
    background-color: var(--success);
}

.window-title {
    margin-left: 15px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.code-content {
    padding: 20px;
    position: relative;
}

.code-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.5;
    color: #f8f8f2;
    background-color: #1e1e1e;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.explanation-bubble {
    position: absolute;
    right: -20px;
    bottom: 40px;
    width: 250px;
    background-color: var(--primary-dark);
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateX(20px);
    animation: fadeInRight 0.8s ease 1.4s forwards;
}

.explanation-bubble::after {
    content: '';
    position: absolute;
    right: 100%;
    bottom: 20px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-right-color: var(--primary-dark);
}

.explanation-bubble p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Features Section */
.features {
    background-color: var(--surface-dark);
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

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

.feature-card {
    background-color: var(--surface);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(20px);
}

.feature-card:nth-child(1) {
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.feature-card:nth-child(2) {
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.feature-card:nth-child(3) {
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.feature-card:nth-child(4) {
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.1), rgba(0, 187, 249, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: rotateY(180deg);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

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

/* How It Works Section */
.how-it-works {
    background-color: var(--background);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0.3;
}

.step {
    display: flex;
    gap: 20px;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
}

.step:nth-child(1) {
    animation: fadeInRight 0.8s ease 0.2s forwards;
}

.step:nth-child(2) {
    animation: fadeInRight 0.8s ease 0.4s forwards;
}

.step:nth-child(3) {
    animation: fadeInRight 0.8s ease 0.6s forwards;
}

.step-number {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.step-content {
    padding-top: 15px;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

.step-content p {
    color: var(--text-secondary);
}

.step-connector {
    position: absolute;
    left: 40px;
    top: 80px;
    width: 2px;
    height: calc(100% + 40px);
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0.3;
}

/* Examples Section */
.examples {
    background-color: var(--surface-dark);
}

.examples-tabs {
    background-color: var(--surface);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-button {
    padding: 15px 25px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: var(--transition);
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--text-primary);
}

.tab-button.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.code-example {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.code-example pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #f8f8f2;
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-example code {
    display: block;
    white-space: pre;
}

.explanation {
    background-color: var(--surface-light);
    padding: 20px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.explanation h4 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.explanation p, .explanation ol {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.explanation ol {
    padding-left: 20px;
}

.explanation li {
    margin-bottom: 8px;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--background);
}

.testimonial-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--surface);
    border-radius: 10px;
    padding: 30px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(20px);
}

.testimonial-card:nth-child(1) {
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.testimonial-card:nth-child(2) {
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.testimonial-card:nth-child(3) {
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.testimonial-quote {
    position: relative;
    margin-bottom: 25px;
}

.testimonial-quote i {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 3rem;
    color: rgba(123, 44, 191, 0.1);
    z-index: 0;
}

.testimonial-quote p {
    position: relative;
    z-index: 1;
    font-style: italic;
    color: var(--text-primary);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.author-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Demo Section */
.demo {
    background-color: var(--surface-dark);
}

.demo-container {
    background-color: var(--surface);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--surface-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-tabs {
    display: flex;
    gap: 10px;
}

.editor-tab {
    padding: 8px 15px;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-radius: 5px;
}

.editor-tab.active {
    background-color: rgba(123, 44, 191, 0.2);
    color: var(--primary);
}

.run-button {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.run-button:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.run-button i {
    font-size: 0.8rem;
}

.editor-content {
    padding: 20px;
}

#code-input {
    width: 100%;
    min-height: 200px;
    background-color: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #f8f8f2;
    resize: vertical;
}

.demo-output {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.output-header h3 {
    color: var(--secondary);
    font-size: 1.2rem;
}

.output-loader {
    display: none;
    gap: 5px;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: bounce 1.5s infinite ease-in-out;
}

.loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.output-content {
    min-height: 100px;
    background-color: var(--surface-light);
    border-radius: 5px;
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.output-content p {
    margin: 0;
}

/* Footer */
.footer {
    background-color: var(--surface-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand {
    max-width: 300px;
}

.footer .logo {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface);
    border-radius: 50%;
    color: var(--text-primary);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-links h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-legal a:hover {
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInRight {
    from { 
        opacity: 0;
        transform: translateX(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(123, 44, 191, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(123, 44, 191, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(123, 44, 191, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: rotateY(-15deg) rotateX(5deg) translateY(0);
    }
    50% {
        transform: rotateY(-15deg) rotateX(5deg) translateY(-10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .cta-button {
        margin: 0 auto;
    }
    
    .hero-illustration {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .code-example {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .nav-list {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--surface-dark);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 15px;
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 999;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-list.active {
        transform: translateY(0);
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-toggle.active .hamburger {
        background-color: transparent;
    }
    
    .nav-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .nav-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .steps::before {
        left: 40px;
    }
    
    .step {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .step-connector {
        left: 30px;
        top: 60px;
        height: calc(100% + 30px);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
}