* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #333;
}

/* Bejelentkezés/Regisztráció */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    padding: 40px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2.5em;
    color: #1e3c72;
    margin-bottom: 5px;
}

.logo p {
    color: #666;
    font-size: 14px;
}

.form-wrapper {
    position: relative;
    min-height: 400px;
}

.form {
    position: absolute;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.form.active {
    opacity: 1;
    pointer-events: all;
    position: relative;
}

.form h2 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 5px rgba(42, 82, 152, 0.2);
}

.form-group small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.4);
}

.switch-form {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.switch-form a {
    color: #2a5298;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.switch-form a:hover {
    text-decoration: underline;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    min-height: 20px;
    font-weight: 500;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* Dashboard */
.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo h2 {
    color: white;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.btn-logout {
    background-color: #ff6b6b;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
}

.btn-logout:hover {
    background-color: #ee5a52;
}

.dashboard-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 200px;
    background: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f5f5f5;
    color: #1e3c72;
}

.nav-link.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.content {
    flex: 1;
    padding: 30px;
    background-color: #f9f9f9;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section h2 {
    color: #1e3c72;
    margin-bottom: 25px;
    font-size: 1.8em;
    border-bottom: 2px solid #2a5298;
    padding-bottom: 10px;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.match-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.match-header {
    text-align: center;
    margin-bottom: 15px;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    height: 20px;
    line-height: 20px;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 20px;
    min-height: 140px;
}

.team {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-flag-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    position: relative;
    height: 40px;
}

.team-flag {
    max-width: 50px;
    max-height: 40px;
    width: auto;
    height: auto;
    border-radius: 4px;
    border: 2px solid #ddd;
    object-fit: contain;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.team-flag-emoji span {
    display: none;
}

.team-name {
    font-weight: 600;
    color: #1e3c72;
    margin-top: 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.vs {
    color: #999;
    font-weight: 500;
    padding: 0 15px;
    align-self: center;
}

.match-result {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 15px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-result input {
    width: 45px;
    height: 40px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin: 0 5px;
    font-size: 16px;
}

.prediction-input {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.prediction-btn {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    min-width: 100px;
}

.prediction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(30, 60, 114, 0.3);
}

.prediction-btn.saved {
    background: #51cf66;
}

.standings-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.standings-group {
    margin-bottom: 20px;
}

.standings-group h3 {
    background: #2a5298;
    color: white;
    padding: 12px 15px;
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #ddd;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background-color: #f9f9f9;
}

/* ===== MECCS RÉSZLETEI MODAL ===== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

.match-details-content {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-team-flag {
    max-width: 45px;
    max-height: 35px;
    width: auto;
    height: auto;
    border-radius: 4px;
    border: 2px solid white;
    object-fit: contain;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2em;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 30px;
}

.details-section {
    margin-bottom: 35px;
}

.details-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.4em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-item .label {
    display: block;
    color: #666;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.info-item .value {
    display: block;
    color: #333;
    font-size: 1.1em;
}

/* Játékvezetők */
.referees-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.referee-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #667eea;
    text-align: center;
}

.referee-role {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.referee-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.referee-info {
    font-size: 0.85em;
    color: #666;
}

/* Meccs Események */
.events-list {
    border-left: 4px solid #667eea;
    padding-left: 20px;
}

.event-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #999;
}

.event-item.event-goal {
    border-left-color: #22c55e;
    background-color: #dcfce7;
}

.event-item.event-yellow_card {
    border-left-color: #eab308;
    background-color: #fef08a;
}

.event-item.event-red_card {
    border-left-color: #ef4444;
    background-color: #fee2e2;
}

.event-item.event-substitution_in {
    border-left-color: #3b82f6;
    background-color: #dbeafe;
}

.event-item.event-substitution_out {
    border-left-color: #8b5cf6;
    background-color: #ede9fe;
}

.event-time {
    font-weight: 700;
    min-width: 60px;
    color: #333;
}

.event-icon {
    font-size: 1.5em;
    margin: 0 15px;
    min-width: 30px;
    text-align: center;
}

.event-details {
    flex: 1;
}

.event-team {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.event-player {
    font-weight: 600;
    color: #333;
}

.event-notes {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Játékosok Statisztikái */
.teams-stats {
    display: grid;
    gap: 30px;
}

.team-stats-group {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #667eea;
}

.team-stats-group h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.stats-table thead th {
    background-color: #667eea;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 10px 8px;
}

.stats-table thead th:first-child {
    text-align: left;
}

.stats-table tbody td {
    padding: 10px 8px;
    text-align: center;
    color: #333;
}

.stats-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
}

.stats-table tbody tr:nth-child(odd) {
    background-color: white;
}

.stats-table tbody tr:nth-child(even) {
    background-color: #f0f0f0;
}

.player-name {
    font-weight: 600 !important;
}

/* Match Buttons Görüntüsü */
.match-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
    min-height: 50px;
}

.match-buttons button {
    flex: 1;
    min-height: 50px;
}

/* Notification Animációk */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.notification-success {
    background-color: #51cf66;
}

.notification-error {
    background-color: #ff6b6b;
}

.notification-info {
    background-color: #4dabf7;
}

/* Button States */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.details-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.details-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3em;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .referees-list {
        grid-template-columns: 1fr;
    }
    
    .match-buttons {
        flex-direction: column;
    }
    
    .stats-table {
        font-size: 0.8em;
    }
    
    .stats-table thead th,
    .stats-table tbody td {
        padding: 8px 4px;
    }
}

.leaderboard-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.leaderboard-rank {
    font-weight: 700;
    color: #2a5298;
    font-size: 18px;
    min-width: 40px;
}

.leaderboard-user {
    flex: 1;
    margin-left: 20px;
}

.leaderboard-user-name {
    font-weight: 600;
    color: #333;
}

.leaderboard-user-score {
    color: #999;
    font-size: 12px;
}

.leaderboard-points {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-link {
        flex: 1;
        min-width: 100px;
    }

    .matches-grid {
        grid-template-columns: 1fr;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
}
