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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f9fafb;
    color: #111;
    font-size: 15px;
    line-height: 1.6;
}

a { color: #6366f1; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Nav */
nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-brand { font-weight: 700; font-size: 18px; color: #6366f1; letter-spacing: -0.5px; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: #555; font-size: 14px; }
.nav-links a:hover { color: #6366f1; text-decoration: none; }
.nav-user { font-size: 14px; color: #888; }

/* Page wrapper */
.page { padding: 40px 20px; max-width: 900px; margin: 0 auto; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 24px; color: #111; }

/* Cards */
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px;
    margin-bottom: 20px;
}
.card-title { font-size: 15px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 7px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s;
    text-decoration: none;
}
.btn:hover { opacity: .85; text-decoration: none; }
.btn-primary { background: #6366f1; color: #fff; }
.btn-secondary { background: #f3f4f6; color: #333; border: 1px solid #e5e7eb; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px; }
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
    background: #fff;
}
.form-control:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.form-hint { font-size: 12px; color: #9ca3af; margin-top: 4px; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 7px;
    margin-bottom: 18px;
    font-size: 14px;
}
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}
.badge-ready    { background: #dcfce7; color: #15803d; }
.badge-crawling { background: #fef9c3; color: #a16207; }
.badge-error    { background: #fee2e2; color: #b91c1c; }
.badge-pending  { background: #f3f4f6; color: #6b7280; }

/* Code block */
.code-block {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 14px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre;
    margin: 8px 0;
}

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #9ca3af; border-bottom: 2px solid #e5e7eb; }
td { padding: 12px; border-bottom: 1px solid #f3f4f6; }
tr:last-child td { border-bottom: none; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f9fafb; }
.auth-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 40px; width: 100%; max-width: 420px; }
.auth-logo { font-size: 22px; font-weight: 800; color: #6366f1; margin-bottom: 8px; }
.auth-sub { color: #9ca3af; font-size: 14px; margin-bottom: 28px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 13px; color: #9ca3af; }

/* Hero */
.hero { padding: 80px 20px 60px; text-align: center; }
.hero h1 { font-size: 42px; font-weight: 800; letter-spacing: -1px; color: #111; margin-bottom: 16px; }
.hero h1 span { color: #6366f1; }
.hero p { font-size: 18px; color: #6b7280; max-width: 500px; margin: 0 auto 32px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px 20px 80px; max-width: 900px; margin: 0 auto; }
.feature-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 24px; }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: #9ca3af; }

/* Stat row */
.stats { display: flex; gap: 24px; margin-bottom: 24px; }
.stat { flex: 1; background: #f9fafb; border-radius: 8px; padding: 16px; text-align: center; }
.stat-num { font-size: 28px; font-weight: 800; color: #6366f1; }
.stat-label { font-size: 12px; color: #9ca3af; margin-top: 2px; }

/* Spinner */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #e5e7eb; border-top-color: #6366f1; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress bar */
.progress-bar { height: 4px; background: #e5e7eb; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: #6366f1; border-radius: 99px; animation: progress-pulse 1.5s ease-in-out infinite; }
@keyframes progress-pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

@media (max-width: 640px) {
    .hero h1 { font-size: 28px; }
    .features { grid-template-columns: 1fr; }
    .stats { flex-direction: column; }
}
