/* ===========================
   MultiEditor - Dark Flat Theme
   =========================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #1a1a1a;
    --bg-surface: #2a2a2a;
    --bg-hover: #333333;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #666666;
    --accent: #4a9eff;
    --accent-hover: #6ab3ff;
    --accent-dim: rgba(74, 158, 255, 0.15);
    --border: #3a3a3a;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --max-width: 900px;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

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

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 158, 255, 0.3);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-disabled {
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: not-allowed;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    background: linear-gradient(180deg, var(--bg-primary) 0%, #141414 100%);
}

.hero-content {
    text-align: center;
    padding: 80px 24px 60px;
    width: 100%;
    max-width: var(--max-width);
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 500;
}

.hero-sub {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-visual {
    display: none;
}

/* Code Preview Animation */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.editor-preview {
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
}

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

.preview-header {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #252525;
    border-bottom: 1px solid var(--border);
}

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

.preview-dot.red { background: #ff5f57; }
.preview-dot.yellow { background: #febc2e; }
.preview-dot.green { background: #28c840; }

.preview-content {
    padding: 20px;
    font-family: "SF Mono", "Menlo", monospace;
    font-size: 14px;
    line-height: 1.8;
}

.code-line {
    color: var(--text-secondary);
}

.keyword { color: #c678dd; }
.key { color: #e5c07b; }
.string { color: #98c379; }

/* Sections */
section {
    padding: 100px 0;
    border-bottom: 1px solid var(--border);
}

section h2 {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-size: 16px;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

/* Download Section */
.download {
    background: var(--bg-surface);
}

.download-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    min-width: 280px;
    transition: all 0.25s ease;
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.coming-soon {
    opacity: 0.6;
}

.platform-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.download-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.download-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Support Section */
.support-form {
    max-width: 560px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.support-form .btn {
    width: 100%;
}

/* Privacy Section */
.privacy-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.privacy-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text-primary);
}

.privacy-content h3:first-child {
    margin-top: 0;
}

.privacy-content p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 12px;
    line-height: 1.7;
}

.privacy-content a {
    color: var(--accent);
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 13px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-surface);
    border: 1px solid var(--accent);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
    box-shadow: var(--shadow);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for feature cards */
.feature-card {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in.visible .feature-card {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:nth-child(1) { transition-delay: 0.05s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.15s; }
.feature-card:nth-child(4) { transition-delay: 0.2s; }
.feature-card:nth-child(5) { transition-delay: 0.25s; }
.feature-card:nth-child(6) { transition-delay: 0.3s; }

/* Responsive */
@media (min-width: 768px) {
    .hero-visual {
        display: block;
        max-width: 500px;
        margin: 0 auto;
        padding: 0 24px;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: var(--nav-height);
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-tagline {
        font-size: 20px;
    }

    .nav-links {
        display: none;
    }

    section {
        padding: 70px 0;
    }

    section h2 {
        font-size: 28px;
    }

    .download-card {
        min-width: 100%;
    }
}

/* Mobile nav toggle hint */
@media (max-width: 768px) {
    .navbar::after {
        content: "☰";
        position: absolute;
        right: 24px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-secondary);
        font-size: 20px;
    }
}
