/* Meccsek oldal stílusai */
.matches-page {
    padding: 30px 0;
}

.date-nav {
    display: flex;
    overflow-x: auto;
    margin-bottom: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dark-mode .date-nav {
    background-color: #1e1e1e;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.date-nav button {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    white-space: nowrap;
    transition: all 0.3s;
}

.dark-mode .date-nav button {
    color: #aaa;
}

.date-nav button.active {
    color: #1a73e8;
    border-bottom: 2px solid #1a73e8;
    font-weight: 500;
}

.dark-mode .date-nav button.active {
    color: #4285f4;
    border-bottom-color: #4285f4;
}

.date-nav button:hover {
    background-color: #f5f5f5;
}

.dark-mode .date-nav button:hover {
    background-color: #2a2a2a;
}

.date-section {
    display: none;
}

.date-section.active {
    display: block;
}

.matches-page h2 {
    color: #1a73e8;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: 500;
}

.dark-mode .matches-page h2 {
    color: #4285f4;
}

.match-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 5px solid #e0e0e0;
    position: relative;
}

.dark-mode .match-card {
    background-color: #1e1e1e;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border-left-color: #444;
    color: #e0e0e0;
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dark-mode .match-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #757575;
}

.dark-mode .match-header {
    color: #aaa;
}

.match-time {
    font-weight: 500;
}

.match-buttons {
    display: flex;
    gap: 5px;
}

