/* ==========================================================================
   NERDS - Coppa Nerds
   Palette: turchese + corallo per l'esito qualificazione
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700;9..144,900&family=Inter:wght@400;500;600;700&display=swap');

.nerds-container {
    --nerds-teal: #0d9488;
    --nerds-teal-dark: #0b6d64;
    --nerds-coral: #e8590c;
    --nerds-coral-dark: #c24a08;
    --nerds-cream: #f4faf9;
    --nerds-ink: #16211f;
    --nerds-muted: #66756f;
    --nerds-white: #ffffff;
    --nerds-line: #dcece8;

    max-width: 900px;
    margin: 28px auto;
    padding: 0 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--nerds-ink);
}

.nerds-error {
    background: #fdecea;
    color: #8c1d17;
    padding: 18px 22px;
    border-radius: 12px;
    border: 1px solid #f3c6c2;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.nerds-empty {
    background: var(--nerds-cream);
    border: 2px dashed var(--nerds-line);
    border-radius: 14px;
    padding: 26px 20px;
    color: var(--nerds-muted);
    font-style: italic;
    text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Titolo generale                                                         */
/* ---------------------------------------------------------------------- */

.nerds-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.nerds-trophy {
    font-size: 24px;
}

.nerds-title h2 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: -0.01em;
    color: var(--nerds-teal-dark);
}

/* ---------------------------------------------------------------------- */
/* Sezione                                                                 */
/* ---------------------------------------------------------------------- */

.nerds-section {
    margin-bottom: 40px;
}

.nerds-section-title {
    margin: 0 0 12px 4px;
}

.nerds-section-title h3 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: 19px;
    color: var(--nerds-teal-dark);
}

.nerds-section-title h3::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    background: var(--nerds-teal);
}

/* ---------------------------------------------------------------------- */
/* Tabella                                                                 */
/* ---------------------------------------------------------------------- */

.nerds-table-wrapper {
    background: var(--nerds-white);
    border-radius: 16px;
    border: 1px solid var(--nerds-line);
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 0 8px 22px rgba(13, 148, 136, 0.08);
    margin-bottom: 14px;
}

.nerds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 540px;
}

.nerds-table thead th {
    background: var(--nerds-teal);
    color: #ffffff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 13px 14px;
    text-align: center;
    white-space: nowrap;
}

.nerds-table thead th.nerds-col-team {
    text-align: left;
}

.nerds-table td {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid var(--nerds-line);
    color: var(--nerds-ink);
}

.nerds-table td.nerds-col-team {
    text-align: left;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--nerds-teal-dark);
}

.nerds-table tbody tr:last-child td {
    border-bottom: none;
}

.nerds-table tbody tr:nth-child(even) {
    background: var(--nerds-cream);
}

/* ---------------------------------------------------------------------- */
/* Squadra qualificata                                                     */
/* ---------------------------------------------------------------------- */

.nerds-qualified {
    background: linear-gradient(135deg, var(--nerds-coral) 0%, var(--nerds-coral-dark) 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 18px rgba(232, 89, 12, 0.28);
}

.nerds-qualified-name {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 800;
    font-size: 15.5px;
    letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 620px) {
    .nerds-title h2 {
        font-size: 22px;
    }
}
