/* CSS Variables */
:root {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --accent: #eab308;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
}

.github-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.github-btn:hover {
    background: var(--border-color);
}

/* Hero Section */
.hero {
    padding: 2rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.install-command {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.install-command code {
    padding: 0.75rem 1rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.9rem;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 0.5rem;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.platforms {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.badge {
    background: var(--bg-card);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Terminal Preview */
.terminal-preview {
    max-width: 700px;
    margin: 0 auto;
}

.terminal-window {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #0f172a;
    border-bottom: 1px solid var(--border-color);
}

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

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27ca40; }

.terminal-title {
    margin-left: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.waiting .status-icon {
    color: var(--danger);
    animation: blink 1s infinite;
}

.running .status-icon {
    color: var(--warning);
    animation: spin 1s linear infinite;
}

.ready .status-icon {
    color: var(--success);
}

.idle .status-icon {
    color: var(--text-muted);
}

.session-name {
    font-weight: 600;
    min-width: 120px;
}

.session-group {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.status-text {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Features Section */
.features {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

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

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

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

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

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

.feature-preview {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.mini-icon {
    font-size: 1.25rem;
}

.mini-icon.blink {
    color: var(--danger);
    animation: blink 1s infinite;
}

.mini-icon.spin {
    color: var(--warning);
    animation: spin 1s linear infinite;
}

/* Preview Section */
.preview-section {
    padding: 5rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.preview-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.preview-image {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.preview-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Install Section */
.install-section {
    padding: 5rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.install-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.install-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.install-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

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

.install-card > p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.code-block {
    position: relative;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}

.code-block .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.code-block pre {
    padding: 1rem;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.requirements {
    background: var(--bg-card);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
    display: inline-block;
}

.requirements h4 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.requirements ul {
    list-style: none;
}

.requirements li {
    color: var(--text-muted);
}

/* Story Section */
.story-section {
    padding: 5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.story-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.story-content blockquote {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    text-align: left;
}

.story-content blockquote p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.story-content blockquote p:last-of-type {
    margin-bottom: 1.5rem;
}

.story-content blockquote footer {
    color: var(--primary);
    font-weight: 600;
    font-style: italic;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Stats Section */
.stats-section {
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

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

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

.license {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stars {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .install-command {
        flex-direction: column;
        align-items: stretch;
    }

    .copy-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .install-methods {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Utility: Copied state */
.copy-btn.copied {
    background: var(--success);
}

.copy-btn.copied:hover {
    background: var(--success);
}
