/* ==================== SHARED AUTH / LANDING ==================== */

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

:root {
    --bg: #000;
    --bg2: #0a0a0a;
    --bg3: #111;
    --border: #1a1a1a;
    --border2: #242424;
    --text: #e8e8e8;
    --text2: #888;
    --text3: #555;
    --accent: #8B1538;
    --accent2: #A91B45;
    --success: #2ecc71;
    --error: #e74c3c;
    --font: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
}

[data-theme="light"] {
    --bg: #f5f5f5;
    --bg2: #fff;
    --bg3: #f0f0f0;
    --border: #e0e0e0;
    --border2: #d0d0d0;
    --text: #111;
    --text2: #555;
    --text3: #999;
}

html, body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    transition: background 0.2s, color 0.2s;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
}

[data-theme="light"] .navbar {
    background: rgba(245,245,245,0.85);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
    text-decoration: none;
}

.navbar-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border2);
    background: var(--bg3);
    color: var(--text2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.theme-btn:hover { background: var(--border2); color: var(--text); }
.theme-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover { background: var(--accent2); text-decoration: none; color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text2);
    border: 1px solid var(--border2);
}

.btn-ghost:hover { background: var(--bg3); color: var(--text); text-decoration: none; }

/* ── MAC WINDOW ── */
.mac-window {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

.mac-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
}

.mac-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mac-dot.close { background: #ff5f57; }
.mac-dot.minimize { background: #febc2e; }
.mac-dot.maximize { background: #28c840; }

.mac-titlebar-label {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: var(--text3);
    font-family: var(--mono);
}

.mac-body {
    padding: 20px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.8;
}

/* Code coloring */
.code-comment { color: #555; font-style: italic; }
.code-keyword { color: #c792ea; }
.code-fn { color: #82aaff; }
.code-string { color: #c3e88d; }
.code-number { color: #f78c6c; }
.code-var { color: #eeffff; }
.code-key { color: #89ddff; }

/* ==================== LANDING PAGE ==================== */

.landing { padding-top: 64px; }

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 24px 80px;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid var(--border2);
    background: var(--bg3);
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 28px;
    font-family: var(--mono);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: clamp(36px, 6vw, 60px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero h1 span { color: var(--accent); }

.hero p {
    font-size: 18px;
    color: var(--text2);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Demo windows section */
.demo-section {
    padding: 60px 24px 100px;
    max-width: 1100px;
    margin: 0 auto;
}

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* Features */
.features-section {
    padding: 80px 24px;
    max-width: 960px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.features-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
}

.feature-card p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
}

/* Pricing */
.pricing-section {
    padding: 80px 24px;
    border-top: 1px solid var(--border);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.pricing-section h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.pricing-section > p {
    color: var(--text2);
    margin-bottom: 48px;
    font-size: 15px;
}

.pricing-mac {
    box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

.pricing-card {
    padding: 32px 40px 40px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pricing-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.pricing-name {
    font-size: 18px;
    font-weight: 700;
}

.pricing-price {
    font-size: 40px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -1px;
}

.pricing-price span {
    font-size: 15px;
    font-weight: 400;
    color: var(--text2);
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text2);
}

.pricing-features li::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 11px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Footer */
.landing-footer {
    padding: 32px 48px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text3);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand img { width: 22px; height: 22px; border-radius: 6px; }

/* ==================== AUTH PAGES (login / register) ==================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.auth-logo img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.auth-logo h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-logo p {
    font-size: 14px;
    color: var(--text2);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
}

.auth-input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border2);
    background: var(--bg3);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
}

.auth-input:focus { border-color: var(--accent); }

.auth-submit {
    width: 100%;
    justify-content: center;
    padding: 11px;
    font-size: 15px;
    margin-top: 4px;
}

.auth-error {
    font-size: 13px;
    color: var(--error);
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    display: none;
}

.auth-error.visible { display: block; }

.auth-footer-link {
    text-align: center;
    font-size: 13px;
    color: var(--text2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .demo-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .pricing-top { flex-direction: column; }
    .landing-footer { flex-direction: column; gap: 12px; text-align: center; }
}
