:root {
    /* Light Theme */
    --bg-base: #f8fafc;
    --bg-grid: rgba(15, 23, 42, 0.05);
    --panel-bg: rgba(255, 255, 255, 0.7);
    --panel-border: rgba(255, 255, 255, 0.4);
    --panel-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;

    --blob-1: #60a5fa;
    --blob-2: #34d399;
}

[data-theme="dark"] {
    --bg-base: #020617;
    --bg-grid: rgba(255, 255, 255, 0.03);
    --panel-bg: rgba(15, 23, 42, 0.6);
    --panel-border: rgba(255, 255, 255, 0.05);
    --panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --blob-1: #2563eb;
    --blob-2: #059669;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Grids & Blobs */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 30px 30px;
    background-image: linear-gradient(to right, var(--bg-grid) 1px, transparent 1px),
        linear-gradient(to bottom, var(--bg-grid) 1px, transparent 1px);
    z-index: -2;
}

.blob {
    position: fixed;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.15;
    z-index: -1;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--blob-1);
    animation-delay: -5s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--blob-2);
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 10%) scale(1.1);
    }
}

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

/* Header */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header .logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
}

#theme-toggle {
    position: absolute;
    right: 0;
    top: 0;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

/* Glass Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--panel-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Score Card */
.score-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .score-card {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }
}

.score-circle-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-circle-bg {
    fill: none;
    stroke: var(--panel-border);
    stroke-width: 8;
}

.score-circle-progress {
    fill: none;
    stroke: var(--accent-blue);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    /* Wait for JS */
    transition: stroke-dashoffset 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), stroke 0.5s ease;
}

.score-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#overall-score {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.score-max {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

.score-details h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.score-details p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Actions */
.actions {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
}

.btn-secondary:hover {
    background: rgba(128, 128, 128, 0.05);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
}

/* Data Points Grid */
.data-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.data-card {
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

.data-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--panel-shadow), 0 12px 24px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-grid);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: var(--bg-grid);
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.good {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.status-indicator.good::before {
    background: var(--accent-green);
}

.status-indicator.warning {
    color: var(--accent-orange);
    background: rgba(245, 158, 11, 0.1);
}

.status-indicator.warning::before {
    background: var(--accent-orange);
}

.status-indicator.bad {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.status-indicator.bad::before {
    background: var(--accent-red);
}

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

.exposed-data {
    margin-top: 1rem;
    font-family: monospace;
    font-size: 0.8rem;
    background: var(--bg-grid);
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    word-break: break-all;
    display: none;
}

.exposed-data.visible {
    display: block;
}