:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --font: 'Inter', system-ui, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

/* Navbar */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

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

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

/* Hero */
.hero {
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Buttons & Inputs */
.btn-primary,
.search-box button {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}

.btn-primary:hover,
.search-box button:hover {
    background: var(--primary-dark);
}

.search-box {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    max-width: 700px;
    margin: 0 auto 1rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.search-box input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.audit-section {
    padding: 5rem 0;
}

.status {
    text-align: center;
    color: var(--text-light);
    min-height: 1.5rem;
}

/* Dashboard */
.dashboard {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 900px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.hidden {
    display: none;
}

.score-section {
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.gauge-wrapper {
    width: 140px;
    margin: 0 auto 1rem;
}

.circle-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

.percentage {
    fill: var(--text);
    font-weight: 700;
    font-size: 0.6em;
    text-anchor: middle;
    font-family: var(--font);
}

.device-info {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    display: flex;
    gap: 1rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.meta h4 {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.value {
    font-size: 1.5rem;
    font-weight: 700;
}

.diagnostics h3 {
    margin-bottom: 1rem;
}

.diagnostics ul {
    list-style: none;
}

.diagnostics li {
    background: #fff1f2;
    border-left: 4px solid var(--error);
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.save-metric {
    font-weight: 600;
    color: var(--error);
    font-family: monospace;
}

/* Features */
.features-section {
    padding: 5rem 0;
    background: var(--bg-alt);
}

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

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

.feature-card:hover {
    transform: translateY(-5px);
}

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

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

.feature-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.link-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.link-btn:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* Utils */
.pass {
    stroke: var(--success);
    color: var(--success);
    background-color: var(--success);
}

.average {
    stroke: var(--warning);
    color: var(--warning);
    background-color: var(--warning);
}

.fail {
    stroke: var(--error);
    color: var(--error);
    background-color: var(--error);
}

.loader {
    text-align: center;
    margin: 3rem 0;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

@keyframes progress {
    0% {
        stroke-dasharray: 0, 100;
    }
}

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

    .nav-links {
        display: none;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }
}