@charset "utf-8";
/* CSS Document */

body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #3f473a; color: #333; display: flex; flex-direction: column; min-height: 100vh; margin: 0; padding: 0; box-sizing: border-box; }
.banner-img { width: 100%; max-width: 1230px; height: auto; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; box-shadow: 0 8px 25px rgba(0,0,0,0.4); margin-bottom: 5px; display: block; margin-left: auto; margin-right: auto; }
.header-logo { font-size: 24px; font-weight: bold; color: #27ae60; text-transform: uppercase; letter-spacing: 1px; margin: 0; }
.main-content { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 20px; width: 100%; box-sizing: border-box; }
.container { display: flex; flex-wrap: wrap; gap: 30px; max-width: 900px; width: 100%; justify-content: center; margin: 0 auto; }
.card { background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); flex: 1; min-width: 300px; max-width: 400px; }
h2 { margin-top: 0; color: #2c3e50; border-bottom: 2px solid #27ae60; padding-bottom: 10px; font-size: 22px; }
label { font-size: 14px; color: #666; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"] { width: 100%; padding: 12px; margin: 8px 0 20px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; font-size: 14px; transition: border-color 0.3s; }
input:focus { border-color: #27ae60; outline: none; }
.checkbox-container { display: flex; align-items: center; margin-bottom: 20px; font-weight: normal; color: #555; cursor: pointer; }
.checkbox-container input[type="checkbox"] { margin-right: 10px; width: auto; transform: scale(1.2); cursor: pointer; accent-color: #27ae60; }
button { background-color: #27ae60; color: white; border: none; padding: 12px 20px; border-radius: 4px; cursor: pointer; width: 100%; font-size: 16px; font-weight: bold; transition: background-color 0.3s; }
button:hover { background-color: #219653; }
.btn-secondary { background-color: #7f8c8d; margin-top: 10px; }
.btn-secondary:hover { background-color: #636e72; }
.btn-small { background-color: #34495e; padding: 8px 15px; font-size: 13px; width: auto; margin-top: 15px; }
.btn-small:hover { background-color: #2c3e50; }
.alert { box-sizing: border-box; padding: 15px; border-radius: 4px; margin-bottom: 20px; width: 100%; max-width: 840px; text-align: center; font-weight: bold; line-height: 1.4; margin-left: auto; margin-right: auto;}
.alert.error { box-sizing: border-box; background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert.success { box-sizing: border-box; background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.welcome-card { text-align: center; max-width: 500px; margin: 0 auto; }
.help-text { font-size: 12px; color: #999; margin-top: -15px; margin-bottom: 15px; display: block; }
.forgot-link { display: block; text-align: right; font-size: 13px; color: #27ae60; text-decoration: none; margin-top: -10px; margin-bottom: 15px; }
.forgot-link:hover { text-decoration: underline; }

/* -------------------------------------------
   ZAPISY NA MECZE - PANELE I LISTY GRACZY
------------------------------------------- */

/* Główne bloki */
.panel-container { background: #fff; border: 1px solid #eee; border-radius: 8px; margin: 10px auto 30px auto; box-shadow: 0 2px 10px rgba(0,0,0,0.05); text-align: left; overflow: hidden; max-width: 1230px; width: 100%; }
.panel-header { margin: 0; background: #2c3e50; color: #fff; padding: 15px 20px; font-size: 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: none; }
.panel-body { padding: 20px; }

/* Etykiety i Badges */
.badge { font-size: 12px; padding: 4px 10px; border-radius: 12px; font-weight: bold; color: #fff; }
.badge-blue { background: #3498db; }
.badge-green { background: #27ae60; }
.badge-logout { background: #e74c3c; text-decoration: none; transition: 0.3s; }
.badge-logout:hover { background: #c0392b; }

.text-badge { font-size: 11px; }
.text-badge.green { color: #27ae60; }
.text-badge.gray { color: #bdc3c7; }
.text-badge.orange { color: #f39c12; }
.text-badge.red { color: #e74c3c; text-decoration: none; }

/* Tryb Admina */
.admin-banner { margin-bottom: 20px; padding: 15px; background: #fff3cd; border: 1px solid #ffeeba; border-radius: 4px; display: flex; justify-content: center; gap: 15px; align-items: center; }
.admin-banner strong { color: #856404; margin-right: 10px; }
.btn-admin { width: auto; padding: 8px 15px; font-size: 13px; text-decoration: none; border-radius: 4px; color: #fff; border: none; cursor: pointer; }
.btn-admin.blue { background-color: #3498db; }
.btn-admin.orange { background-color: #e67e22; }

/* Komunikaty wewnątrz panelu */
.auth-pending-alert { padding: 15px; background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 4px; text-align: center; }
.auth-pending-alert span { font-size: 14px; }

/* Profil Gracza */
.profile-card { padding: 20px; background-color: #fff; border: 1px solid #e0e0e0; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; box-shadow: inset 0 2px 8px rgba(0,0,0,0.02); }
.profile-info { text-align: left; display: flex; align-items: center; }
.profile-icon { width: 36px; height: 36px; margin-right: 12px; opacity: 0.8; }
.profile-label { font-size: 12px; color: #7f8c8d; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.profile-name { color: #2c3e50; font-size: 20px; font-weight: bold; }

.washing-counter {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid #eef2f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    min-width: 110px;
    transition: transform 0.2s ease;
}


/* Na małych ekranach ustawiamy szopa pod nazwiskiem, jeśli się nie mieści */
@media (max-width: 480px) {
    .profile-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .washing-counter {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
}

/* Kolumny i Listy */
.list-layout { display: flex; flex-wrap: wrap; gap: 30px; }
.list-column { flex: 1; min-width: 300px; }
.list-column-small { flex: 1; min-width: 200px; }

.list-header { font-size: 15px; margin-top: 0; margin-bottom: 15px; padding-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; }
.list-header.green { color: #27ae60; border-bottom-color: #27ae60; }
.list-header.orange { color: #f39c12; border-bottom-color: #f39c12; }
.list-header.red { color: #e74c3c; border-bottom-color: #e74c3c; margin-top: 20px; }

.player-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.player-list.mb-20 { margin-bottom: 20px; }
.player-item { padding: 8px 0; border-bottom: 1px solid #f9f9f9; display: flex; align-items: center; justify-content: space-between; }
.player-item.empty { color: #aaa; }
.player-item.absent { color: #aaa; text-decoration: line-through; }

.player-item-left { display: flex; align-items: center; }
.player-item-right { margin-left: auto; display: flex; align-items: center; }
.player-icon-svg { width: 26px; height: 26px; margin-right: 12px; flex-shrink: 0; }
.player-icon-svg.absent { opacity: 0.5; }

.admin-actions { display: flex; gap: 4px; margin-left: 8px; }

/* Status Gracza (Zapisy) */
.status-box { margin-top: 25px; padding: 20px; background: #fcfcfc; border: 1px dashed #bdc3c7; border-radius: 6px; text-align: center; }
.status-label { font-size: 14px; color: #7f8c8d; margin-bottom: 12px; }
.status-label strong { font-size: 16px; }
.status-subtext { font-size: 12px; color: #95a5a6; margin: 0 0 15px 0; }
.status-actions { display: flex; gap: 10px; justify-content: center; }
.status-form { flex: 1; margin: 0; max-width: 300px; }

.btn-action { padding: 12px 10px; font-size: 13px; border-radius: 4px; width: 100%; color: #fff; border: none; cursor: pointer; font-weight: bold; }
.btn-leave { background: #e74c3c; }
.btn-join { background: #27ae60; box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3); }

/* Podsumowanie i reguły */
.total-players-box { margin-top: 25px; padding: 15px; background-color: #f4f7f6; border-radius: 4px; text-align: center; font-weight: bold; color: #333; font-size: 15px; }
.total-players-box span { font-size: 18px; }
.rule-box { padding: 15px; background-color: #f4f7f6; text-align: center; font-size: 13px; color: #666; border-top: 1px solid #eee; }

/* Statystyki Frekwencji */
.freq-stats { font-size: 12px; }
.freq-count { margin-right: 8px; color: #888; font-weight: normal; font-size: 11px; }
.freq-percent { font-weight: bold; }

/* Kolory tekstu użytkowe */
.text-dark-bold { color: #2c3e50; font-weight: 600; }
.text-dark { color: #2c3e50;  }
.text-gray { color: #7f8c8d; }
.text-light-gray { color: #bdc3c7; }
.text-green { color: #27ae60; }
.text-red { color: #e74c3c; }
.text-orange { color: #f39c12; }
.mt-10 { margin-top: 10px; }

/* --- EDYCJA INLINE (HOVER) --- */
.editable-text { cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.editable-text .edit-icon { opacity: 0; font-size: 16px; color: #bdc3c7; transition: opacity 0.2s ease, color 0.2s ease; margin-top: -2px; }
.editable-text:hover .edit-icon { opacity: 1; color: #3498db; }

/* ------------------------------------------- LAYOUT DWUKOLUMNOWY ORAZ CZAT (WHATSAPP STYLE) ------------------------------------------- */
.content-wrapper { display: flex; gap: 20px; width: 100%; max-width: 1230px; align-items: flex-start; flex-wrap: nowrap; margin: 0 auto; }
.main-column { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sidebar-column { width: 320px; flex-shrink: 0; }
.content-wrapper .panel-container { margin: 0; max-width: 100%; }
@media (max-width: 850px) { .content-wrapper { flex-direction: column; } .sidebar-column { width: 100%; order: -1; } .main-column { width: 100%; order: 1; } }
.chat-panel { display: flex; flex-direction: column; height: 710px; background: #efeae2; }
.chat-header { background: #008069; color: white; border-radius: 8px 8px 0 0; }
.chat-body { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.chat-form { display: flex; padding: 12px; background: #f0f2f5; gap: 10px; border-top: 1px solid #d1d7db; margin: 0; align-items: flex-end; }
.chat-form textarea { flex: 1; margin: 0; padding: 12px 20px; border-radius: 20px; border: 1px solid #fff; font-size: 15px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); transition: 0.2s; resize: none; overflow-y: hidden; min-height: 46px; max-height: 120px; font-family: inherit; line-height: 1.4; box-sizing: border-box; }
.chat-form textarea:focus { outline: none; border: 1px solid #00a884; }
.btn-chat-send { width: 40px; height: 40px; border-radius: 50%; background: #00a884; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 16px; margin: 0; box-shadow: 0 1px 2px rgba(0,0,0,0.2); color: white; border: none; cursor: pointer; }
.btn-chat-send:hover { background: #008f6f; }
.chat-messages { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 85%; padding: 6px 10px 8px 10px; border-radius: 8px; position: relative; font-size: 14px; box-shadow: 0 1px 0.5px rgba(11,20,26,.13); display: flex; flex-direction: column; }
.chat-bubble.other { align-self: flex-start; background-color: #ffffff; border-top-left-radius: 0; }
.chat-bubble.me { align-self: flex-end; background-color: #d9fdd3; border-top-right-radius: 0; }
.chat-author { font-size: 12px; font-weight: bold; color: #1fa855; margin-bottom: 3px; }
.chat-text { word-wrap: break-word; line-height: 1.4; color: #111b21; }
.chat-time { font-size: 10px; color: #667781; align-self: flex-end; margin-top: 5px; line-height: 1; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #bdc3c7; border-radius: 10px; }
.chat-bubble.me { padding-right: 25px; position: relative; }
.chat-delete-btn { position: absolute !important; top: 4px !important; right: 4px !important; width: 20px !important; height: 20px !important; background: transparent !important; border: none !important; color: #e74c3c !important; font-size: 16px !important; font-weight: bold; cursor: pointer !important; padding: 0 !important; margin: 0 !important; outline: none !important; line-height: 1 !important; z-index: 10; opacity: 0.7; transition: 0.2s; }
.chat-delete-btn:hover { opacity: 1; transform: scale(1.2); }



/* --- CYTOWANIE WIADOMOŚCI OPARTE O BAZĘ --- */
.chat-bubble {
    padding-right: 35px; /* Miejsce na strzałkę na cudzych wiadomościach */
    position: relative;
}
.chat-bubble.me {
    padding-right: 25px; /* Mniejsze marginesy na moich wiadomościach (tylko na 'X') */
}
.chat-quote {
    background: rgba(0, 0, 0, 0.04);
    border-left: 3px solid #00a884;
    padding: 6px 10px;
    margin-bottom: 6px;
    margin-top: 2px;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
    line-height: 1.3;
}
.chat-bubble.me .chat-quote {
    background: rgba(255, 255, 255, 0.5);
    border-left-color: #1fa855;
    color: #333;
}

/* --- PRZYCISK ODPOWIEDZI (SVG) --- */
.chat-reply-btn {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: 24px !important;
    height: 24px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    z-index: 10;
    color: #95a5a6; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important; 
    transition: all 0.2s ease;
    opacity: 0.6;
}

.chat-reply-btn:hover {
    opacity: 1;
    color: #00a884; 
    background: rgba(0, 0, 0, 0.05) !important;
}

/* --- PODGLĄD CYTATU NAD POLEM TEKSTOWYM --- */
#reply-preview {
    display: none;
    /* 30px z prawej strony robi bezpieczne miejsce na "X" w rogu */
    padding: 8px 30px 8px 12px; 
    background: #e9ecef;
    border-left: 4px solid #00a884;
    font-size: 13px;
    margin: 0 12px 10px 12px;
    position: relative !important;
    border-radius: 6px;
    color: #555;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#reply-preview-nick {
    color: #00a884;
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
    padding-right: 15px; /* Dodatkowy margines, żeby długi nick nie wszedł pod krzyżyk */
}

#reply-close-btn {
    position: absolute !important;
    top: 4px !important; /* Przyklejony do góry... */
    right: 4px !important; /* ...i do prawej krawędzi */
    width: 24px !important;
    height: 24px !important;
    background: transparent !important;
    border: none !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    color: #95a5a6 !important;
    line-height: 1 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    transition: 0.2s;
}

#reply-close-btn:hover {
    color: #e74c3c !important; 
    transform: scale(1.2) !important;
}

/* --- MODAL NIEOBECNOŚCI --- */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 9999; backdrop-filter: blur(3px); }
.modal-content { background: #fff; padding: 25px 30px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); max-width: 400px; width: 90%; text-align: center; animation: fadeIn 0.3s ease; }
.modal-title { margin-top: 0; color: #2c3e50; border-bottom: 2px solid #e74c3c; padding-bottom: 10px; font-size: 20px; }
.modal-text { color: #333; font-size: 15px; margin: 20px 0; line-height: 1.5; }
.modal-actions { display: flex; gap: 15px; justify-content: center; margin-top: 25px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }


/* --- GENERATOR SKŁADÓW --- */
.generator-arena { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 20px; min-height: 250px; }

/* Pula Graczy */
.pool-area { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Kafelek Gracza */
.player-tile { background: #fff; width: 85px; padding: 10px 5px; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.08); text-align: center; border: 1px solid #dee2e6; transition: transform 0.2s, box-shadow 0.2s; }
.player-tile:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.player-name-tile { font-size: 11px; font-weight: bold; color: #2c3e50; margin: 6px 0 3px; word-wrap: break-word; line-height: 1.1; }
.player-mmr-tile { font-size: 10px; color: #7f8c8d; }

/* Koszulki (SVG) */
.jersey svg { width: 45px; height: 45px; transition: fill 0.3s; }
.jersey.neutral svg { fill: #bdc3c7; } /* Szara przed wylosowaniem */
.jersey.team-a svg { fill: #3498db; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2)); stroke: #2980b9; stroke-width: 1px; } /* Niebieskie */
.jersey.team-b svg { fill: #e74c3c; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2)); stroke: #c0392b; stroke-width: 1px; } /* Czerwone */

/* Drużyny */
.teams-area { display: flex; justify-content: space-between; align-items: stretch; gap: 15px; }
.team-col { flex: 1; background: #fff; border-radius: 8px; padding: 15px; border: 1px solid #e9ecef; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.team-title { text-align: center; font-size: 18px; margin-top: 0; color: #34495e; padding-bottom: 10px; border-bottom: 2px solid #ecf0f1; }
.team-title.dark { color: #2c3e50; border-bottom: 2px solid #2c3e50; }
.avg-mmr { display: block; font-size: 13px; color: #7f8c8d; font-weight: normal; margin-top: 4px; }
.team-roster { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 15px; }

.vs-divider { display: flex; align-items: center; font-size: 24px; font-weight: 900; color: #e74c3c; padding: 0 10px; font-style: italic; }

@media (max-width: 768px) {
    .teams-area { flex-direction: column; }
    .vs-divider { justify-content: center; padding: 15px 0; }
}

/* --- DRAG & DROP ORAZ BLOKADY --- */
.player-tile { position: relative; cursor: grab; user-select: none; }
.player-tile:active { cursor: grabbing; }
.player-tile.dragging { opacity: 0.5; transform: scale(0.95); }

/* Ikona kłódki */
.lock-icon { position: absolute; top: 4px; right: 4px; font-size: 13px; cursor: pointer; opacity: 0.3; transition: 0.2s; z-index: 10; }
.lock-icon:hover { opacity: 1; transform: scale(1.2); }

/* --- Wygląd zablokowanego gracza (Korekta kolorów i bordera) --- */

/* Generyczne ustawienia dla zablokowanego (ikona) */
.player-tile.locked .lock-icon {
    opacity: 1;
}

/* Blokada dla Niebieskich (Team A) */
.player-tile.locked[data-locked="a"] {
    border: 1px solid #3498db; /* Cienki niebieski border */
    box-shadow: 0 0 6px rgba(52, 152, 219, 0.4); /* Niebieska poświata */
}

/* Blokada dla Czerwonych (Team B) */
.player-tile.locked[data-locked="b"] {
    border: 1px solid #e74c3c; /* Cienki czerwony border */
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.4); /* Czerwona poświata */
}

/* Strefy zrzutu (Drag & Drop) */
.team-roster, .pool-area { min-height: 100px; padding-bottom: 20px; transition: background 0.2s; border-radius: 8px; }
.team-roster.drag-over { background: rgba(0,0,0,0.05); }

/* --- STREFY BOISKA (TAKTYKA) --- */
.pitch-zone {
    min-height: 95px;
    background: rgba(39, 174, 96, 0.05);
    border: 1px dashed rgba(39, 174, 96, 0.4);
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px; /* Równy padding z każdej strony, bo nie ma już napisów */
    position: relative;
    transition: background 0.2s;
}
.pitch-zone.drag-over {
    background: rgba(39, 174, 96, 0.2);
    border: 1px dashed #27ae60;
}

/* --- MAGIA UKŁADU MOBILNEGO DLA CZATU I RANKINGU --- */
@media (max-width: 992px) {
    /* Główny kontener staje się pionową listą klocków */
    .content-wrapper {
        display: flex;
        flex-direction: column;
    }

    /* Rozpuszczamy prawą kolumnę! Czat i ranking "wypadają" bezpośrednio do content-wrapper */
    .sidebar-column {
        display: contents;
    }

    /* Ustalamy kolejność elementów na ekranie telefonu */
    .chat-panel {
        order: 1; /* Czat leci na samą górę układu (zaraz pod wizytówką gracza) */
        width: 100%;
        margin-bottom: 20px;
    }
	
	.finanse-column {
        order: 3; /* Generator, składy i listy lądują pośrodku */
        width: 100%;
    }

    .main-column {
        order: 2; /* Generator, składy i listy lądują pośrodku */
        width: 100%;
    }

    .ranking-panel {
        order: 4; /* Ranking zostaje zepchnięty na sam dół strony */
        width: 100%;
    }
	
	    .halloffame {
        order: 5; /* Ranking zostaje zepchnięty na sam dół strony */
        width: 100%;
    }
}

/* --- POPRZEDNI MECZ UKŁAD --- */
.prev-match-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* Na PC w jednej linii: Lewa - Środek - Prawa */
    gap: 20px;
}
.prev-team { flex: 1; min-width: 150px; }
.prev-score { flex: 1; min-width: 200px; text-align: center; }

.team-mobile-label { display: none; font-weight: bold; margin-bottom: 10px; text-align: center; font-size: 14px; text-transform: uppercase; }

.prev-team-a li { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 8px; text-align: right; }
.prev-team-b li { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 8px; text-align: left; }
.prev-team svg { width: 20px; height: 20px; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)); }
.prev-team-a svg { margin-left: 10px; }
.prev-team-b svg { margin-right: 10px; }

/* WIDOK NA TELEFONY */
@media (max-width: 768px) {
    .prev-match-layout {
        flex-wrap: wrap; /* Pozwalamy na złamanie linii */
        align-items: flex-start;
    }
    .prev-score {
        order: 1; /* Wynik na samej górze */
        width: 100%;
        flex: none;
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px dashed #bdc3c7; /* Delikatna linia oddzielająca */
    }
    .prev-team-a {
        order: 2; /* Lewa kolumna pod spodem */
        width: 46%;
        flex: none;
        min-width: 0;
    }
    .prev-team-b {
        order: 3; /* Prawa kolumna pod spodem obok lewej */
        width: 46%;
        flex: none;
        min-width: 0;
    }

    .team-mobile-label { display: block; }
    
    /* === TUTAJ JEST POPRAWKA DLA NIEBIESKICH === */
    /* Zmieniamy układ na mobile, żeby koszulki Niebieskich były do środka (po prawej) */
    .prev-team-a li {
        justify-content: flex-end; /* Wyrównanie zawartości li do prawej */
        text-align: right;          /* Wyrównanie tekstu do prawej */
        /* direction: rtl; */       /* Nie używamy rtl, użyjemy domyślnej kolejności */
    }

    /* Nazwisko u Niebieskich (będzie po lewej stronie koszulki) */
    .prev-team-a li span.p-name {
        order: 1; /* Nazwisko ma być pierwsze */
    }

    /* Koszulka u Niebieskich (będzie po prawej stronie nazwiska, do środka) */
    .prev-team-a li svg {
        order: 2; /* Koszulka ma być druga */
        margin-left: 10px;  /* Margines od nazwiska do koszulki */
        margin-right: 0;   /* Zerujemy margines z prawej (był dla PC) */
    }
    
    /* Czerwoni bez zmian, na PC i mobile mają koszulkę po lewej (do środka) */
    .p-name {
        word-break: break-word; /* Zabezpieczenie przed ucięciem długich nazwisk */
    }
}

/* --- TOOLTIPY (PODPOWIEDZI) --- */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    cursor: help;
    vertical-align: middle;
	text-transform: none !important;
}
.tooltip-icon {
    background-color: #bdc3c7;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    font-family: monospace;
    transition: background-color 0.2s;
}
.tooltip-container:hover .tooltip-icon {
    background-color: #3498db;
}
.tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 100;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s, bottom 0.2s;
    font-size: 11px;
    font-weight: normal;
    line-height: 1.4;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    pointer-events: none;
}
.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}
.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    bottom: 140%;
}