/* MintSpector — CSS */

:root {
    --color-bg: #0a0e14;
    --color-surface: #1a1f29;
    --color-border: #2d3748;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-safe: #10b981;
    --color-caution: #f59e0b;
    --color-danger: #ef4444;
    --color-unknown: #64748b;
    --color-primary: #3b82f6;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Header */
header {
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* Main */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Scan Section */
.scan-section {
    margin-bottom: 2rem;
}

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

.input-group label {
    font-weight: 600;
    color: var(--color-text);
}

.input-group input {
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.input-group button {
    padding: 0.75rem 2rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.input-group button:hover {
    opacity: 0.9;
}

.input-group button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Verdict Section */
.verdict-section {
    margin-bottom: 2rem;
}

.verdict-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.verdict-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

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

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

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

.score-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.score-label {
    font-size: 1rem;
    color: var(--color-text-muted);
}

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

.score-max {
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.scanned-address {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    word-break: break-all;
}

/* Evidence Section */
.evidence-section h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.evidence-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.evidence-item {
    background: var(--color-surface);
    border-left: 4px solid var(--color-border);
    padding: 1rem;
    border-radius: var(--radius);
}

.evidence-item.safe {
    border-left-color: var(--color-safe);
}

.evidence-item.caution {
    border-left-color: var(--color-caution);
}

.evidence-item.danger {
    border-left-color: var(--color-danger);
}

.evidence-item.unknown {
    border-left-color: var(--color-unknown);
}

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

.evidence-check {
    font-weight: 600;
    text-transform: capitalize;
}

.evidence-points {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.evidence-detail {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Error Section */
.error-section {
    margin-bottom: 2rem;
}

.error-card {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-danger);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.error-card h3 {
    color: var(--color-danger);
    margin-bottom: 0.5rem;
}

#error-message {
    color: var(--color-text-muted);
}

/* Footer */
footer {
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.disclaimer {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* Loading State */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
}

.loading.active {
    display: block;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-status {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.empty-state p {
    font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }

    header {
        padding: 1.5rem 0;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 0.875rem;
    }

    main {
        padding: 1.5rem 0;
    }

    .input-group input,
    .input-group button {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }

    .verdict-card {
        padding: 1.25rem;
    }

    .verdict-badge {
        font-size: 1rem;
        padding: 0.375rem 1rem;
        margin-bottom: 1rem;
    }

    .score-display {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .score-label {
        width: 100%;
        font-size: 0.875rem;
    }

    .score-value {
        font-size: 2rem;
    }

    .score-max {
        font-size: 1.25rem;
    }

    .scanned-address {
        font-size: 0.75rem;
    }

    .evidence-section h2 {
        font-size: 1.25rem;
    }

    .evidence-item {
        padding: 0.75rem;
    }

    .evidence-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .evidence-check {
        font-size: 0.875rem;
    }

    .evidence-points,
    .evidence-detail {
        font-size: 0.8125rem;
    }

    .error-card {
        padding: 1.25rem;
    }

    .error-card h3 {
        font-size: 1rem;
    }

    footer {
        padding: 1.5rem 0;
        font-size: 0.8125rem;
    }

    .disclaimer {
        font-size: 0.6875rem;
    }
}

/* Phone-width specific (390px reference) */
@media (max-width: 390px) {
    header h1 {
        font-size: 1.5rem;
    }

    .verdict-card {
        padding: 1rem;
    }

    .score-value {
        font-size: 1.75rem;
    }

    .evidence-item {
        padding: 0.625rem;
    }
}
