/* =============================================
   SEKCJA WYNIKI - FRONT PAGE
   ============================================= */

.spin-section {
    padding: 80px 0;
}

.spin-section-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.spin-section-heading {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 800;
    color: #D4AF37;
    text-align: center;
    margin: 0 0 40px 0;
}

/* Ostatnie wyniki */
.spin-results-liga {
    margin-bottom: 30px;
}

.spin-results-liga-name {
    font-size: 16px;
    font-weight: 700;
    color: #D4AF37;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-result-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.spin-result-card:hover {
    border-color: #D4AF37;
    transform: translateX(4px);
}

.spin-result-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.spin-result-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.spin-result-team {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    flex: 1;
}

.spin-result-team:first-child { text-align: right; }
.spin-result-team:last-child { text-align: left; }

.spin-result-team--own {
    color: #D4AF37;
    font-weight: 700;
}

.spin-result-score {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

/* =============================================
   TABELA LIGOWA
   ============================================= */

.spin-table-wrap {
    margin-bottom: 30px;
}

.spin-table-title {
    font-size: 16px;
    font-weight: 700;
    color: #D4AF37;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-standings {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.spin-standings th {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    padding: 10px 12px;
    text-align: left;
}

.spin-standings td {
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.spin-standings .spin-own-team td {
    color: #D4AF37;
    font-weight: 600;
    background: rgba(212, 175, 55, 0.06);
}

/* =============================================
   SEKCJA PRZYCISK
   ============================================= */

.spin-section-btn-wrap {
    text-align: center;
    margin-top: 40px;
}

.spin-section-btn {
    display: inline-block;
    padding: 14px 35px;
    border: 2px solid #D4AF37;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    background: transparent;
    border-radius: 4px;
}

.spin-section-btn:hover {
    background: #D4AF37;
    color: #000;
}

/* =============================================
   STRONA ROZGRYWKI - KAFELKI LIG
   ============================================= */

.spin-rozgrywki-layout {
    display: flex;
    gap: 40px;
}

.spin-rozgrywki-main {
    flex: 1;
}

.spin-rozgrywki-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.spin-sidebar-heading {
    font-size: 16px;
    font-weight: 700;
    color: #D4AF37;
    margin: 0 0 15px 0;
}

.spin-sidebar-seasons {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spin-sidebar-seasons li {
    margin-bottom: 6px;
}

.spin-sidebar-seasons a {
    display: block;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.spin-sidebar-seasons a:hover,
.spin-sidebar-seasons a.active {
    border-color: #D4AF37;
    color: #D4AF37;
}

.spin-liga-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.spin-liga-tile {
    display: block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 30px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.spin-liga-tile:hover {
    border-color: #D4AF37;
    transform: translateY(-4px);
}

.spin-liga-tile h3 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* =============================================
   STRONA ROZGRYWKI - SZCZEGÓŁY LIGI
   ============================================= */

.spin-kolejka-section {
    margin-bottom: 25px;
}

.spin-kolejka-heading {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spin-match-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.spin-match-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.spin-match-team {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
}

.spin-match-team:first-child { text-align: right; }
.spin-match-team:last-child { text-align: left; }

.spin-match-team--own {
    color: #D4AF37;
    font-weight: 600;
}

.spin-match-score {
    font-weight: 800;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
    min-width: 60px;
    text-align: center;
}

/* =============================================
   KADRA - GRID ZAWODNIKÓW
   ============================================= */

.spin-kadra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.spin-kadra-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
    text-align: center;
}

.spin-kadra-card:hover {
    border-color: #D4AF37;
    transform: translateY(-4px);
}

.spin-kadra-card-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.spin-kadra-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spin-kadra-card-body {
    padding: 15px;
}

.spin-kadra-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px 0;
}

.spin-kadra-card-since {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

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

.spin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.spin-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spin-modal {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.spin-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.spin-modal-close:hover { color: #fff; }

/* Modal - szczegóły meczu */
.spin-modal-liga {
    font-size: 13px;
    color: #D4AF37;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-modal-data {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.spin-modal-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.spin-modal-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
}

.spin-modal-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.spin-modal-result {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.spin-modal-sets {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.spin-modal-players h4 {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-modal-pm {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 14px;
}

.spin-modal-pm--win { background: rgba(76, 175, 80, 0.12); }
.spin-modal-pm--loss { background: rgba(244, 67, 54, 0.12); }

.spin-modal-pm-name {
    flex: 1;
    color: #fff;
    font-weight: 600;
}

.spin-modal-pm-score {
    font-weight: 700;
    color: #fff;
}

.spin-modal-pm-opp {
    flex: 1;
    text-align: right;
    color: rgba(255, 255, 255, 0.5);
}

.spin-modal-debel-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.2);
    color: #D4AF37;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Modal - karta zawodnika */
.spin-player-header {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
}

.spin-player-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #D4AF37;
}

.spin-player-info h3 {
    font-size: 22px;
    color: #fff;
    margin: 0 0 5px 0;
}

.spin-player-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.spin-player-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.spin-stat {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.spin-stat-val {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #D4AF37;
}

.spin-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-player-matches h4 {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-player-match {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 13px;
}

.spin-pm--win { background: rgba(76, 175, 80, 0.12); }
.spin-pm--loss { background: rgba(244, 67, 54, 0.12); }

.spin-pm-liga {
    color: #D4AF37;
    font-weight: 600;
    font-size: 11px;
    min-width: 60px;
}

.spin-pm-teams {
    flex: 1;
    color: rgba(255, 255, 255, 0.7);
}

.spin-pm-result {
    font-weight: 700;
    color: #fff;
}

.spin-pm-data {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* =============================================
   RESPONSYWNOŚĆ
   ============================================= */

@media (max-width: 768px) {
    .spin-section { padding: 50px 0; }
    .spin-rozgrywki-layout { flex-direction: column; }
    .spin-rozgrywki-sidebar { width: 100%; }
    .spin-player-stats { grid-template-columns: repeat(2, 1fr); }
    .spin-result-teams { font-size: 13px; }
    .spin-result-score { font-size: 18px; }

    /* Modal mobile */
    .spin-modal {
        padding: 20px 15px;
        max-height: 90vh;
        margin: 10px;
        width: calc(100% - 20px);
    }

    .spin-modal-overlay {
        padding: 10px;
    }

    .spin-modal-result { font-size: 24px; }

    .spin-modal-score {
        gap: 10px;
    }

    .spin-modal-team {
        font-size: 13px;
    }

    .spin-modal-logo {
        width: 35px;
        height: 35px;
    }

    .spin-modal-pm {
        flex-wrap: wrap;
        gap: 5px;
    }

    .spin-modal-pm-name,
    .spin-modal-pm-opp {
        font-size: 13px;
    }

    /* Karta zawodnika mobile */
    .spin-player-header {
        flex-direction: column;
        text-align: center;
    }

    .spin-player-photo {
        width: 80px;
        height: 80px;
    }

    .spin-player-match {
        flex-wrap: wrap;
        gap: 4px;
    }

    .spin-pm-teams {
        width: 100%;
        order: -1;
    }

    /* Tabela ligowa mobile */
    .spin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .spin-standings {
        min-width: 500px;
        font-size: 13px;
    }

    .spin-standings th,
    .spin-standings td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    /* Kolejki mecze mobile */
    .spin-match-row {
        padding: 10px 10px;
        gap: 8px;
    }

    .spin-match-team {
        font-size: 12px;
    }

    .spin-match-score {
        font-size: 14px;
        min-width: 50px;
    }

    /* Kafelki lig mobile */
    .spin-liga-tiles {
        grid-template-columns: 1fr;
    }

    .spin-liga-tile {
        padding: 20px;
    }

    /* Kadra grid mobile */
    .spin-kadra-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .spin-kadra-card-name {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .spin-kadra-grid {
        grid-template-columns: 1fr;
    }

    .spin-player-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .spin-stat-val {
        font-size: 18px;
    }

    .spin-result-teams {
        flex-direction: column;
        gap: 5px;
    }

    .spin-result-team:first-child,
    .spin-result-team:last-child {
        text-align: center;
    }

    .spin-result-score {
        font-size: 20px;
    }
}
