/* ===================================================
   PQCrypta Red Team Pentest Suite — Main Styles
   =================================================== */

:root {
    --red-primary: #ff2d2d;
    --red-dim: #cc0000;
    --red-glow: rgba(255, 45, 45, 0.35);
    --amber: #ff8c00;
    --green-pass: #00e676;
    --cyan: #00e5ff;
    --bg-deep: #060a0f;
    --bg-card: #0c1420;
    --bg-card2: #0f1a2e;
    --border: rgba(255, 45, 45, 0.18);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --text: #e8eaf0;
    --text-dim: #8899aa;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

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

html { scroll-behavior: smooth; }

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

/* ── Header ─────────────────────────────────────── */

.pentest-header {
    background: linear-gradient(135deg, #060a0f 0%, #0f0505 60%, #1a0505 100%);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0 1.6rem;
    position: relative;
    overflow: hidden;
}

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

.header-content {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.logo-link { display: flex; flex-shrink: 0; }

.logo-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.title-container { flex: 1; }

.page-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.1;
}

.title-accent { color: var(--red-primary); }

.page-subtitle {
    color: var(--text-dim);
    margin-top: 0.4rem;
    font-size: 1rem;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.28rem 0.7rem;
    border-radius: 4px;
    border: 1px solid;
}

.badge-red    { border-color: var(--red-primary); color: var(--red-primary); background: rgba(255,45,45,0.08); }
.badge-green  { border-color: var(--green-pass);  color: var(--green-pass);  background: rgba(0,230,118,0.07); }
.badge-cyan   { border-color: var(--cyan);         color: var(--cyan);         background: rgba(0,229,255,0.07); }
.badge-amber  { border-color: var(--amber);        color: var(--amber);        background: rgba(255,140,0,0.08); }

/* ── Tab Nav ─────────────────────────────────────── */

.tab-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.87rem;
    font-weight: 500;
    padding: 1rem 1.3rem;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover { color: var(--text); border-bottom-color: rgba(255,45,45,0.4); }
.tab-btn.active { color: var(--red-primary); border-bottom-color: var(--red-primary); }

/* ── Content ─────────────────────────────────────── */

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Cards ───────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 1.6rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--red-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title-icon { font-size: 1.1rem; }

/* ── Overview grid ───────────────────────────────── */

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.full-width { grid-column: 1 / -1; }

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

.stat-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.4rem 1rem;
    text-align: center;
}

.stat-num {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--red-primary);
    line-height: 1;
    display: block;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
    display: block;
}

.stat-card-green .stat-num { color: var(--green-pass); }
.stat-card-cyan  .stat-num { color: var(--cyan); }
.stat-card-amber .stat-num { color: var(--amber); }

/* ── Phase table ─────────────────────────────────── */

.phase-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.phase-table th {
    background: rgba(255,45,45,0.1);
    color: var(--red-primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.65rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.phase-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
}

.phase-table tr:last-child td { border-bottom: none; }

.phase-table tr:hover td { background: rgba(255,45,45,0.04); }

.phase-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--red-primary);
    font-weight: 700;
    white-space: nowrap;
}

.script-mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--cyan);
    background: rgba(0,229,255,0.07);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

/* ── Script cards ────────────────────────────────── */

.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

.script-card {
    background: var(--bg-card2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.1rem 1.2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.script-card:hover {
    border-color: rgba(255,45,45,0.35);
    box-shadow: 0 0 16px var(--red-glow);
}

.script-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--red-primary);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.script-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.script-desc {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.script-phase-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--amber);
    border: 1px solid rgba(255,140,0,0.3);
    background: rgba(255,140,0,0.07);
    padding: 0.12rem 0.45rem;
    border-radius: 3px;
    margin-top: 0.5rem;
    letter-spacing: 0.04em;
}

/* ── Code blocks ─────────────────────────────────── */

.code-block {
    background: #020508;
    border: 1px solid rgba(0,229,255,0.15);
    border-left: 3px solid var(--cyan);
    border-radius: 6px;
    padding: 1.1rem 1.3rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: #a8dadc;
    white-space: pre;
    display: block;
    line-height: 1.7;
}

.code-block-red {
    border-left-color: var(--red-primary);
    border-color: rgba(255,45,45,0.15);
}

.code-block-red code { color: #ffb3b3; }

/* ── Info lists ──────────────────────────────────── */

.info-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1.2rem;
    font-size: 0.88rem;
}

.info-dl dt {
    color: var(--text-dim);
    font-weight: 500;
    white-space: nowrap;
}

.info-dl dd { color: var(--text); }

/* ── Feature list ────────────────────────────────── */

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.5rem;
    font-size: 0.88rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text);
}

.icon-check { color: var(--green-pass); flex-shrink: 0; }
.icon-shield { color: var(--red-primary); flex-shrink: 0; }
.icon-x { color: #ff4444; flex-shrink: 0; }

/* ── Protocol badge row ──────────────────────────── */

.proto-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.8rem 0;
}

.proto-badge {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid;
}

