/* =========================
   CARD & CONTENITORI
========================= */

.ttl-card {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #000000a6;
    border-radius: var(--radius-lg);
    padding: 1.5rem 2.5rem;
    width: 90%;
    max-width: 520px;
    box-shadow: var(--shadow-soft);
    animation: kickoffZoom .9s ease-out both;
}

.ttl-titles-card {
    max-width: 650px;
    width: 95%;
    min-height: 400px;
}

.ttl-titles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* =========================
   RIGA TITOLI – DESKTOP
   Anno | Logo | Squadre | Punteggio
========================= */

.ttl-title-row {
    display: grid;
    grid-template-columns: 60px 40px 1fr;
    gap: 12px;
    align-items: center;
    background: #ffffff0d;
    padding: 12px 20px;
    border-radius: 12px;
    min-height: 64px;
}

.ttl-title-row-with-score {
    grid-template-columns: 60px 40px 1fr 80px;
}

.ttl-title-row:hover {
    background: #ffffff1a;
}

/* =========================
   ALLINEAMENTO VERTICALE DESKTOP
========================= */

.ttl-title-row,
.ttl-title-row-with-score {
    align-items: center;
}

/* Anno */
.ttl-year {
    font-weight: 700;
    color: var(--primary-color);
    width: 60px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo */
.ttl-team-mini-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    margin-right: 20px;
    filter: drop-shadow(0 0 5px #00000080);
}

/* Squadre */
.ttl-winner-block {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
}

.ttl-team-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.ttl-team-subtitle {
    font-size: .75rem;
    opacity: .7;
    color: var(--primary-color);
    margin-top: 2px;
}

.ttl-loser-actual
{
    opacity: .5;
}

.ttl-loser-name
{
    opacity: .5;
}

.ttl-team-record {
    color: var(--primary-color);
}

/* Punteggio */
.ttl-score-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: .85rem;
    font-weight: 700;
    color: #000;
    background: var(--primary-color);
    border-radius: 999px;
    white-space: nowrap;
}

/* =========================
   CONTENITORE ANNO + SCORE
========================= */

.ttl-year-score-container {
    display: contents;
}

.ttl-year-score-container .ttl-year {
    grid-column: 1;
}

.ttl-year-score-container .ttl-score-badge {
    grid-column: 4;
}

/* =========================
   TROPHY NAV
========================= */

.ttl-trophy-nav {
    gap: 0px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: safe center;
    overflow-x: auto;
    align-content: center;
}

.ttl-trophy-nav .tab-btn {
    margin: 0 4px 12px;
}

.ttl-trophy-nav.second-level {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.ttl-trophy-nav.second-level::-webkit-scrollbar {
    height: 6px;
}

.ttl-trophy-nav.second-level::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.ttl-trophy-nav.second-level .tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.ttl-trophy-content {
    display: none;
    width: 100%;
    animation: fadeIn .5s ease;
}

.ttl-trophy-name {
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-transform: uppercase;
    border-bottom: 1px solid #cfae704d;
    padding-bottom: 10px;
}

/* =========================
   MODAL ANELLO
========================= */

.ttl-ring-modal {
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: #000000d9;
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.ttl-ring-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.ttl-ring-modal-content {
    background: var(--secondary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(.8);
    transition: transform .3s cubic-bezier(.175,.885,.32,1.275);
}

.ttl-ring-modal.active .ttl-ring-modal-content {
    transform: scale(1);
}

.ttl-close-ring {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* =========================
   MOBILE – INVARIATO
========================= */

@media (max-width:480px) {

    .ttl-card {
        padding: 2.2rem 1.8rem;
        margin: 0 1rem;
    }

    .ttl-title-row-with-score {
        grid-template-columns: 60px 1fr;
        gap: 12px;
        align-items: center;
    }

    .ttl-year-score-container {
        grid-column: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .ttl-title-row-with-score .ttl-team-mini-logo {
        display: none;
    }

    .ttl-title-row-with-score .ttl-winner-block {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .ttl-title-row-with-score .ttl-score-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}
