/* css/ctf.css */

p.subtitle {
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    line-height: 1.5;
    margin: 0.6rem 0 2.2rem;
    color: hsl(var(--muted-foreground));
}

/* Liste generali (CTF, categorie, challenge) */
.ctf-list,
.category-list,
.challenge-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 8px;
}

/* Item generali */
.ctf-item,
.category-item,
.challenge-item {
    margin-bottom: 1.6rem;
}

/* Link generali nelle liste */
.ctf-item a,
.category-item a,
.challenge-item a {
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.18s ease;
}

/* Specifico per challenge (leggermente diverso da categorie) */
.challenge-item a {
    font-size: 1.22rem;
}

/* Hover generale */
.ctf-item a:hover,
.category-item a:hover,
.challenge-item a:hover {
    opacity: 0.78;
}

/* Meta testo */
.ctf-meta,
.category-meta,
.challenge-meta {
    color: hsl(var(--muted-foreground));
    font-size: 0.94rem;
    margin-top: 0.4rem;
    line-height: 1.45;
}

/* Badge "Solved" */
.solved {
    color: #22c55e;
    font-weight: 500;
    margin-left: 0.5rem;
}

.flag-box {
    background: hsl(var(--muted));
    padding: 1rem 1.2rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    color: hsl(140, 60%, 70%);
    border: 1px solid hsl(var(--border));
    margin: 1.2rem 0;
}

pre {
    background: hsl(var(--muted));
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid hsl(var(--border));
    margin: 1rem 0;
}

ol, ul {
    margin-left: 1.6rem;
    line-height: 1.6;
}

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

.ctf-item {
    margin-bottom: 1.4rem;
    margin-left: 1rem;
}

.ctf-item h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.45rem;
    font-weight: 600;
}

.ctf-item h2 a {
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.16s ease;
}

.ctf-item h2 a:hover {
    color: hsl(var(--muted-foreground));
    text-decoration: underline;
}

.ctf-item .description {
    margin: 0.35rem 0 0.35rem 1.6rem;
    position: relative;
    padding-left: 1.35rem;
    font-size: 0.97rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.45;
}

.ctf-item .description::before {
    content: "•";
    position: absolute;
    left: 0;
    color: hsl(var(--muted-foreground));
}

.ctf-item .date {
    margin: 0.3rem 0 0 1.6rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground)) !important;
}

.ctf-item .role a,
.ctf-item .role a:visited,
.ctf-item .role a:hover {
    color: hsl(var(--foreground));
    text-decoration: none;
}

.ctf-item .role a:hover {
    text-decoration: underline;
}