/* FTRCRP IP Exposure Scanner */
:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface-alt: #1a1a25;
    --border: #2a2a3a;
    --text: #c8c8d4;
    --text-dim: #6a6a7a;
    --text-bright: #e8e8f0;
    --accent: #5b8def;
    --accent-dim: #3a5a9e;
    --green: #4ade80;
    --yellow: #fbbf24;
    --orange: #f97316;
    --red: #ef4444;
    --radius: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

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

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

header h1 {
    font-size: 1.8rem;
    color: var(--text-bright);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* Scan box */
.scan-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.ip-display {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.2rem;
}

.ip-display .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.ip-display .ip {
    font-size: 1.6rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--accent);
    font-weight: 600;
}

#scan-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#scan-btn:hover:not(:disabled) {
    background: var(--accent-dim);
    transform: translateY(-1px);
}

#scan-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.disclaimer {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 1rem;
    line-height: 1.5;
}

/* Results */
.hidden { display: none !important; }

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.error-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Risk banner */
.risk-banner {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.risk-label {
    font-size: 1.1rem;
    font-weight: 700;
}

.risk-detail {
    font-size: 0.85rem;
    opacity: 0.85;
}

.risk-low {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
}

.risk-medium {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid var(--yellow);
    color: var(--yellow);
}

.risk-high {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid var(--orange);
    color: var(--orange);
}

.risk-critical {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--red);
    color: var(--red);
}

/* Result sections */
.result-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
}

.result-section h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.result-section.meta {
    background: none;
    border: none;
    padding: 0.5rem 0;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 0.5rem 0;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.data-table th {
    color: var(--text-dim);
    font-weight: 500;
    width: 40%;
}

.data-table td {
    color: var(--text-bright);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
}

.data-table tr:last-child th,
.data-table tr:last-child td {
    border-bottom: none;
}

/* Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag.port {
    background: rgba(91, 141, 239, 0.15);
    color: var(--accent);
    border: 1px solid rgba(91, 141, 239, 0.3);
}

.tag.vuln {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
    text-decoration: none;
}

a.tag.vuln:hover {
    background: rgba(239, 68, 68, 0.25);
}

.tag.cpe {
    background: rgba(251, 191, 36, 0.1);
    color: var(--yellow);
    border: 1px solid rgba(251, 191, 36, 0.3);
    font-size: 0.75rem;
}

.tag.tag {
    background: rgba(74, 222, 128, 0.1);
    color: var(--green);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* Findings list */
#findings-list {
    list-style: none;
    padding: 0;
}

#findings-list li {
    padding: 0.4rem 0;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--text);
}

#findings-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.fine-print {
    font-size: 0.72rem !important;
}

/* Mobile */
@media (max-width: 600px) {
    .container { padding: 1rem; }
    header h1 { font-size: 1.4rem; }
    .ip-display .ip { font-size: 1.2rem; }
    .data-table th { width: 35%; }
}
