/* HTTP Security Header Scanner Theme */

:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --accent: #00CEC9;
    --accent-light: #55EFC4;
    --bg-base: #0F0E17;
    --bg-surface: #1A1929;
    --bg-elevated: #25243A;
    --bg-glass: rgba(26, 25, 41, 0.65);
    --text-primary: #FFFFFE;
    --text-secondary: #A7A9BE;
    --text-muted: #5E5F77;
    --border: rgba(167, 169, 190, 0.1);
    --border-active: rgba(108, 92, 231, 0.4);
    --success: #00B894;
    --warn: #FDCB6E;
    --error: #FF6B6B;
    --radius: 12px;
    --radius-sm: 8px;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 50% 40% at 30% 20%, rgba(108, 92, 231, 0.06), transparent), radial-gradient(ellipse 40% 30% at 70% 80%, rgba(0, 206, 201, 0.04), transparent);
    pointer-events: none;
}

.app {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 20px 0 14px;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
}

h1 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.main {
    flex: 1;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.headers-input {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
}

.headers-input:focus {
    border-color: var(--border-active);
}

.headers-input::placeholder {
    color: var(--text-muted);
}

.input-actions {
    display: flex;
    gap: 8px;
}

/* Grade */
.grade-section {
    display: flex;
    justify-content: center;
}

.grade-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 32px;
}

.grade-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.grade-circle.grade-a {
    background: linear-gradient(135deg, var(--success), #2ECC71);
    color: white;
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.3);
}

.grade-circle.grade-b {
    background: linear-gradient(135deg, #00B894, #55EFC4);
    color: #0A1A14;
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.2);
}

.grade-circle.grade-c {
    background: linear-gradient(135deg, var(--warn), #F39C12);
    color: #1A100A;
    box-shadow: 0 0 20px rgba(253, 203, 110, 0.2);
}

.grade-circle.grade-d {
    background: linear-gradient(135deg, #E17055, #D63031);
    color: white;
    box-shadow: 0 0 20px rgba(225, 112, 85, 0.2);
}

.grade-circle.grade-f {
    background: linear-gradient(135deg, var(--error), #C0392B);
    color: white;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.grade-score {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.grade-score strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.grade-summary {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Results */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-card {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.result-status {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.result-status.pass {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.result-status.warn {
    background: rgba(253, 203, 110, 0.15);
    color: var(--warn);
}

.result-status.fail {
    background: rgba(255, 107, 107, 0.15);
    color: var(--error);
}

.result-content {
    flex: 1;
}

.result-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-value {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--primary-light);
    margin-top: 2px;
    word-break: break-all;
}

.result-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Recommendations */
.recs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rec-card {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}

.rec-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--warn);
    margin-bottom: 4px;
}

.rec-body {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.rec-code {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-light);
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 6px;
    white-space: pre-wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    box-shadow: 0 0 14px rgba(108, 92, 231, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 0 22px rgba(108, 92, 231, 0.35);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-elevated);
    color: var(--success);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(0, 184, 148, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 300ms ease;
    pointer-events: none;
    z-index: 100;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.footer {
    padding: 14px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.72rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .grade-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .app {
        padding: 0 12px;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(167, 169, 190, 0.2);
    border-radius: 3px;
}

::selection {
    background: rgba(108, 92, 231, 0.3);
    color: white;
}