/* Vizly Website - Main Styles */

:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-gold: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);

    /* Dark theme */
    --bg-dark: #0f172a;
    --bg-dark-secondary: #1e293b;
    --text-dark: #f8fafc;
    --text-dark-secondary: #cbd5e1;

    /* Light theme */
    --bg-light: #ffffff;
    --bg-light-secondary: #f8fafc;
    --text-light: #1e293b;
    --text-light-secondary: #64748b;

    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 80px 0;
    --card-padding: 2rem;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background: var(--bg-light);
    color: var(--text-light);
    transition: var(--transition-normal);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background: var(--bg-dark);
        color: var(--text-dark);
    }
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: var(--font-size-5xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light-secondary);
}

@media (prefers-color-scheme: dark) {
    p {
        color: var(--text-dark-secondary);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition-normal);
}

@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(15, 23, 42, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.navbar {
    padding: 1rem 0;
}

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

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    font-size: var(--font-size-xl);
    font-weight: 700;
}

@media (prefers-color-scheme: dark) {
    .nav-brand .logo {
        color: var(--text-dark);
    }
}

.nav-brand .logo i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.version {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition-fast);
}

@media (prefers-color-scheme: dark) {
    .nav-toggle span {
        background: var(--text-dark);
    }
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
    padding: var(--section-padding);
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.hero p {
    font-size: var(--font-size-xl);
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--accent-color);
    display: block;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
.section {
    padding: var(--section-padding);
}

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

.section-title {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-light-secondary);
    max-width: 600px;
    margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
    .section-subtitle {
        color: var(--text-dark-secondary);
    }
}

/* Cards */
.card {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: var(--card-padding);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .card {
        background: var(--bg-dark-secondary);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.card-title {
    font-size: var(--font-size-xl);
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-light-secondary);
    line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
    .card-description {
        color: var(--text-dark-secondary);
    }
}

/* Grid layouts */
.grid {
    display: grid;
    gap: 2rem;
}

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

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

/* Code blocks */
.code-block {
    background: var(--bg-dark);
    color: var(--text-dark);
    padding: 1.5rem;
    border-radius: 0.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: var(--font-size-sm);
    overflow-x: auto;
    position: relative;
}

.code-block::before {
    content: attr(data-language);
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    color: var(--text-dark-secondary);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
}

/* Charts demo container */
.chart-demo {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .chart-demo {
        background: var(--bg-dark-secondary);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 1rem;
}

/* Performance indicators */
.performance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-success);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: var(--bg-dark);
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: var(--transition-normal);
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-dark);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h3 i {
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-dark-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

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

.social-links a:hover {
    transform: translateY(-2px);
}

.quick-install {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-dark-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-install code {
    background: none;
    color: var(--secondary-color);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-dark-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.version-info {
    font-size: var(--font-size-sm);
    color: var(--text-dark-secondary);
    margin-top: 0.5rem;
}

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

.footer-legal p {
    font-size: var(--font-size-sm);
    color: var(--text-dark-secondary);
    margin-bottom: 0.25rem;
}

.footer-performance {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-performance {
        justify-content: center;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}