.proto-http1  { color: #90caf9; border-color: rgba(144,202,249,0.4); background: rgba(144,202,249,0.06); }
.proto-http2  { color: #a5d6a7; border-color: rgba(165,214,167,0.4); background: rgba(165,214,167,0.06); }
.proto-http3  { color: #ce93d8; border-color: rgba(206,147,216,0.4); background: rgba(206,147,216,0.06); }
.proto-quic   { color: var(--cyan); border-color: rgba(0,229,255,0.4); background: rgba(0,229,255,0.06); }
.proto-wt     { color: var(--amber); border-color: rgba(255,140,0,0.4); background: rgba(255,140,0,0.08); }
.proto-ws     { color: #ffcc80; border-color: rgba(255,204,128,0.4); background: rgba(255,204,128,0.06); }

/* ── Result chart ────────────────────────────────── */

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

.result-item {
    background: var(--bg-card2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.result-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.4rem;
}

.result-label {
    font-size: 0.82rem;
    color: var(--text-dim);
    display: block;
}

.result-val {
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
    margin-top: 0.2rem;
}

.val-pass { color: var(--green-pass); }
.val-warn { color: var(--amber); }
.val-fail { color: var(--red-primary); }

/* ── Scope boxes ─────────────────────────────────── */

.scope-box {
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 0.8rem 0;
    font-size: 0.88rem;
}

.scope-in  { background: rgba(0,230,118,0.06); border: 1px solid rgba(0,230,118,0.25); }
.scope-out { background: rgba(255,45,45,0.06); border: 1px solid rgba(255,45,45,0.25); }

.scope-label {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.scope-in .scope-label  { color: var(--green-pass); }
.scope-out .scope-label { color: var(--red-primary); }

.scope-box ul { list-style: none; }
.scope-box li { padding: 0.15rem 0; color: var(--text); }
.scope-box li::before { content: '• '; color: var(--text-dim); }

/* ── Github CTA ──────────────────────────────────── */

.github-cta {
    background: linear-gradient(135deg, var(--bg-card2), #0a1520);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.github-cta:hover {
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    text-decoration: none;
}

.github-icon {
    font-size: 3rem;
    flex-shrink: 0;
    color: #fff;
}

.github-text { flex: 1; }

.github-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.3rem;
}

.github-text p {
    font-size: 0.86rem;
    color: var(--text-dim);
}

.github-arrow {
    font-size: 1.5rem;
    color: var(--text-dim);
}

/* ── Section headings ────────────────────────────── */

.section-h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--red-primary);
    margin-bottom: 0.5rem;
}

.section-h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.6rem 0 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

.lead-text {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.hr { border: none; border-top: 1px solid var(--border-subtle); margin: 2rem 0; }

/* ── Phase filter buttons ────────────────────────── */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.filter-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-right: 0.3rem;
}

.filter-btn {
    background: var(--bg-card2);
    border: 1px solid var(--border-subtle);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    transition: all 0.15s;
    letter-spacing: 0.03em;
}

.filter-btn:hover { border-color: var(--red-primary); color: var(--text); }
.filter-btn.active { border-color: var(--red-primary); color: var(--red-primary); background: rgba(255,45,45,0.1); }

/* ── Footer ──────────────────────────────────────── */

.pentest-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-content { max-width: 1200px; margin: 0 auto; }

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin: 0.8rem 0;
}

.footer-link {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover { color: var(--red-primary); }
.footer-separator { color: var(--border); }

.copyright { color: var(--text-dim); }
.copyright strong { color: var(--text); }

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 768px) {
    .overview-grid { grid-template-columns: 1fr; }
    .stat-row      { grid-template-columns: repeat(2, 1fr); }
    .scripts-grid  { grid-template-columns: 1fr; }
    .header-content { flex-wrap: wrap; }
    .page-title { font-size: 1.5rem; }
    .result-grid { grid-template-columns: repeat(2, 1fr); }
    .github-cta  { flex-wrap: wrap; text-align: center; }
}

@media (max-width: 480px) {
    .stat-row   { grid-template-columns: repeat(2, 1fr); }
    .badge-row  { display: none; }
    .content-container { padding: 1.5rem 1rem 3rem; }
}

/* ── Highlight / attention ───────────────────────── */

.highlight-red   { color: var(--red-primary); font-weight: 600; }
.highlight-green { color: var(--green-pass);  font-weight: 600; }
.highlight-cyan  { color: var(--cyan);         font-weight: 600; }

/* ── Tool list ───────────────────────────────────── */

.tool-row {
    display: grid;
    grid-template-columns: max-content max-content 1fr;
    gap: 0.3rem 1rem;
    align-items: center;
    font-size: 0.87rem;
    margin-bottom: 0.35rem;
}

.tool-name { font-family: var(--font-mono); color: var(--cyan); }
.tool-req  { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.tool-req-y { color: var(--red-primary); }
.tool-req-n { color: var(--text-dim); }
.tool-desc  { color: var(--text-dim); }

/* ── Class replacements for banned inline styles ── */

.script-proto-row { margin-top: 0.5rem; }

.lead-text-sm { margin-bottom: 0.8rem; }

.card-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
}

.info-box-mt { margin-top: 0.8rem; }

/* ── Inline link ─────────────────────────────────── */

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Warning / info box ──────────────────────────── */

.info-box {
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    margin: 1rem 0;
    font-size: 0.88rem;
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.info-box-icon { flex-shrink: 0; font-size: 1rem; margin-top: 0.1rem; }

.info-warn { background: rgba(255,140,0,0.07); border: 1px solid rgba(255,140,0,0.3); }
.info-warn .info-box-icon { color: var(--amber); }

.info-note { background: rgba(0,229,255,0.06); border: 1px solid rgba(0,229,255,0.2); }
.info-note .info-box-icon { color: var(--cyan); }

.info-pass { background: rgba(0,230,118,0.06); border: 1px solid rgba(0,230,118,0.25); }
.info-pass .info-box-icon { color: var(--green-pass); }
