/* /var/www/andybrok.com/scripts/razgon/app/static/css/style.css */
/* Создано: 2026-10-22 */
/* Причина: Ультралёгкий дизайн SiteBoost.dev в стиле Bento (светлая и тёмная темы) */
/* Автор: AndyBrok */

:root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-accent-soft: #eef2ff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --emerald: #10b981;
    --emerald-bg: #ecfdf5;
    --amber: #f59e0b;
    --amber-bg: #fffbeb;
    --rose: #ef4444;
    --rose-bg: #fef2f2;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 30px -5px rgba(15, 23, 42, 0.07);
    --radius-lg: 18px;
    --radius-md: 12px;
}

[data-theme="dark"] {
    --bg-body: #090d16;
    --bg-card: #111827;
    --bg-subtle: #1e293b;
    --bg-accent-soft: #1e1b4b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-color: #1f2937;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --emerald-bg: rgba(16, 185, 129, 0.14);
    --amber-bg: rgba(245, 158, 11, 0.14);
    --rose-bg: rgba(239, 68, 68, 0.14);
    --shadow-md: 0 12px 32px -6px rgba(0, 0, 0, 0.45);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.85);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}
.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
}
.beta-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-accent-soft);
    color: var(--primary);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background: var(--bg-subtle);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.icon-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 6px 11px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.icon-btn:hover {
    border-color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 52px 0 36px;
    text-align: center;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-accent-soft);
    color: var(--primary);
    font-size: 0.83rem;
    font-weight: 700;
    margin-bottom: 18px;
}
.hero h1 {
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 850;
    letter-spacing: -0.03em;
    line-height: 1.12;
    max-width: 850px;
    margin: 0 auto 16px;
}
.hero p.lead {
    font-size: 1.12rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 28px;
}

/* Search Box */
.audit-box {
    max-width: 820px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-md);
}
.mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.mode-tab {
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-subtle);
    color: var(--text-muted);
    cursor: pointer;
    border: 1px solid transparent;
}
.mode-tab.active {
    background: var(--bg-accent-soft);
    color: var(--primary);
    border-color: rgba(79, 70, 229, 0.25);
}
.input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}
.url-input-wrap {
    flex: 1;
    min-width: 240px;
    position: relative;
    display: flex;
    align-items: center;
}
.url-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 1.02rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.15s;
}
.url-input:focus {
    border-color: var(--primary);
}
.device-switch {
    display: inline-flex;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}
.dev-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0 13px;
    height: 44px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
}
.dev-btn.active {
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}
.primary-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    height: 52px;
    padding: 0 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.primary-btn:hover {
    background: var(--primary-hover);
}
.primary-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}
.trust-bar {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 14px;
    font-size: 0.84rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

/* Bento Grid & Cards */
.section {
    padding: 34px 0;
}
.section-header {
    text-align: center;
    margin-bottom: 28px;
}
.section-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.section-header p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 18px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 20px;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.card-title {
    font-size: 1.1rem;
    font-weight: 750;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Score Gauges */
.gauges-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.gauge-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    text-align: center;
}
.gauge-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 850;
    border: 6px solid var(--border-color);
}
.score-good {
    color: var(--emerald);
    border-color: var(--emerald);
    background: var(--emerald-bg);
}
.score-warn {
    color: var(--amber);
    border-color: var(--amber);
    background: var(--amber-bg);
}
.score-bad {
    color: var(--rose);
    border-color: var(--rose);
    background: var(--rose-bg);
}

/* CWV Strip */
.cwv-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.cwv-item {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}
.cwv-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}
.cwv-val {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 4px 0;
}
.pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}
.pill-good { background: var(--emerald-bg); color: var(--emerald); }
.pill-warn { background: var(--amber-bg); color: var(--amber); }
.pill-bad { background: var(--rose-bg); color: var(--rose); }

/* Progress Bar */
.progress-wrap {
    margin: 18px 0;
}
.progress-track {
    width: 100%;
    height: 12px;
    background: var(--bg-subtle);
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    transition: width 0.35s ease;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th, .data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.data-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
}

/* Footer */
.footer {
    margin-top: 56px;
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.88rem;
}

@media (max-width: 820px) {
    .gauges-row { grid-template-columns: repeat(2, 1fr); }
    .cwv-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}
