/* =========================
   Pairings Styles
   ========================= */

.cr-pilot #crUrl,
.cr-pilot #vesusKey {
    max-width: 420px;
}

.cr-pilot .pairing-card {
    background: white;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.cr-pilot .pairing-card.my-game {
    border: 2px solid #2563eb;
    box-shadow: 0 0 18px rgba(37, 99, 235, 0.25);
}

.cr-pilot .pairing-card.bye-card {
    background: #fef3c7;
    border: 1px dashed #f59e0b;
}

/* ---- Next Round banner shown after pairings are generated ---- */
.next-round-banner {
    margin-top: 30px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(30, 64, 175, 0.2);
    color: white;
    position: relative;
    overflow: hidden;
}

.next-round-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #10b981, #3b82f6);
}

.next-round-banner-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fcd34d;
    margin-bottom: 12px;
}

.next-round-banner h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
}

.next-round-banner p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0 0 18px 0;
    font-size: 14px;
}

.next-round-banner-cta {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    transition: background 0.15s;
}

.next-round-banner-cta:hover {
    background: #f1f5f9;
}

@media (max-width: 600px) {
    .next-round-banner {
        padding: 22px 20px;
    }
    .next-round-banner h3 {
        font-size: 18px;
    }
}

[data-theme="dark"] .next-round-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    box-shadow: 0 15px 35px rgba(49, 46, 129, 0.4);
}

.cr-pilot .pairing-card.bye-card.my-game {
    border: 2px solid #2563eb;
    background: #fef3c7;
}

.cr-pilot .bye-label {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 6px;
    color: #92400e;
    font-weight: 600;
    font-size: 13px;
}

[data-theme="dark"] .cr-pilot .pairing-card.bye-card {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .cr-pilot .bye-label {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

.cr-pilot .table-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.cr-pilot .king {
    font-size: 26px;
    margin-right: 8px;
    vertical-align: middle;
}

.cr-pilot .player-block {
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.cr-pilot .player-white {
    border-left: 5px solid #e5e7eb;
}

.cr-pilot .player-black {
    border-left: 5px solid #111827;
}

.cr-pilot .meta {
    font-size: 13px;
    color: #555;
    margin-top: 3px;
}

.flag-neutral {
    display: inline-block;
    width: 1.2em;
    height: 0.85em;
    background: #3d5a80;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 2px;
}

.import-status {
    margin-top: 10px;
    font-size: 13px;
    color: #16a34a;
}

.clear-import {
    background: #dc2626;
    color: white;
}

.subtitle {
    max-width: 600px;
    margin-top: 16px; /* spazio vero */
    margin-left: 200px; /* allineato con titolo (logo offset) */
    color: #6b7280;
    line-height: 1.5;
}

.internal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.title-block {
    display: flex;
    flex-direction: column;
}

.title-block h1 {
    margin-bottom: 6px;
}

@media (max-width: 768px) {
    .internal-title-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .title-block {
        align-items: center;
    }

    .subtitle {
        margin-left: 0; /* CRUCIALE */
        text-align: center; /* opzionale ma giusto */
        padding: 0 16px; /* respiro laterale */
    }
}

.seo-links {
    margin-top: 16px;
    margin-left: 600px; /* allineato con subtitle */
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.seo-jump {
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
}

.seo-jump:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .seo-links {
        margin-left: 0; /* reset */
        align-items: right;
        text-align: right;
        padding: 0 16px;
        margin-top: 20px;
        margin-bottom: 15px;
    }
}

.king {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.king img {
    width: 30px; /* ← stessa del captcha-label */
    height: 30px;
    vertical-align: middle;
}

.pairing-variation {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    font-style: italic;
}

/* ===== Links ===== */

.top-link {
    float: right;
    font-size: 12px;
    text-decoration: underline;
    color: var(--link-color);
}

.fide-link {
    color: var(--link-color);
    text-decoration: none;
}

.fide-link:hover {
    text-decoration: underline;
}

/* ===== Dark Mode ===== */

[data-theme="dark"] .cr-pilot .pairing-card {
    background: var(--card-bg);
    box-shadow: var(--shadow-light);
}

[data-theme="dark"] .cr-pilot .meta {
    color: var(--text-secondary);
}

[data-theme="dark"] .subtitle {
    color: var(--text-secondary);
}

[data-theme="dark"] .pairing-variation {
    color: var(--text-secondary);
}