.match-buttons button {
    background: none;
    border: none;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.dark-mode .match-buttons button {
    color: #aaa;
}

.match-buttons button:hover {
    background-color: rgba(0,0,0,0.1);
    color: #333;
}

.dark-mode .match-buttons button:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.prediction-btn:hover {
    color: #007bff !important;
}

.match-data-btn:hover {
    color: #17a2b8 !important;
}

.favorite-btn.active i {
    color: #dc3545 !important;
}

.teams {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.dark-mode .teams {
    color: #e0e0e0;
}

.score {
    font-weight: 600;
    color: #555;
    transition: color 0.3s ease;
}

.dark-mode .score {
    color: #bbb;
}

.score.final {
    color: #1a73e8;
}

.dark-mode .score.final {
    color: #4285f4;
}

.score.live {
    color: #ff4d4d;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

.best-prediction {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 5px;
}

.prediction-pending {
    background: #e3f2fd;
    color: #1565c0;
}

.dark-mode .prediction-pending {
    background: #0d47a1;
    color: #e3f2fd;
}

.prediction-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.dark-mode .prediction-success {
    background: #1b5e20;
    color: #e8f5e9;
}

.prediction-failed {
    background: #ffebee;
    color: #c62828;
}

.dark-mode .prediction-failed {
    background: #b71c1c;
    color: #ffebee;
}

.result-icon {
    font-size: 1.2em;
    margin-right: 5px;
}

.match-card.success {
    background-color: #e8f5e9;
    border-left: 5px solid #4caf50;
}

.dark-mode .match-card.success {
    background-color: #1b5e20;
    border-left-color: #4caf50;
}

.match-card.failed {
    background-color: #ffebee;
    border-left: 5px solid #f44336;
}

.dark-mode .match-card.failed {
    background-color: #b71c1c;
    border-left-color: #f44336;
}

/* Mérkőzés státusz stílusok */
.match-status {
    margin-left: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.match-live-indicator {
    margin-left: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    background-color: #ff4d4d;
    color: white;
    animation: pulse 1.5s infinite;
    min-width: 35px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.match-first-half {
    background-color: #ff7f50;
    color: white;
}

.dark-mode .match-first-half {
    background-color: #ff6b35;
}

.match-second-half {
    background-color: #ff4500;
    color: white;
}

.dark-mode .match-second-half {
    background-color: #ff4500;
}

.match-half-time {
    background-color: #ffa500;
    color: white;
}

.dark-mode .match-half-time {
    background-color: #ff8c00;
}

.match-extra-time {
    background-color: #9c27b0;
    color: white;
}

.dark-mode .match-extra-time {
    background-color: #8e24aa;
}

.match-penalties {
    background-color: #e91e63;
    color: white;
}

.dark-mode .match-penalties {
    background-color: #d81b60;
}

.match-interrupted {
    background-color: #795548;
    color: white;
}

.dark-mode .match-interrupted {
    background-color: #6d4c41;
}

.match-postponed {
    background-color: #607d8b;
    color: white;
}

.dark-mode .match-postponed {
    background-color: #546e7a;
}

.match-finished {
    background-color: #f8f9fa;
    color: #333;
}

.match-finished.dark-mode {
    background-color: #343a40;
    color: #fff;
}

/* Modal styles - JAVÍTOTT */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0; /* Padding hozzáadása */
}

.modal-content {
    background-color: #fff;
    margin: 0 auto; /* Margin változtatása */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalFadeIn 0.3s;
    max-height: calc(100vh - 40px); /* Maximális magasság beállítása */
    overflow-y: auto; /* Scroll engedélyezése */
}

.dark-mode .modal-content {
    background-color: #1e1e1e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    color: #e0e0e0;
}

.modal-lg {
    max-width: 90%;
    width: 1200px;
    max-height: calc(100vh - 40px); /* Maximális magasság */
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 5px;
}

.dark-mode .close-btn {
    color: #aaa;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: sticky; /* Sticky header */
    top: 0;
    background-color: inherit;
    z-index: 10;
}

.dark-mode .modal-header {
    border-bottom-color: #333;
}

.modal-header h2 {
    margin: 0 0 5px 0;
    color: #333;
    padding-right: 40px; /* Hely a close gombnak */
}

.dark-mode .modal-header h2 {
    color: #e0e0e0;
}

.modal-league {
    font-size: 14px;
    color: #757575;
}

.dark-mode .modal-league {
    color: #aaa;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 140px); /* Maximális magasság a header levonásával */
}

.prediction-section {
    margin-bottom: 25px;
}

.prediction-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
    font-weight: 500;
}

.dark-mode .prediction-section h3 {
    color: #bbb;
}

.prediction-bar {
    height: 30px;
    background-color: #f5f5f5;
    border-radius: 15px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.dark-mode .prediction-bar {
    background-color: #2a2a2a;
}

.prediction-value {
    height: 100%;
    background-color: #1a73e8;
    border-radius: 15px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: white;
    font-weight: 500;
    transition: width 1s ease-in-out;
    min-width: 0; /* Minimum szélesség */
}

.dark-mode .prediction-value {
    background-color: #4285f4;
}

.prediction-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-weight: 500;
    z-index: 1;
    font-size: 14px; /* Kisebb betűméret */
    white-space: nowrap; /* Sortörés megakadályozása */
}

.dark-mode .prediction-label {
    color: #e0e0e0;
}

.prediction-percentage {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-weight: 500;
    font-size: 14px;
    z-index: 1;
}

.dark-mode .prediction-percentage {
    color: #e0e0e0;
}

/* Exact Score section javítása */
#exactScoreContainer {
    text-align: center;
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.dark-mode #exactScoreContainer {
    background-color: #2a2a2a;
}

#exactScoreContainer > div:first-child {
    font-size: 20px; /* Kisebb betűméret */
    font-weight: bold;
    margin-bottom: 10px;
    word-wrap: break-word;
}

#exactScoreContainer span {
    font-size: 14px; /* Kisebb betűméret */
    color: #666;
    margin-left: 10px;
}

.dark-mode #exactScoreContainer span {
    color: #aaa;
}

#topScoresContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px; /* Kisebb gap */
    margin-top: 15px;
    max-height: 120px; /* Maximális magasság */
    overflow-y: auto; /* Scroll ha szükséges */
}

.top-score-item {
    padding: 6px 12px !important; /* Kisebb padding */
    background-color: #f5f5f5 !important;
    border-radius: 15px !important; /* Kisebb border-radius */
    font-size: 12px !important; /* Kisebb betűméret */
    white-space: nowrap;
    flex-shrink: 0;
}

