/* Play-off pairs section */
.playoff-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.playoff-section h2 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 1.8em;
}

.section-description {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 0.95em;
}

.playoff-pairs {
    padding: 20px;
    min-height: 200px;
}

.playoff-stage-section {
    margin-bottom: 30px;
}

.stage-title {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1.3em;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.playoff-pairs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.playoff-pair-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.playoff-pair-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.pair-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
    width: 100%;
    min-width: 0; /* Allow flex items to shrink */
}

.pair-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 0; /* Equal flex, allow shrinking */
    min-width: 0; /* Critical: allows text truncation */
    overflow: hidden;
}

.pair-team-logo,
.pair-team-logo-placeholder {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.pair-team-logo-placeholder {
    display: inline-block;
    background: #e0e0e0;
    border-radius: 50%;
}

.pair-team-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.pair-vs {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
    flex-shrink: 0;
    padding: 0 5px;
}

.pair-analyze-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95em;
    touch-action: manipulation; /* Prevent double-tap zoom */
    min-height: 44px; /* iOS recommended touch target */
}

.pair-analyze-btn:hover {
    background: #5568d3;
}

.pair-analyze-btn:focus-visible,
.modal-close:focus-visible,
.nav-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.pair-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.85em;
    flex-wrap: wrap;
    gap: 8px;
}

.pair-probability {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px;
    background: #e7f3ff;
    border-radius: 4px;
    border-left: 3px solid #667eea;
    font-size: 0.9em;
}

.probability-label {
    font-weight: 600;
    color: #333;
    font-size: 0.85em;
}

.probability-value {
    font-weight: bold;
    color: #667eea;
    font-size: 1em;
}

.probability-bar-mini {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
    display: flex;
}

.probability-fill-mini {
    height: 100%;
    transition: width 0.3s ease;
}

.probability-fill-mini.team1 {
    background: linear-gradient(90deg, #667eea 0%, #5568d3 100%);
}

.probability-fill-mini.team2 {
    background: linear-gradient(90deg, #764ba2 0%, #5a3d7a 100%);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85em;
}

.status-badge.finished {
    background: #d4edda;
    color: #155724;
}

.status-badge.scheduled {
    background: #fff3cd;
    color: #856404;
}

.status-badge.live {
    background: #f8d7da;
    color: #721c24;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pair-date {
    color: #6c757d;
}

/* Play-off analysis modal */
.playoff-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    margin: 50px auto;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #e9ecef;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-header h2 {
    margin: 0;
    color: #667eea;
    font-size: 1.5em;
}

.modal-close {
    background: #dc3545;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    min-width: 36px; /* Ensure minimum touch target size */
    min-height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation; /* Prevent double-tap zoom */
}

.modal-close:hover {
    background: #c82333;
}

.analysis-content {
    padding: 30px;
}

.analysis-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.nav-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    min-width: 44px; /* iOS recommended touch target */
    min-height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    touch-action: manipulation; /* Prevent double-tap zoom */
}

.nav-btn:hover:not(:disabled) {
    background: #5568d3;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-btn span {
    line-height: 1;
    font-weight: bold;
}

.pair-counter {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    min-width: 60px;
    text-align: center;
}

.analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.analysis-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.analysis-team.winner {
    background: #d4edda;
    border: 2px solid #28a745;
}

.analysis-team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.analysis-team h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
    text-align: center;
}

.analysis-team.winner h3 {
    color: #155724;
    font-weight: bold;
}

.league-position {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    margin-top: 5px;
}

.analysis-team.winner .league-position {
    background: #28a745;
}

.analysis-vs {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    margin: 0 20px;
}

.analysis-info {
    margin-bottom: 25px;
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

.analysis-info p {
    margin: 5px 0;
    color: #333;
}

.analysis-info .warning {
    color: #856404;
    font-weight: 600;
    margin-top: 10px;
}

.league-table-container {
    margin-top: 25px;
}

.league-table-container h3 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1.2em;
}

.playoff-league-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.playoff-league-table thead {
    background: #667eea;
    color: white;
}

.playoff-league-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
}

.playoff-league-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}

.playoff-league-table tbody tr:hover {
    background: #f8f9fa;
}

.playoff-league-table tbody tr.winner {
    background: #d4edda;
    font-weight: 600;
}

.playoff-league-table tbody tr.winner:hover {
    background: #c3e6cb;
}

.playoff-league-table td {
    padding: 12px;
    text-align: left;
}

.playoff-league-table .team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.playoff-league-table td:last-child {
    font-weight: 600;
    color: #28a745;
    font-size: 1.1em;
}

.playoff-league-table tr.winner td:last-child {
    color: #155724;
}

.playoff-league-table tr.playoff-team {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.playoff-league-table tr.playoff-team:hover {
    background: #ffe69c;
}

/* Win probability section */
.win-probability {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #667eea;
}

.win-probability h3 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1.2em;
}

.probability-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.probability-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.probability-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
}

.probability-value {
    color: #667eea;
    font-size: 1.1em;
}

