/* ====================================
   ExcelAsSQL - Modern Website Styles
   Version 1.0 | 2026
   ==================================== */

/* CSS Variables */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #10b981;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --dark-lighter: #1e293b;
    --dark-card: #1a2332;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: #334155;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--dark-lighter);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-light);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text);
}

.btn-nav {
    background: var(--primary);
    color: var(--text) !important;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
}

.btn-nav:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 120px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.btn-icon {
    font-size: 1.1rem;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Terminal Component */
.terminal {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.terminal.large {
    min-height: 450px;
}

.terminal-header {
    background: var(--dark-lighter);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red { background: #ff5f57; }
.terminal-btn.yellow { background: #febc2e; }
.terminal-btn.green { background: #28c840; }

.terminal-title {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    min-height: 300px;
}

.terminal-line {
    margin-bottom: 4px;
}

.prompt {
    color: var(--secondary);
    margin-right: 8px;
}

.prompt-sql {
    color: var(--accent);
    margin-right: 8px;
}

.command {
    color: var(--text);
}

.command .kw {
    color: var(--primary-light);
    font-weight: 500;
}

.command .num {
    color: var(--warning);
}

.terminal-output {
    color: var(--text-muted);
    white-space: pre-wrap;
    margin: 8px 0 16px 0;
}

.output-table {
    color: var(--text);
    font-size: 0.85rem;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary-light);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Section Styling */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-muted);
}

/* Features Section */
.features {
    background: var(--gradient-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--dark-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Demo Section */
.demo {
    background: var(--dark);
}

.demo-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
}

.demo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-sidebar h4 {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-btn {
    background: var(--dark-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: var(--radius);
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.demo-btn:hover {
    border-color: var(--primary);
    color: var(--text);
}

.demo-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* SQL Support Section */
.sql-support {
    background: var(--gradient-dark);
}

.sql-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.sql-card {
    background: var(--dark-card);
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.sql-card h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--primary-light);
}

.sql-list {
    list-style: none;
}

.sql-list li {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
}

.sql-list li:last-child {
    border-bottom: none;
}

.sql-list code {
    margin-right: 8px;
}

.code-example {
    background: var(--dark-lighter);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
}

.code-example pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.code-example .kw {
    color: var(--primary-light);
}

.code-example .num {
    color: var(--warning);
}

.compat-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.compat-item {
    background: var(--dark-lighter);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.compat-text {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Functions Section */
.functions {
    background: var(--dark);
}

.functions-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.func-tab {
    background: var(--dark-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.func-tab:hover {
    border-color: var(--primary);
    color: var(--text);
}

.func-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.func-panel {
    display: none;
}

.func-panel.active {
    display: block;
}

.func-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.func-table th,
.func-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.func-table th {
    background: var(--dark-lighter);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.func-table td {
    font-size: 0.95rem;
}

.func-table td:first-child {
    color: var(--primary-light);
}

.func-table td:last-child {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.func-table tr:last-child td {
    border-bottom: none;
}

.func-table tr:hover td {
    background: rgba(59, 130, 246, 0.05);
}

/* Shell Commands Section */
.shell-commands {
    background: var(--gradient-dark);
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.cmd-card {
    background: var(--dark-card);
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.cmd-card h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--primary-light);
}

.cmd-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cmd-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cmd-item:last-child {
    border-bottom: none;
}

.cmd-item code {
    font-size: 0.85rem;
}

.cmd-item span {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Download Section */
.download {
    background: var(--dark);
    text-align: center;
}

.download-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.download-content > p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 48px;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.download-card {
    background: var(--dark-card);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.download-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    color: var(--text);
}

.download-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.download-card h4 {
    font-size: 1.25rem;
}

.download-file {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.download-size {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.download-alt {
    margin-top: 32px;
}

.download-alt p {
    color: var(--text-dim);
    margin-bottom: 16px;
}

.code-block {
    display: inline-block;
    background: var(--dark-card);
    padding: 16px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.code-block code {
    font-size: 0.9rem;
    background: transparent;
    padding: 0;
    color: var(--text);
}

/* Footer */
.footer {
    background: var(--dark-lighter);
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-dim);
    margin-top: 12px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h5 {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a {
    display: block;
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 100px;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-terminal {
        order: 2;
    }
    
    .hero h1 {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 32px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .demo-container {
        grid-template-columns: 1fr;
    }
    
    .demo-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .download-options {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 48px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        justify-items: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .features-grid,
    .sql-grid,
    .commands-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .functions-tabs {
        gap: 4px;
    }
    
    .func-tab {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