.dark-mode .top-score-item {
    background-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

/* Mobilra optimalizálás - JAVÍTOTT */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 8px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(100vh - 120px);
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
        margin: 0;
        padding-right: 35px;
    }
    
    .modal-league {
        font-size: 12px;
        margin-top: 5px;
    }
    
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 20px;
    }
    
    .prediction-section {
        margin-bottom: 20px;
    }
    
    .prediction-section h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .prediction-bar {
        height: 28px;
        margin-bottom: 8px;
    }
    
    .prediction-label,
    .prediction-percentage {
        font-size: 12px;
        padding: 0 10px;
    }
    
    .prediction-label {
        left: 10px;
    }
    
    .prediction-percentage {
        right: 10px;
    }
    
    #exactScoreContainer > div:first-child {
        font-size: 18px;
    }
    
    #exactScoreContainer span {
        font-size: 12px;
        margin-left: 5px;
    }
    
    #topScoresContainer {
        gap: 6px;
        max-height: 100px;
    }
    
    .top-score-item {
        padding: 4px 8px !important;
        font-size: 11px !important;
        border-radius: 12px !important;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        border-radius: 6px;
        max-height: calc(100vh - 10px);
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
        padding-right: 30px;
    }
    
    .modal-league {
        font-size: 11px;
    }
    
    .close-btn {
        top: 8px;
        right: 12px;
        font-size: 18px;
    }
    
    .modal-body {
        padding: 12px;
        max-height: calc(100vh - 100px);
    }
    
    .prediction-section {
        margin-bottom: 15px;
    }
    
    .prediction-section h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .prediction-bar {
        height: 26px;
        margin-bottom: 6px;
    }
    
    .prediction-label,
    .prediction-percentage {
        font-size: 11px;
        padding: 0 8px;
    }
    
    .prediction-label {
        left: 8px;
    }
    
    .prediction-percentage {
        right: 8px;
    }
    
    #exactScoreContainer {
        padding: 10px;
    }
    
    #exactScoreContainer > div:first-child {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    #exactScoreContainer span {
        font-size: 11px;
        margin-left: 5px;
    }
    
    #topScoresContainer {
        gap: 4px;
        max-height: 80px;
        margin-top: 10px;
    }
    
    .top-score-item {
        padding: 3px 6px !important;
        font-size: 10px !important;
        border-radius: 10px !important;
    }
    
    /* Hosszú szövegek kezelése */
    .prediction-label {
        max-width: 60%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Scroll bar stílusok */
.modal-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
#topScoresContainer::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
#topScoresContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
#topScoresContainer::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
#topScoresContainer::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dark-mode .modal-content::-webkit-scrollbar-track,
.dark-mode .modal-body::-webkit-scrollbar-track,
.dark-mode #topScoresContainer::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.dark-mode .modal-content::-webkit-scrollbar-thumb,
.dark-mode .modal-body::-webkit-scrollbar-thumb,
.dark-mode #topScoresContainer::-webkit-scrollbar-thumb {
    background: #555;
}

.dark-mode .modal-content::-webkit-scrollbar-thumb:hover,
.dark-mode .modal-body::-webkit-scrollbar-thumb:hover,
.dark-mode #topScoresContainer::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* TAB RENDSZER - EGYSÉGES DEFINÍCIÓ */
.content-tabs {
    width: 100%;
}

.nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    border-bottom: 2px solid #4285f4;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    -webkit-overflow-scrolling: touch;
}

.dark-mode .nav-tabs {
    background-color: #2a2a2a;
    border-bottom-color: #4285f4;
}

.nav-item {
    margin-bottom: 0;
    flex-shrink: 0;
}

.nav-tabs .nav-link {
    display: block;
    padding: 12px 16px;
    margin: 0;
    text-decoration: none;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    position: relative;
}

.dark-mode .nav-tabs .nav-link {
    color: #adb5bd;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    color: #495057;
    background-color: rgba(0,0,0,0.05);
    border-bottom-color: #dee2e6;
}

.dark-mode .nav-tabs .nav-link:hover,
.dark-mode .nav-tabs .nav-link:focus {
    color: #e9ecef;
    background-color: rgba(255,255,255,0.05);
    border-bottom-color: #6c757d;
}

.nav-tabs .nav-link.active {
    color: #4285f4 !important;
    background-color: rgba(66, 133, 244, 0.1);
    border-bottom-color: #4285f4 !important;
    font-weight: 600;
}

.dark-mode .nav-tabs .nav-link.active {
    color: #4285f4 !important;
    background-color: rgba(66, 133, 244, 0.2);
    border-bottom-color: #4285f4 !important;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #4285f4;
    border-radius: 2px 2px 0 0;
}

/* TAB CONTENT - EGYSÉGES DEFINÍCIÓ */
.tab-content {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    /* KRITIKUS: Nincs height korlátozás */
}

