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

:root {
    --primary-color: #2563eb;
    --success-color: #16a34a;
    --warning-color: #ea580c;
    --error-color: #dc2626;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

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

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.email-display {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.email-display .loading {
    color: var(--text-muted);
    font-family: inherit;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-large {
    font-size: 1.2rem;
    padding: 1rem 2rem;
}

.instructions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.instructions h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.instructions ol {
    margin-left: 1.5rem;
}

.instructions li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

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

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

.hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.score-display {
    text-align: center;
    margin: 2rem 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 3rem;
    font-weight: bold;
    color: white;
}

.score-10 { background: var(--success-color); }
.score-9, .score-8 { background: #22c55e; }
.score-7, .score-6 { background: #eab308; }
.score-5, .score-4 { background: var(--warning-color); }
.score-3, .score-2, .score-1, .score-0 { background: var(--error-color); }

.score-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.score-subtitle {
    color: var(--text-muted);
}

.section {
    margin: 2rem 0;
}

.section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.check-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: var(--bg-color);
}

.check-item.success {
    background: #f0fdf4;
    border-left: 4px solid var(--success-color);
}

.check-item.warning {
    background: #fff7ed;
    border-left: 4px solid var(--warning-color);
}

.check-item.error {
    background: #fef2f2;
    border-left: 4px solid var(--error-color);
}

.check-item.info {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
}

.check-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.check-content {
    flex: 1;
}

.check-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.rule-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border-radius: 6px;
}

.rule-score {
    font-weight: 600;
    color: var(--text-color);
}

.rule-score.positive {
    color: var(--error-color);
}

.rule-score.negative {
    color: var(--success-color);
}

.blocklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.blocklist-item {
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.blocklist-item.not-listed {
    background: #f0fdf4;
    color: var(--success-color);
}

.blocklist-item.listed {
    background: #fef2f2;
    color: var(--error-color);
}

.metadata {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.metadata-item:last-child {
    border-bottom: none;
}

.metadata-label {
    font-weight: 600;
    color: var(--text-muted);
}

.metadata-value {
    color: var(--text-color);
    text-align: right;
}

.info-section {
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-color);
}

.cta-section {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
}

.small {
    font-size: 0.9rem;
}

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

    .card {
        padding: 1.5rem;
    }

    .email-display {
        font-size: 1rem;
    }

    .blocklist-grid {
        grid-template-columns: 1fr;
    }
}
