:root {
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --secondary: #60A5FA;
    --accent: #93C5FD;
    --background: #0F172A;
    --surface: rgba(30, 41, 59, 0.7);
    --surface-hover: rgba(51, 65, 85, 0.8);
    --border: rgba(147, 197, 253, 0.15);
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --radius: 12px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
    position: relative;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(147, 197, 253, 0.1), transparent 25%);
}

.container {
    width: 100%;
    max-width: 1000px;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #60A5FA, #93C5FD);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.scanner-card {
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary);
}

input,
select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button {
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), #1D4ED8);
    color: white;
    height: 46px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hidden {
    display: none !important;
}

/* Progress State */
.scan-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.4s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

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

/* Dashboard */
.dashboard {
    animation: fadeInUp 0.6s ease-out;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.scan-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.score-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.score-card h3,
.stat-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: conic-gradient(var(--success) 0%, rgba(255, 255, 255, 0.1) 0%);
    position: relative;
    transition: background 1s ease-out;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 84px;
    height: 84px;
    background: #151e2f;
    /* Darker to match slightly below surface */
    border-radius: 50%;
}

.score-circle span {
    position: relative;
    z-index: 1;
}

.score-circle .percent {
    font-size: 1rem;
    margin-left: 2px;
}

.status-text {
    font-weight: 600;
    color: var(--success);
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-value.warning {
    color: var(--warning);
}

.stat-value.success {
    color: var(--success);
}

.stat-value.danger {
    color: var(--danger);
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Tabs */
.details-section {
    padding: 0;
    overflow: hidden;
}

.section-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    border-radius: 0;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.tab-btn:hover:not(.active) {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* List Items */
.cookie-item,
.issue-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.cookie-item:hover,
.issue-item:hover {
    transform: translateX(4px);
    border-color: rgba(96, 165, 250, 0.4);
}

.cookie-item:last-child,
.issue-item:last-child {
    margin-bottom: 0;
}

.cookie-info h4,
.issue-info h4 {
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.necessary {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge.analytics {
    background: rgba(59, 130, 246, 0.2);
    color: var(--secondary);
}

.badge.marketing {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge.high {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.cookie-domain {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.issue-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    form {
        grid-template-columns: 1fr;
    }

    .score-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .score-cards {
        grid-template-columns: 1fr;
    }

    .cookie-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}