.probability-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.probability-fill {
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.team1-fill {
    background: linear-gradient(90deg, #667eea 0%, #5568d3 100%);
}

.team2-fill {
    background: linear-gradient(90deg, #764ba2 0%, #5a3d7a 100%);
}

.draw-fill {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
}

.probability-note {
    margin: 15px 0 0 0;
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

.probability-explanation {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.probability-explanation h4 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 1em;
}

.probability-explanation p {
    margin: 8px 0;
    color: #333;
    font-size: 0.9em;
    line-height: 1.5;
}

.probability-explanation ul {
    margin: 10px 0 10px 20px;
    color: #333;
    font-size: 0.9em;
}

.probability-explanation li {
    margin: 5px 0;
}

.table-note {
    margin: 0 0 15px 0;
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
}

/* Elo analysis section */
.elo-analysis-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 8px;
}

.elo-analysis-section h3 {
    margin: 0 0 20px 0;
    color: #667eea;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

.elo-rating-comparison {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 10px;
    margin-bottom: 24px;
}

.elo-team-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.elo-team-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.elo-team-name {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
}

.elo-rating-value {
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.elo-matches-played {
    font-size: 0.8em;
    color: #6c757d;
}

.elo-win-pct {
    font-size: 1em;
    font-weight: 600;
    margin-top: 4px;
}

.team1-color { color: #667eea; }
.team2-color { color: #e05252; }

.elo-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.elo-delta {
    font-size: 1.4em;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    background: #f0f2ff;
    color: #333;
}

.delta-positive { color: #28a745; }
.delta-negative { color: #dc3545; }

.elo-divider-label {
    font-size: 0.75em;
    color: #6c757d;
}

.elo-formula-breakdown {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.elo-formula-breakdown h4 {
    margin: 0 0 12px 0;
    color: #667eea;
    font-size: 0.95em;
}

.formula-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.formula-step {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88em;
    color: #333;
    padding: 4px 8px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #dee2e6;
}

.formula-step.result {
    border-left-color: #667eea;
    font-size: 0.95em;
    background: #f0f2ff;
}

.elo-methodology-note {
    font-size: 0.82em;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.elo-record {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

.elo-record-item {
    font-size: 0.8em;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
}

.elo-record-item.won   { color: #28a745; background: #e8f5e9; }
.elo-record-item.drawn { color: #888;    background: #f5f5f5; }
.elo-record-item.lost  { color: #dc3545; background: #fdecea; }
.elo-record-item.gd    { color: #555;    background: #f0f0f0; }
.elo-record-sep { color: #bbb; font-size: 0.8em; }

.elo-notable-wins-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.elo-notable-wins-row > * { flex: 1; min-width: 0; }

.notable-wins h5 {
    margin: 0 0 8px 0;
    font-size: 0.88em;
    color: #555;
    font-weight: 600;
}

.notable-wins-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82em;
}

.notable-wins-table th,
.notable-wins-table td {
    padding: 4px 6px;
    text-align: left;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.notable-wins-table th {
    color: #888;
    font-weight: 600;
    font-size: 0.85em;
}

.notable-wins-table .score-cell {
    font-weight: 700;
    color: #28a745;
    white-space: nowrap;
}

/* Matches section */
.direct-matches-section {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.direct-matches-section h3 {
    margin: 0 0 20px 0;
    color: #667eea;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

.direct-matches-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.direct-match-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #6c757d;
    transition: all 0.2s ease;
}

.direct-match-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.direct-match-item.match-win {
    border-left-color: #28a745;
    background: #f0f9f4;
}

.direct-match-item.match-draw {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.direct-match-item.match-loss {
    border-left-color: #dc3545;
    background: #fef0f0;
}

.direct-match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}

.direct-match-team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.direct-match-team:first-child {
    justify-content: flex-end;
}

.direct-match-team:last-child {
    justify-content: flex-start;
}

.direct-match-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.direct-match-team-name {
    font-weight: 600;
    font-size: 0.95em;
}

.direct-match-score {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2em;
    font-weight: 700;
    color: #333;
    min-width: 80px;
    justify-content: center;
}

.direct-match-score .score {
    font-size: 1.3em;
}

.match-outcome-icon {
    font-size: 1.1em;
    font-weight: bold;
}

.direct-match-item.match-win .match-outcome-icon {
    color: #28a745;
}

.direct-match-item.match-draw .match-outcome-icon {
    color: #ffc107;
}

.direct-match-item.match-loss .match-outcome-icon {
    color: #dc3545;
}

.direct-match-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.85em;
    color: #6c757d;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.match-venue {
    font-weight: 500;
}

.no-direct-matches {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.matches-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.matches-section h3 {
    margin: 0 0 20px 0;
    color: #667eea;
    font-size: 1.2em;
}

.team-matches {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.team-matches.playoff-team-matches {
    border: 2px solid #ffc107;
    background: #fffbf0;
}

.team-matches-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.1em;
    color: #333;
}

.team-matches-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #6c757d;
    transition: background 0.2s;
}

.match-item:hover {
    background: #e9ecef;
}

.match-item.match-win {
    border-left-color: #28a745;
    background: #d4edda;
}

.match-item.match-draw {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.match-item.match-loss {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.match-opponent-logo,
.match-opponent-logo-placeholder {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.match-opponent-logo-placeholder {
    display: inline-block;
    background: #e0e0e0;
    border-radius: 50%;
}

.match-opponent {
    flex: 1;
    font-weight: 600;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-score {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
    min-width: 50px;
    text-align: center;
}

.match-outcome {
    font-weight: bold;
    font-size: 1.2em;
    min-width: 20px;
    text-align: center;
}

.match-item.match-win .match-outcome {
    color: #28a745;
}

.match-item.match-draw .match-outcome {
    color: #856404;
}

.match-item.match-loss .match-outcome {
    color: #dc3545;
}

.match-date {
    font-size: 0.85em;
    color: #6c757d;
    min-width: 80px;
    text-align: right;
}

/* Loading and error states */
.analysis-content .loading,
.analysis-content .error {
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

.analysis-content .error {
    color: #dc3545;
}

/* Responsive design */
@media (min-width: 769px) and (max-width: 1024px) {
    .playoff-pairs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .playoff-section {
        padding: 20px;
    }

    .modal-content {
        max-width: calc(100% - 40px);
        margin: 30px auto;
    }

    .analysis-header {
        padding: 15px;
    }

    .elo-rating-value {
        font-size: 1.6em;
    }
}

@media (max-width: 768px) {
    .playoff-section {
        padding: 15px;
        margin-top: 20px;
    }

    .playoff-section h2 {
        font-size: 1.4em;
    }

    .section-description {
        font-size: 0.85em;
        margin-bottom: 15px;
    }

    .playoff-pairs {
        padding: 10px;
    }

    .playoff-pairs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .playoff-pair-card {
        padding: 15px;
    }

    .pair-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pair-team {
        min-width: 0;
        flex: 1 1 auto;
    }

    .pair-team-name {
        font-size: 0.85em;
    }

    .pair-vs {
        font-size: 0.9em;
        padding: 0 5px;
    }

    .pair-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pair-analyze-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    .win-probability-summary {
        padding: 10px;
        font-size: 0.85em;
    }

    .playoff-modal .modal-content {
        max-width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px;
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 1.3em;
    }

    .analysis-header {
        flex-direction: column;
        gap: 15px;
    }

    .analysis-team {
        width: 100%;
    }

    .analysis-vs {
        transform: rotate(90deg);
        margin: 5px 0;
    }

    .win-probability {
        padding: 15px;
    }

    .win-probability h3 {
        font-size: 1.1em;
    }

    .probability-item {
        margin-bottom: 12px;
    }

    .analysis-info {
        padding: 12px;
        font-size: 0.9em;
    }

    .league-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .playoff-league-table {
        font-size: 11px;
        min-width: 800px;
    }

    .playoff-league-table th,
    .playoff-league-table td {
        padding: 6px 4px;
        font-size: 10px;
    }

    /* Hide less important columns on mobile */
    .playoff-league-table th:nth-child(4), /* W */
    .playoff-league-table td:nth-child(4),
    .playoff-league-table th:nth-child(5), /* D */
    .playoff-league-table td:nth-child(5),
    .playoff-league-table th:nth-child(6), /* L */
    .playoff-league-table td:nth-child(6),
    .playoff-league-table th:nth-child(8), /* GA */
    .playoff-league-table td:nth-child(8),
    .playoff-league-table th:nth-child(9) { /* GD */
        display: none;
    }

    .playoff-league-table td:nth-child(9) {
        display: none;
    }

    .direct-matches-section {
        padding: 15px;
    }

    .direct-matches-section h3 {
        font-size: 1.1em;
    }

    .direct-match-item {
        padding: 12px;
    }

    .direct-match-teams {
        flex-direction: column;
        gap: 10px;
    }

    .direct-match-team {
        width: 100%;
        justify-content: center !important;
    }

    .direct-match-score {
        width: 100%;
        padding: 8px 0;
        border-top: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
    }

    .matches-section {
        padding: 15px;
    }

    .matches-section h3 {
        font-size: 1.1em;
    }

    .team-matches {
        padding: 12px;
        margin-bottom: 15px;
    }

    .team-matches-header {
        font-size: 1em;
    }

    .match-item {
        padding: 8px;
        font-size: 0.9em;
    }

    .analysis-navigation {
        padding: 10px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
    }

    .pair-counter {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .playoff-section {
        padding: 12px;
    }

    .playoff-section h2 {
        font-size: 1.2em;
    }

    .playoff-pair-card {
        padding: 12px;
    }

    .pair-team-logo {
        width: 32px;
        height: 32px;
    }

    .playoff-modal .modal-content {
        max-width: calc(100% - 10px);
        margin: 5px;
        padding: 12px;
    }

    .modal-header h2 {
        font-size: 1.1em;
    }

    .playoff-league-table {
        font-size: 10px;
        min-width: 700px;
    }

    .playoff-league-table th,
    .playoff-league-table td {
        padding: 5px 3px;
        font-size: 9px;
    }

    /* Hide even more columns on very small screens */
    .playoff-league-table th:nth-child(7), /* GF */
    .playoff-league-table td:nth-child(7) {
        display: none;
    }
}