.dark-mode .tab-content {
    background-color: #1e1e1e !important;
    border-color: #444;
    color: #e0e0e0;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-pane.active {
    display: block;
}

.tab-pane.show {
    display: block;
}

.tab-pane.fade {
    transition: opacity 0.15s linear;
}

.tab-pane.fade:not(.show) {
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tabella stílusok */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.standings-table th,
.standings-table td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.dark-mode .standings-table th,
.dark-mode .standings-table td {
    border-bottom-color: #444;
}

.standings-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.dark-mode .standings-table th {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.qualification-zone {
    width: 4px;
    height: 20px;
    border-radius: 2px;
}

.champions-league {
    background-color: #1e90ff;
}

.europa-league {
    background-color: #ff8c00;
}

.conference-league {
    background-color: #32cd32;
}

.relegation {
    background-color: #ff4500;
}

/* H2H stílusok - ÚJRAÍRT */
.h2h-stats {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.dark-mode .h2h-stats {
    background: linear-gradient(135deg, #2a2a2a 0%, #343a40 100%);
    border-color: #495057;
}

.h2h-stat-item {
    text-align: center;
}

.h2h-stat-item:nth-child(2) {
    border-left: 2px solid #dee2e6;
    border-right: 2px solid #dee2e6;
    padding: 0 15px;
}

.dark-mode .h2h-stat-item:nth-child(2) {
    border-color: #495057;
}

.h2h-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4285f4;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dark-mode .h2h-stat-value {
    color: #4285f4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.h2h-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark-mode .h2h-stat-label {
    color: #adb5bd;
}

/* H2H mérkőzés elemek - ÚJRAÍRT */
.h2h-match-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.h2h-match-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dark-mode .h2h-match-item {
    border-color: #495057;
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dark-mode .h2h-match-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.h2h-match-date {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 12px;
}

.dark-mode .h2h-match-date {
    color: #adb5bd;
}

.h2h-match-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.h2h-home-team,
.h2h-away-team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.h2h-home-team {
    justify-content: flex-start;
}

.h2h-away-team {
    justify-content: flex-end;
}

.h2h-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

.h2h-team-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.dark-mode .h2h-team-name {
    color: #e0e0e0;
}

.h2h-score-section {
    flex-shrink: 0;
}

.h2h-score {
    font-size: 1.4rem;
    font-weight: 700;
    padding: 8px 16px;
    background-color: #4285f4;
    color: white;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.3);
    min-width: 80px;
}

/* Győztes jelölése */
.winner-icon {
    color: #ffc107;
    font-size: 16px;
    margin: 0 5px;
}

.h2h-match-content.home-winner .h2h-home-team .h2h-team-name {
    font-weight: 700;
    color: #28a745;
}

.dark-mode .h2h-match-content.home-winner .h2h-home-team .h2h-team-name {
    color: #40d362;
}

.h2h-match-content.away-winner .h2h-away-team .h2h-team-name {
    font-weight: 700;
    color: #28a745;
}

.dark-mode .h2h-match-content.away-winner .h2h-away-team .h2h-team-name {
    color: #40d362;
}

.h2h-match-league {
    font-size: 0.75rem;
    color: #6c757d;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
}

.dark-mode .h2h-match-league {
    color: #adb5bd;
    background-color: #343a40;
}

/* Mobilra optimalizálás */
@media (max-width: 768px) {
    .h2h-match-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .h2h-home-team,
    .h2h-away-team {
        justify-content: center;
        width: 100%;
    }
    
    .h2h-score {
        font-size: 1.2rem;
        padding: 6px 12px;
    }
    
    .h2h-team-name {
        font-size: 13px;
    }
    
    .h2h-team-logo {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .h2h-match-item {
        padding: 12px;
    }
    
    .h2h-score {
        font-size: 1.1rem;
        padding: 5px 10px;
        min-width: 70px;
    }
    
    .h2h-team-name {
        font-size: 12px;
    }
    
    .h2h-team-logo {
        width: 20px;
        height: 20px;
    }
    
    .winner-icon {
        font-size: 14px;
    }
}

/* Csapat forma stílusok */
.team-form {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-item {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.form-item:hover {
    transform: scale(1.1);
}

.form-item.win {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.form-item.draw {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #000;
}

.form-item.loss {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

/* Mérkőzés statisztika stílusok */
.match-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.dark-mode .match-stat-row {
    border-bottom-color: #444;
}

.match-stat-bar-row {
    display: flex;
    height: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.dark-mode .match-stat-bar-row {
    background-color: #2a2a2a;
}

.match-stat-bar-home {
    background-color: #007bff;
    transition: width 0.3s ease;
}

.match-stat-bar-away {
    background-color: #dc3545;
    transition: width 0.3s ease;
}

.stat-home,
.stat-away {
    font-weight: bold;
    min-width: 50px;
}

.stat-label {
    flex: 1;
    text-align: center;
    font-weight: 500;
}

/* Liga csoportosítás stílusok */
.league-group {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dark-mode .league-group {
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.league-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f1f3f4;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
}

.dark-mode .league-header {
    background-color: #2a2a2a;
    border-bottom-color: #444;
}

.league-header:hover {
    background-color: #e8eaed;
}

.dark-mode .league-header:hover {
    background-color: #333;
}

.league-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #444;
}

.dark-mode .league-header h3 {
    color: #ccc;
}

.league-toggle {
    font-size: 18px;
    transition: transform 0.3s;
}

.league-content {
    background-color: white;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.dark-mode .league-content {
    background-color: #1e1e1e;
}

.league-content.open {
    max-height: none; /* JAVÍTOTT: Sokkal nagyobb érték */
    transition: max-height 0.5s ease-in;
}

.league-matches {
    padding: 10px 15px;
}

/* Szűrő gombok */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #ddd;
    background: white;
    color: #333;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-mode .filter-btn {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

.filter-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.dark-mode .filter-btn:hover {
    background: #4a5568;
    border-color: #63b3ed;
    color: #63b3ed;
}

.filter-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.dark-mode .filter-btn.active {
    background: #3182ce;
    color: white;
    border-color: #3182ce;
}

.filter-btn i {
    font-size: 16px;
}

/* Kedvenc funkciók */
.favorite-btn {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.favorite-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.favorite-btn.error {
    animation: shake 0.5s ease-in-out;
    color: #dc3545 !important;
}

.favorite-btn.active {
    color: #dc3545;
    transform: scale(1.1);
}

.favorite-btn.active:hover {
    transform: scale(1.2);
}

.favorite-btn.active i {
    animation: heartbeat 0.6s ease-in-out;
}

/* Gól animáció stílusok */
.goal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(76, 175, 80, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.goal-overlay.show {
    opacity: 1;
    transform: scale(1);
}

.goal-overlay.hide {
    opacity: 0;
    transform: scale(0.8);
}

.goal-animation {
    text-align: center;
    color: white;
}

.goal-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: goalBounce 0.6s ease;
}

.goal-text {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    animation: goalSlideIn 0.4s ease 0.2s both;
}

.goal-score {
    font-size: 20px;
    font-weight: bold;
    animation: goalSlideIn 0.4s ease 0.4s both;
}

.goal-highlight {
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Utility stílusok */
.hidden-section {
    display: none !important;
}

.match-card.hidden {
    display: none !important;
}

#toTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #e0e0e0;
    color: #1a1a1a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: background-color 0.3s, color 0.3s;
}

#toTopBtn:hover {
    background-color: #333;
    color: white;
}

.dark-mode #toTopBtn {
    background-color: #4a5568;
    color: #e2e8f0;
}

.dark-mode #toTopBtn:hover {
    background-color: #2d3748;
}

/* Bootstrap-szerű utility osztályok */
.text-center {
    text-align: center !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.bg-white {
    background-color: #fff !important;
}

.dark-mode .bg-white {
    background-color: #1e1e1e !important;
}

.border {
    border: 1px solid #dee2e6 !important;
}

.dark-mode .border {
    border-color: #444 !important;
}

.border-top-0 {
    border-top: 0 !important;
}

.rounded-bottom {
    border-bottom-left-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Spinner komponens */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border.text-primary {
    color: #0d6efd !important;
}

.dark-mode .spinner-border.text-primary {
    color: #4285f4 !important;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Alert komponens */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.dark-mode .alert-info {
    color: #9fccdb;
    background-color: #0c2e33;
    border-color: #0a252a;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.dark-mode .alert-danger {
    color: #d1a7aa;
    background-color: #2c0b0e;
    border-color: #26090c;
}

/* Row és col rendszer */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col-md-6 {
    flex: 0 0 auto;
    width: 50%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

/* Animációk */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes goalBounce {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes goalSlideIn {
    0% { 
        opacity: 0;
        transform: translateY(20px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobilra optimalizálás - JAVÍTOTT */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-lg {
        max-width: 100%;
        width: 100%;
        margin: 0;
    }
    
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 8px;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .nav-tabs {
        border-radius: 6px 6px 0 0;
    }
    
    .nav-tabs .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .tab-content {
        padding: 15px;
        border-radius: 0 0 6px 6px;
    }
    
    .h2h-stats {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .h2h-stat-item:nth-child(2) {
        border: none;
        padding: 10px 0;
        border-top: 2px solid #dee2e6;
        border-bottom: 2px solid #dee2e6;
    }
    
    .dark-mode .h2h-stat-item:nth-child(2) {
        border-color: #495057;
    }
    
    .h2h-stat-value {
        font-size: 2rem;
    }
    
    .h2h-match-teams {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .h2h-match-team {
        justify-content: center;
    }
    
    .h2h-match-score {
        font-size: 1.2rem;
        padding: 6px 12px;
        margin: 10px 0;
    }
    
    .h2h-match-item {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .standings-table {
        font-size: 11px;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .standings-table th,
    .standings-table td {
        padding: 6px 4px;
    }
    
    .team-logo {
        width: 16px;
        height: 16px;
    }
    
    .team-name {
        font-size: 11px;
    }
    
    .form-item {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .team-form {
        margin-bottom: 15px;
    }
    
    .match-buttons button {
        font-size: 14px;
        padding: 4px 6px;
    }
    
    .filter-buttons {
        gap: 5px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .col-md-6 {
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        border-radius: 6px;
        margin: 0;
        width: 100%;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
        margin: 0;
    }
    
    .modal-league {
        font-size: 12px;
        margin-top: 5px;
    }
    
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 20px;
    }
    
    .nav-tabs .nav-link {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .tab-content {
        padding: 12px;
    }
    
    .h2h-stat-value {
        font-size: 1.8rem;
    }
    
    .h2h-stat-label {
        font-size: 0.75rem;
    }
    
    .h2h-match-item {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .standings-table {
        font-size: 10px;
    }
    
    .standings-table th,
    .standings-table td {
        padding: 4px 2px;
    }
}
/* Kiemelt csapatok a táblázatban */
.highlighted-team {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    font-weight: bold;
}

.dark-mode .highlighted-team {
    background-color: #332701 !important;
    border-left-color: #ffc107 !important;
    color: #fff !important;
}

/* H2H eredmény konténer javítása */
.h2h-match-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.h2h-away-team-name {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
}

.dark-mode .h2h-away-team-name {
    color: #adb5bd;
}

/* Csapat forma tooltip */
.form-item {
    position: relative;
    cursor: help;
}

.form-item:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.form-item:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Utolsó mérkőzések eredményei */
.team-recent-matches {
    margin-top: 20px;
}

.team-recent-matches h5 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

.dark-mode .team-recent-matches h5 {
    color: #ccc;
}

.recent-match-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 13px;
    border-left: 4px solid transparent;
}

.recent-match-item.win {
    background-color: #d4edda;
    border-left-color: #28a745;
}

.dark-mode .recent-match-item.win {
    background-color: #1e4620;
    color: #d4edda;
}

.recent-match-item.draw {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}

.dark-mode .recent-match-item.draw {
    background-color: #332701;
    color: #fff3cd;
}

.recent-match-item.loss {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

.dark-mode .recent-match-item.loss {
    background-color: #4a1e20;
    color: #f8d7da;
}

.recent-match-date {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

.dark-mode .recent-match-date {
    color: #adb5bd;
}

.recent-match-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.recent-match-opponent {
    font-size: 12px;
    font-weight: 500;
}

.recent-match-score {
    font-size: 12px;
    font-weight: bold;
    color: #495057;
}

.dark-mode .recent-match-score {
    color: #e9ecef;
}

/* Mobilra optimalizálás */
@media (max-width: 768px) {
    .h2h-match-score-container {
        margin: 10px 0;
    }
    
    .h2h-away-team-name {
        font-size: 11px;
    }
    
    .recent-match-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .recent-match-details {
        align-items: flex-start;
        width: 100%;
    }
    
    .form-item:hover::after,
    .form-item:hover::before {
        display: none;
    }
}