@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap');

/* ========================================= */
/* 1. CORE STYLES & LAYOUT */
/* ========================================= */

/* Footer & Branding */
.ess-plugin-footer { text-align: center; margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; font-family: 'Oswald', sans-serif; font-size: 10px; color: #aaa; letter-spacing: 1px; clear: both; }
.ess-plugin-footer a { text-decoration: none; color: #999; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
.ess-plugin-footer a:hover { color: #fca311; }
.ess-plugin-footer img { width: 14px; height: 14px; object-fit: contain; }
.ess-brand-bold { color: #000; font-weight: bold; }

/* Links & Layout */
.ess-link-black { color: #333; text-decoration: none; transition: 0.2s; }
.ess-link-black:hover { color: #fca311; }
.ess-profile-wrapper { font-family: 'Roboto', sans-serif; max-width: 100%; margin: 0 auto; clear: both; }

/* ========================================= */
/* 2. FULL PROFILE PAGES (Player & Team) */
/* ========================================= */

/* Profile Headers */
.ess-profile-header.ess-player-layout { display: grid; grid-template-columns: 350px 1fr 1fr; gap: 30px; align-items: center; background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 30px; border: 1px solid #eee; text-align: left; }
.ess-profile-header { display: flex; flex-direction: row; align-items: center; gap: 30px; background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 30px; border: 1px solid #eee; text-align: left; }

/* Images & Avatars */
.ess-profile-avatar-square { width: 350px; height: 350px; border-radius: 10px; object-fit: cover; border: none; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 0; display: block; }
.ess-team-logo-circle { width: 120px; height: 120px; border-radius: 50%; object-fit: contain; background: #fff; padding: 10px; border: 3px solid #fca311; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 0; flex-shrink: 0; }

/* Typography & Info */
.ess-profile-info { width: 100%; }
.ess-profile-name { font-family: 'Oswald', sans-serif; text-transform: uppercase; margin: 0 0 10px 0; font-size: 64px; line-height: 1; color: #000; letter-spacing: 1px; font-weight: 800; display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
.ess-real-name { display: block; font-size: 32px; color: #666; margin-bottom: 5px; font-weight: bold; }
.ess-aliases { display: block; font-size: 14px; color: #999; margin-bottom: 15px; font-style: italic; }

/* Verification Badges */
.ess-verified-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: #1d9bf0; margin-top:-5px; }
.ess-verified-badge svg { width: 100%; height: 100%; fill: currentColor; }
.ess-verified-mini { display: inline-flex; width: 14px; height: 14px; color: #1d9bf0; vertical-align: middle; margin-left: 0; margin-bottom: 2px; }
.ess-verified-mini svg { width: 100%; height: 100%; fill: currentColor; }
.ett-verified-dot { position: absolute; bottom: 0; right: 10px; width: 16px; height: 16px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #1d9bf0; box-shadow: 0 1px 3px rgba(0,0,0,0.2); z-index: 5; }
.ett-verified-dot svg { width: 12px; height: 12px; fill: currentColor; }

/* Player League Badges */
.ess-player-badges-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ess-league-badge { padding: 4px 10px; border-radius: 4px; font-family: 'Oswald', sans-serif; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.ess-badge-headadmin { background: linear-gradient(135deg, #e53935, #b71c1c); border: 1px solid #b71c1c; }
.ess-badge-admin { background: linear-gradient(135deg, #ef5350, #c62828); border: 1px solid #c62828; }
.ess-badge-moderator { background: linear-gradient(135deg, #43a047, #1b5e20); border: 1px solid #1b5e20; }
.ess-badge-donator { background: linear-gradient(135deg, #ffb300, #ff8f00); border: 1px solid #ff8f00; color: #000; }
.ess-badge-streamer { background: linear-gradient(135deg, #8e24aa, #4a148c); border: 1px solid #4a148c; }
.ess-badge-vip { background: linear-gradient(135deg, #ffd700, #ffaa00); border: 1px solid #ffaa00; color: #000; }

/* Game Badges & Socials */
.ess-big-game-badge { font-family: 'Oswald', sans-serif; font-size: 18px; padding: 5px 12px; margin-right: 5px; border-radius: 4px; color: #fff; font-weight: bold; text-transform: uppercase; display: inline-block; }
.ess-social-row { margin-top: 10px; display: flex; gap: 10px; }
.ess-soc-btn { width: 32px; height: 32px; background: #eee; border-radius: 4px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: #333; transition: 0.2s; }
.ess-soc-btn:hover { background: #fca311; color: #000; transform: translateY(-2px); }
.ess-soc-btn .dashicons { font-size: 20px; width: 20px; height: 20px; }
.ess-soc-btn svg { width: 18px; height: 18px; fill: currentColor; }
.ess-rec-badge { display: inline-block; background: #28a745; color: #fff; font-family: 'Oswald', sans-serif; font-size: 12px; font-weight: bold; padding: 2px 8px; border-radius: 4px; margin-left: 10px; vertical-align: middle; animation: essPulse 2s infinite; }
@keyframes essPulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

/* Columns & Metadata */
.ess-col-main { display: flex; flex-direction: column; justify-content: center; }
.ess-col-meta { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.ess-meta-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 5px; }
.ess-meta-row:last-child { border-bottom: none; }
.ess-details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-top: 15px; }
.ess-det-box { background: #f9f9f9; padding: 10px; border-radius: 6px; border: 1px solid #eee; text-align: center; }
.ess-det-label { display: block; font-size: 10px; color: #999; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
.ess-det-val { display: block; font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: bold; color: #333; margin-top: 2px; }

/* Section Titles & History */
.ess-section-title { font-family: 'Oswald', sans-serif; font-size: 18px; border-bottom: 3px solid #fca311; padding-bottom: 8px; margin-bottom: 20px; margin-top: 40px; color: #000; text-transform: uppercase; letter-spacing: 1px; }
.ess-team-history-strip { display: flex; align-items: flex-start; gap: 15px; overflow-x: auto; padding-bottom: 10px; }
.ess-th-item { display: flex; flex-direction: column; align-items: center; opacity: 0.7; transition: 0.2s; text-decoration: none; min-width: 60px; }
.ess-th-item:hover { opacity: 1; transform: translateY(-3px); }
.ess-th-logo { width: 50px; height: 50px; object-fit: contain; margin-bottom: 5px; filter: grayscale(100%); transition: 0.2s; }
.ess-th-item:hover .ess-th-logo { filter: grayscale(0%); }
.ess-th-item.current-team { opacity: 1; position: relative; }
.ess-th-item.current-team .ess-th-logo { filter: grayscale(0%); border-bottom: 3px solid #fca311; padding-bottom: 5px; }
.ess-th-year { font-size: 10px; color: #999; font-weight: bold; }

/* Former Players Grid */
.ess-former-grid { display: flex; flex-wrap: wrap; gap: 15px; }
.ess-former-item { display: flex; flex-direction: column; align-items: center; width: 60px; text-decoration: none; opacity: 0.8; transition: 0.2s; }
.ess-former-item:hover { opacity: 1; transform: translateY(-2px); }
.ess-former-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; filter: grayscale(100%); margin-bottom: 5px; transition: 0.2s; border: 2px solid #eee; }
.ess-former-item:hover .ess-former-img { filter: grayscale(0%); border-color: #fca311; }
.ess-former-year { font-size: 10px; color: #999; font-weight: bold; font-family: 'Oswald', sans-serif; }

/* Roster Grids */
.ess-roster-center { display: flex; justify-content: center; align-items: flex-start; gap: 15px; flex-wrap: wrap; }
.ess-roster-item { display: flex; flex-direction: column; align-items: center; width: 60px; text-align: center; text-decoration: none; cursor: default; } 
.ess-roster-face { width: 50px !important; height: 50px !important; border-radius: 50% !important; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.2s; margin-bottom: 4px; }
.ess-roster-face:hover { transform: scale(1.1); border-color: #fca311; }
.ess-roster-nick { font-family: 'Oswald', sans-serif; font-size: 12px; color: #000 !important; font-weight: 700; text-transform: uppercase; line-height: 1.2; display: flex; flex-direction: column; align-items: center; }
.ess-roster-flag { font-size: 10px; margin-top: 2px; }
.ess-roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }

/* Roster Card Styles */
.ess-roster-card { display: flex; flex-direction: column; align-items: center; gap: 5px; background: #fff; padding: 15px; border: 1px solid #eee; border-radius: 6px; text-decoration: none; transition: 0.2s; }
.ess-roster-card:hover { border-color: #fca311; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.ess-roster-img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid #f9f9f9; margin-bottom: 5px; } 
.ess-roster-name { font-family: 'Oswald', sans-serif; font-weight: bold; font-size: 14px; text-transform: uppercase; color: #000; text-align: center; line-height: 1.2; display: flex; align-items: center; gap: 4px; }
.ess-roster-meta { display: flex; justify-content: center; align-items: center; gap: 5px; width: 100%; }
.ess-roster-flag { font-size: 11px; color: #666; font-family: 'Roboto', sans-serif; }
.ess-roster-role { font-size: 10px; text-transform: uppercase; color: #999; font-weight: bold; letter-spacing: 0.5px; margin-top: -3px; }

/* Analytics Section */
.ess-analytics-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); margin-bottom: 30px; }
.ess-analytics-col { display: flex; flex-direction: column; justify-content: center; }
.ess-stat-label-row { display: flex; justify-content: space-between; align-items: center; font-family: 'Oswald', sans-serif; font-size: 12px; color: #333; margin-bottom: 5px; }
.ess-form-guide { display: flex; gap: 4px; }
.ess-form-badge { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-weight: bold; font-size: 10px; color: #fff; font-family: 'Oswald', sans-serif; }
.bg-win { background-color: #28a745; }
.bg-loss { background-color: #dc3545; }
.bg-gray { background-color: #999; }
.ess-progress-bar { width: 100%; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.ess-progress-fill { height: 100%; background: #1d9bf0; transition: width 0.5s ease-in-out; }

.ess-best-map-card { position: relative; height: 100px; border-radius: 6px; overflow: hidden; background-size: cover; background-position: center; border: 1px solid #eee; }
.ess-bm-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: #fff; padding: 10px; }
.ess-bm-label { font-size: 9px; text-transform: uppercase; font-weight: bold; letter-spacing: 1px; color: #fca311; margin-bottom: 3px; }
.ess-bm-name { font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: bold; text-transform: uppercase; line-height: 1.2; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.ess-bm-stat { font-size: 11px; font-weight: bold; margin-top: 2px; color: #eee; }

@media(max-width: 600px) {
    .ess-analytics-container { grid-template-columns: 1fr; }
}

/* TROPHY CASE */
.ess-trophy-case { display: flex; flex-wrap: wrap; gap: 15px; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.03); min-height: 100px; align-items: flex-start; margin-bottom: 30px; }
.ess-trophy-empty { color: #aaa; font-style: italic; font-size: 12px; width: 100%; text-align: center; }
.ess-trophy-item { 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    width: 60px; 
    cursor: pointer; 
    transition: transform 0.2s; 
    text-decoration: none; 
    color: inherit; 
}
.ess-trophy-item:hover { transform: translateY(-5px) scale(1.1); }
.ess-trophy-item svg { width: 40px; height: 40px; drop-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.ess-trophy-place { font-family: 'Oswald', sans-serif; font-weight: bold; font-size: 12px; position: absolute; top: 12px; width: 100%; text-align: center; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); pointer-events: none; }
.ess-trophy-label { font-size: 9px; font-weight: bold; font-family: 'Oswald', sans-serif; text-align: center; margin-top: 4px; line-height: 1.1; color: #555; text-transform: uppercase; }
.ess-trophy-item:hover .ess-trophy-label { color: #fca311; }

/* UPCOMING MATCHES */
.ess-upcoming-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.ess-up-card { background: #fff; border: 1px solid #eee; border-radius: 6px; padding: 10px 15px; display: flex; flex-direction: column; gap: 5px; box-shadow: 0 3px 10px rgba(0,0,0,0.03); border-left: 4px solid #fca311; }
.ess-up-header { display: flex; justify-content: space-between; font-size: 10px; color: #999; text-transform: uppercase; font-weight: bold; border-bottom: 1px solid #f5f5f5; padding-bottom: 5px; margin-bottom: 5px; }
.ess-up-date { color: #333; }
.ess-up-teams { display: flex; align-items: center; justify-content: space-between; font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: bold; color: #000; }
.ess-up-team { display: flex; align-items: center; gap: 8px; width: 40%; }
.ess-up-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ess-up-flag { width: 20px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.ess-up-vs { color: #ccc; font-size: 10px; font-weight: normal; }

/* History Lists */
.ess-history-list { background: #fff; border-radius: 8px; border: 1px solid #eee; overflow: hidden; margin-bottom: 20px; }
.ess-hist-row { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
.ess-hist-row:last-child { border-bottom: none; }
.ess-hist-date { width: 90px; color: #999; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.ess-hist-move { display: flex; align-items: center; gap: 10px; flex-grow: 1; }
.ess-hist-arrow { color: #fca311; font-weight: bold; font-size: 16px; }
.ess-hist-team a { text-decoration: none; color: #333; transition: 0.2s; }
.ess-hist-team a:hover { color: #fca311; }
.ess-link-row { text-decoration: none; color: #333; transition: background 0.2s; display: flex; align-items: center; }
.ess-link-row:hover { background: #f9f9f9; color: #000; }
.ess-profile-name .ess-verified-mini { width: 42px !important; height: 42px !important; margin-top: -5px; }

/* Responsive Grid */
.ess-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media(max-width: 768px) { 
    .ess-cols-2 { grid-template-columns: 1fr; } 
    .ess-profile-header, .ess-profile-header.ess-player-layout { display: flex; flex-direction: column; text-align: center; } 
    .ess-profile-name { justify-content: center; text-align: center; }
    .ess-profile-avatar-square, .ess-team-logo-circle { margin-bottom: 15px; margin-right: 0; } 
    .ess-profile-avatar-square { width: 250px; height: 250px; } 
    .ess-col-meta { width: 100%; } 
    .ess-social-row { justify-content: center; }
    .ess-match-opp span { white-space: normal; word-break: break-word; font-size: 12px; }
}

/* Data Tables */
.ess-table-container { font-family: 'Roboto', sans-serif; max-width: 100%; overflow-x: auto; margin: 20px 0; }
.ess-data-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border-radius: 8px; overflow: hidden; }
.ess-data-table thead { background-color: #111 !important; color: #ffffff !important; pointer-events: none; }
.ess-data-table th { padding: 15px; text-align: center !important; vertical-align: middle; color: #ffffff !important; font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; border: none; background-color: #111 !important; }
.ess-data-table td { padding: 15px; text-align: center !important; vertical-align: middle; border-bottom: 1px solid #eee; color: #000 !important; }
.ess-data-table tr:hover { background: #f9f9f9; }
.ess-tb-img-round { width: 50px; height: 50px; border-radius: 50% !important; object-fit: cover; border: 2px solid #eee; display: block; margin: 0 auto 5px auto; }
.ess-tb-logo { width: 40px; height: 40px; object-fit: contain; display: block; margin: 0 auto 5px auto; }
.ess-tb-name { font-weight: 700; font-family: 'Oswald', sans-serif; color: #000; text-decoration: none; font-size: 14px; display: block; transition: 0.2s; }
.ess-tb-name:hover { color: #fca311; }
.ess-tb-sub { font-size: 11px; color: #888; display: block; margin-top: 2px; }

/* Status Badges */
.ess-mini-badge { padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; text-transform: uppercase; display: inline-block; }
.ess-badge-spacer { margin-top: 5px; display: inline-block; }

/* Navigation Buttons */
.ess-nav-container { text-align: center; margin-top: 20px; }
.ess-nav-btn { background: #111; color: #fff; padding: 10px 25px; border-radius: 4px; text-decoration: none; font-family: 'Oswald', sans-serif; font-size: 12px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; transition: background 0.2s; display: inline-block; cursor: pointer; border: none; }
.ess-nav-btn:hover { background: #fca311; color: #000; }
.ess-nav-btn.disabled { opacity: 0.5; pointer-events: none; background: #999; }

/* ========================================= */
/* --- FILTER FORMS (FIX FOR AGGRESSIVE THEMES) --- */
/* ========================================= */

.ess-filter-form {
    margin-bottom: 25px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Wymuszamy Flexbox, żeby elementy były w jednej linii */
.ess-filter-form form {
    display: flex !important;
    flex-wrap: wrap; /* Pozwala na zawijanie na małych ekranach */
    align-items: center !important;
    gap: 10px !important;
    width: 100%;
}

/* Stylizacja Inputów i Selectów - NADPISYWANIE MOTYWU */
.ess-filter-form input[type="text"],
.ess-filter-form select {
    height: 42px !important;
    min-height: 42px !important;
    line-height: normal !important;
    padding: 0 12px !important;
    margin: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 13px !important;
    color: #333 !important;
    background-color: #fff !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    width: auto !important; /* Zapobiega rozciąganiu na 100% */
    flex-grow: 1; /* Pozwala wypełnić wolne miejsce, ale nie na siłę */
    max-width: 300px; /* Ogranicza szerokość, żeby nie były gigantyczne */
}

.ess-filter-form select:focus,
.ess-filter-form input[type="text"]:focus {
    border-color: #fca311 !important;
    outline: none !important;
}

/* Przycisk FILTER */
.ess-filter-btn {
    height: 42px !important;
    min-height: 42px !important;
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    padding: 0 25px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-family: 'Oswald', sans-serif !important;
    text-transform: uppercase !important;
    line-height: 42px !important; /* Centrowanie tekstu w pionie */
    margin: 0 !important;
    display: inline-block !important;
    width: auto !important;
}

.ess-filter-btn:hover {
    background: #fca311 !important;
    color: #000 !important;
}

/* Link Reset */
.ess-filter-form a {
    color: #666;
    text-decoration: underline;
    font-size: 11px;
    margin-left: 5px;
}

/* Checkbox fix */
.ess-checkbox-label { font-family: 'Roboto', sans-serif; font-size: 13px; color: #333; display: flex; align-items: center; gap: 6px; cursor: pointer; margin-left: auto; }
.ess-checkbox-label input { accent-color: #fca311; width: 16px; height: 16px; margin: 0; }

/* Responsywność - na telefonach jedno pod drugim */
@media(max-width: 768px) {
    .ess-filter-form input[type="text"],
    .ess-filter-form select,
    .ess-filter-form button {
        width: 100% !important;
        max-width: none !important;
        flex-grow: 0;
    }
    .ess-checkbox-label { margin-left: 0; margin-top: 10px; width: 100%; }
}

.ess-pagination { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 20px; font-family: 'Oswald', sans-serif; font-weight: bold; font-size: 12px; }
.ess-pagination span { color: #666; }

/* Tooltips */
.ess-tooltip-box { visibility: hidden; width: max-content; background: #000; color: #fff; padding: 6px 10px; position: absolute; bottom: 110%; opacity: 0; transition: 0.2s; font-size: 11px; border-radius: 4px; pointer-events: none; z-index: 10; }
.ess-tooltip-wrap:hover .ess-tooltip-box { visibility: visible; opacity: 1; bottom: 120%; }

/* Achievements Cards */
.ess-achiev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.ess-achiev-card { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 15px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: transform 0.2s; text-decoration: none; color: inherit; }
.ess-achiev-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.ess-achiev-medal { width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 24px; font-weight: bold; color: #fff; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.2); text-shadow: 0 1px 2px rgba(0,0,0,0.3); border: 2px solid rgba(255,255,255,0.5); }
.ess-medal-1 { background: linear-gradient(135deg, #FFD700, #FDB931); border-color: #FFD700; }
.ess-medal-2 { background: linear-gradient(135deg, #E0E0E0, #BDBDBD); border-color: #C0C0C0; }
.ess-medal-3 { background: linear-gradient(135deg, #CD7F32, #A0522D); border-color: #CD7F32; }
.ess-medal-mvp { background: linear-gradient(135deg, #7F00FF, #E100FF); border-color: #7F00FF; box-shadow: 0 0 15px rgba(225, 0, 255, 0.4); }
.ess-achiev-info { flex-grow: 1; overflow: hidden; }
.ess-achiev-title { font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: bold; text-transform: uppercase; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; color: #000; }
.ess-achiev-date { font-size: 11px; color: #999; display: block; margin-bottom: 5px; font-weight: bold; }
.ess-achiev-prize { font-size: 12px; color: #28a745; font-weight: bold; background: #e6f9e6; padding: 2px 6px; border-radius: 4px; display: inline-block; }

/* Match Tables & Stats */
.ess-match-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-family: 'Roboto', sans-serif; border: 1px solid #eee; border-radius: 6px; overflow: hidden; table-layout: fixed; }
.ess-match-table td { padding: 12px; border-bottom: 1px solid #f0f0f0; text-align: center; vertical-align: middle; word-wrap: break-word; }
.ess-match-table tr:hover { background: #f9f9f9; }
.ess-match-opp { display: flex; align-items: center; gap: 10px; justify-content: flex-start; text-decoration: none; color: inherit; transition: color 0.2s; }
.ess-match-opp:hover { color: #fca311; }
.ess-match-opp img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.ess-match-opp span { font-family: 'Oswald', sans-serif; font-weight: bold; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Match Results */
.ess-res-win { color: #28a745; font-weight: 800; font-family: 'Oswald', sans-serif; font-size: 16px; }
.ess-res-loss { color: #dc3545; font-weight: 800; font-family: 'Oswald', sans-serif; font-size: 16px; }
.ess-res-draw { color: #555; font-weight: 800; font-family: 'Oswald', sans-serif; font-size: 16px; }

/* Match Maps */
.ess-match-maps { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.ess-map-item { position: relative; width: 60px; height: 40px; border-radius: 3px; overflow: hidden; border: 1px solid #ddd; display: inline-block; }
.ess-map-thumb { width: 100%; height: 100%; object-fit: cover; display: block; border: none; opacity: 0.8; }
.ess-map-score { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.7); color: #fff; font-size: 10px; font-family: 'Oswald', sans-serif; text-align: center; line-height: 12px; font-weight: bold; z-index: 2; }
.ess-map-name-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-family: 'Oswald', sans-serif; font-size: 9px; font-weight: bold; text-transform: uppercase; text-shadow: 1px 1px 2px #000; z-index: 1; width: 100%; text-align: center; }

/* Delete Button */
.ess-match-delete { color: #ccc; font-weight: bold; font-size: 18px; text-decoration: none; display: block; cursor: pointer; }
.ess-match-delete:hover { color: red; }

/* Stats Summary */
.ess-stats-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; background: #f9f9f9; padding: 15px; border-radius: 6px; border: 1px solid #eee; margin-top: 10px; text-align: center; }
.ess-stat-item { display: flex; flex-direction: column; }
.ess-stat-val { font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 800; color: #333; }
.ess-stat-key { font-size: 10px; text-transform: uppercase; color: #999; font-weight: bold; letter-spacing: 0.5px; }

/* Slim Table Tooltips */
.ess-slim-row { position: relative; cursor: pointer; }
.ess-slim-row:hover { background-color: #f0f0f0; }
.ess-slim-tooltip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #222; border: 1px solid #444; padding: 10px; box-shadow: 0 8px 25px rgba(0,0,0,0.5); z-index: 9999; width: max-content; max-width: 500px; border-radius: 8px; flex-wrap: wrap; gap: 10px; justify-content: center; pointer-events: none; }
.ess-slim-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px; border-width: 6px; border-style: solid; border-color: #222 transparent transparent transparent; }
.ess-slim-row:hover .ess-slim-tooltip { display: flex; }

/* CAPTAIN BADGE */
.ess-captain-badge { display: inline-flex; justify-content: center; align-items: center; width: 18px; height: 18px; background-color: #fca311 !important; color: #000 !important; border: 1px solid #fff; font-size: 10px; font-weight: 800; border-radius: 50%; margin-left: 0; margin-right: 0; vertical-align: middle; font-family: 'Oswald', sans-serif; box-shadow: 0 2px 4px rgba(0,0,0,0.15); line-height: 1; cursor: help; }

/* CFG Download Button */
.ess-cfg-btn { display: block; width: 100%; text-align: center; background: #111; color: #fff; padding: 12px 0; margin-top: 15px; border-radius: 4px; font-family: 'Oswald', sans-serif; font-weight: bold; text-transform: uppercase; text-decoration: none; transition: 0.2s; border: 1px solid #111; letter-spacing: 1px; }
.ess-cfg-btn:hover { background: #fff; color: #111; border-color: #111; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* WP Cleanup */
body.single-esport_player .post-thumbnail, body.single-esport_player .wp-post-image, body.single-esport_player .featured-image, body.single-esport_team .post-thumbnail, body.single-esport_team .wp-post-image, body.single-esport_team .featured-image { display: none !important; }

/* --- MOBILE TEAMS CARD VIEW --- */
@media(max-width: 768px) {
    .ess-teams-table, .ess-teams-table tbody, .ess-teams-table tr, .ess-teams-table td { display: block; width: 100%; box-sizing: border-box; }
    .ess-teams-table thead { display: none; }
    .ess-teams-table tr { margin-bottom: 20px; border: 1px solid #eee; border-radius: 8px; background: #fff; padding: 15px; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
    .ess-teams-table td { padding: 5px 0; border: none !important; text-align: center !important; }
    .ess-col-team { order: 1; margin-bottom: 5px; }
    .ess-col-game { order: 2; margin-bottom: 15px; }
    .ess-col-roster { order: 3; margin-bottom: 10px; }
    .ess-col-region { order: 4; }
    .ess-col-contact { order: 5; display: none; } 
    .ess-col-stats { order: 6; margin-top: 10px; border-top: 1px solid #f5f5f5 !important; padding-top: 10px !important; }
    .ess-col-team .ess-tb-logo { width: 60px; height: 60px; margin-bottom: 10px; }
    .ess-col-team .ess-tb-name { font-size: 18px; }
    .ess-col-roster .ess-roster-center { justify-content: center; gap: 10px; }
    .ess-roster-item { width: 50px; }
    .ess-roster-face { width: 40px !important; height: 40px !important; }
    .ess-roster-nick { font-size: 10px; }
}

/* --- MOBILE TRANSFERS CARD VIEW (CENTERED FIX) --- */
@media(max-width: 768px) {
    .ess-transfers-table, .ess-transfers-table tbody, .ess-transfers-table tr, .ess-transfers-table td { display: block; width: 100%; box-sizing: border-box; }
    .ess-transfers-table thead { display: none; }
    .ess-transfers-table tr { margin-bottom: 20px; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
    .ess-transfers-table td { border: none !important; padding: 5px 0; text-align: center !important; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .ess-col-player { order: 1; margin-bottom: 15px; }
    .ess-col-date { order: 2; font-size: 11px; color: #999; margin-bottom: 15px; border-bottom: 1px solid #f5f5f5 !important; padding-bottom: 10px !important; width: 100%; }
    .ess-col-from { order: 3; }
    .ess-col-to { order: 4; margin-bottom: 15px; }
    .ess-col-game { order: 5; margin-top: 5px; }
    .ess-col-region { order: 6; display: none; }
    .ess-col-player .ess-tb-img-round { width: 70px; height: 70px; margin-bottom: 5px; }
    .ess-col-player .ess-tb-name { font-size: 18px; justify-content: center; }
    .ess-col-from a, .ess-col-to a { display: flex; flex-direction: column; align-items: center; width: 100%; }
    .ess-col-from { background: #fcfcfc; border: 1px solid #eee; border-radius: 6px; padding: 10px !important; margin-bottom: 8px; }
    .ess-col-to { background: #f0fff4; border: 1px solid #d4edda; border-radius: 6px; padding: 10px !important; }
    .ess-col-from::before { content: 'FROM TEAM'; font-size: 9px; color: #999; font-weight: bold; margin-bottom: 5px; letter-spacing: 1px; }
    .ess-col-to::before { content: 'TO TEAM'; font-size: 9px; color: #28a745; font-weight: bold; margin-bottom: 5px; letter-spacing: 1px; }
    .ess-col-from::after { content: '↓'; display: block; font-size: 14px; color: #ccc; margin-top: 5px; margin-bottom: -15px; height: 20px; }
    .ess-tb-logo { margin: 0 auto 5px auto; }
}

/* --- MATCH HISTORY STYLING --- */
.ess-m-opp { width: 30%; text-align: left; }
.ess-m-res { width: 15%; }
.ess-m-maps { width: 50%; }
.ess-m-act { width: 5%; }

@media(max-width: 768px) {
    .ess-match-table, .ess-match-table tbody, .ess-match-table tr, .ess-match-table td { display: block; width: 100%; box-sizing: border-box; }
    .ess-match-table thead { display: none; }
    .ess-match-table tr { margin-bottom: 20px; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); display: flex; flex-direction: column; align-items: center; position: relative; }
    .ess-match-table td { padding: 5px 0; border: none !important; text-align: center !important; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .ess-m-opp { order: 1; margin-bottom: 10px; width: 100%; }
    .ess-m-opp .ess-match-opp { flex-direction: column; gap: 8px; }
    .ess-m-opp img { width: 60px; height: 60px; border-radius: 50%; background: #f9f9f9; border: 1px solid #eee; padding: 2px; }
    .ess-m-opp span { font-size: 16px; color: #333; }
    .ess-m-opp::before { content: 'VS'; font-size: 10px; font-weight: bold; color: #ccc; margin-bottom: 5px; display: block; }
    .ess-m-res { order: 2; margin-bottom: 15px; width: 100%; }
    .ess-m-res span { font-size: 28px; padding: 5px 20px; background: #f5f5f5; border-radius: 8px; display: inline-block; min-width: 100px; }
    .ess-m-maps { order: 3; width: 100%; margin-bottom: 5px; }
    .ess-match-maps { justify-content: center; }
    .ess-m-act { position: absolute; top: 5px; right: 10px; width: auto !important; }
    .ess-match-delete { font-size: 24px; padding: 10px; color: #ddd; }
}

/* --- TOTAL EARNINGS PANEL --- */
.ess-earnings-box { background: #111; color: #fff; padding: 15px; border-radius: 6px; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; border-left: 5px solid #28a745; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.ess-earn-label { font-family: 'Oswald', sans-serif; font-size: 14px; letter-spacing: 1px; color: #999; font-weight: bold; }
.ess-earn-value { font-family: 'Oswald', sans-serif; font-size: 20px; color: #28a745; font-weight: bold; text-shadow: 0 0 10px rgba(40, 167, 69, 0.3); }

/* --- THEME CLEANUP --- */
body.single-esport_team .page-title-section, body.single-esport_player .page-title-section, body.single-esport_team .breadcrumb-2, body.single-esport_player .breadcrumb-2, body.single-esport_team .spnc-entry-meta, body.single-esport_player .spnc-entry-meta, body.single-esport_team .spnc-author, body.single-esport_player .spnc-author, body.single-esport_team .spnc-date, body.single-esport_player .spnc-date, body.single-esport_team .spnc-comment-links, body.single-esport_player .spnc-comment-links, body.single-esport_team .entry-header, body.single-esport_player .entry-header, body.single-esport_team .spnc-entry-title, body.single-esport_player .spnc-entry-title, body.single-esport_team .spnc-post-overlay, body.single-esport_player .spnc-post-overlay, body.single-esport_team .spnc-post-thumbnail, body.single-esport_player .spnc-post-thumbnail, body.single-esport_team .spnc-pagination-single, body.single-esport_player .spnc-pagination-single, body.single-esport_team .paginatn_desgn-1, body.single-esport_player .paginatn_desgn-1, body.single-esport_team .spnc-edit-link, body.single-esport_player .spnc-edit-link, body.single-esport_team .spnc-missed-section, body.single-esport_player .spnc-missed-section, body.single-esport_team .spnc-tag-links, body.single-esport_player .spnc-tag-links, body.single-esport_player #comments, body.single-esport_player .comments-area, body.single-esport_team #comments, body.single-esport_team .comments-area, body.single-esport_player .comment-section, body.single-esport_team .comment-section, body.single-esport_player .comment-form, body.single-esport_team .comment-form { display: none !important; }
body.single-esport_team .spnc-post-content, body.single-esport_player .spnc-post-content, body.single-esport_team .spnc-entry-content, body.single-esport_player .spnc-entry-content { margin-top: 0 !important; padding-top: 0 !important; }
body.single-esport_team #content, body.single-esport_player #content { padding-top: 10px !important; }

/* --- EDIT MODAL STYLES --- */
.ess-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 99999; display: flex; justify-content: center; align-items: center; padding: 20px; backdrop-filter: blur(5px); }
.ess-modal-box { background: #fff; width: 100%; max-width: 600px; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); overflow: hidden; max-height: 90vh; display: flex; flex-direction: column; animation: essFadeIn 0.3s ease; }
@keyframes essFadeIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.ess-modal-header { background: #111; color: #fff; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: bold; letter-spacing: 1px; }
.ess-modal-close { background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; }
.ess-modal-close:hover { color: #fca311; }
.ess-modal-body { padding: 20px; overflow-y: auto; font-family: 'Roboto', sans-serif; }
.ess-form-section { margin-bottom: 25px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.ess-form-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ess-fs-title { font-family: 'Oswald', sans-serif; color: #fca311; font-size: 14px; text-transform: uppercase; margin: 0 0 15px 0; border-left: 3px solid #fca311; padding-left: 10px; }
.ess-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ess-form-row label, .ess-form-grid label { display: block; font-size: 11px; color: #666; font-weight: bold; text-transform: uppercase; margin-bottom: 4px; }
.ess-form-row input, .ess-form-grid input { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-family: 'Roboto', sans-serif; font-size: 13px; background: #f9f9f9; box-sizing: border-box; }
.ess-form-row input:focus, .ess-form-grid input:focus { border-color: #fca311; background: #fff; outline: none; }
.ess-modal-footer { padding-top: 20px; text-align: center; }
.ess-save-btn { background: #28a745; color: #fff; border: none; padding: 12px 40px; border-radius: 4px; font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.2s; text-transform: uppercase; }
.ess-save-btn:hover { background: #218838; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3); }
@media(max-width: 600px) { .ess-form-grid { grid-template-columns: 1fr; } }

/* ========================================= */
/* --- DASHBOARD / WIZYTÓWKI (FINAL) --- */
/* ========================================= */

.ess-dashboard-wrapper { display: flex; flex-wrap: wrap; gap: 25px; justify-content: center; align-items: flex-start; margin: 30px 0; width: 100%; }

/* --- BAZA KARTY --- */
.ess-dash-col { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 25px 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); flex: 1; min-width: 240px; max-width: 300px; display: flex; flex-direction: column; position: relative; transition: transform 0.2s; box-sizing: border-box; }

/* --- WARIANTY KART --- */
.ess-player-biz-card { border-top: 4px solid #fca311; align-items: center; text-align: center; }
.ess-player-biz-card:hover { transform: translateY(-3px); }
.ess-info-biz-card { border-top: 4px solid #333; justify-content: flex-start; }
.ess-info-biz-card:hover { transform: translateY(-3px); }
.ess-team-biz-card { border-top: 4px solid #28a745; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.ess-team-biz-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }

/* --- ELEMENTY WEWNĘTRZNE --- */
.ess-biz-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); margin-bottom: 15px; }
.ess-team-biz-logo { width: 90px; height: 90px; object-fit: contain; margin-bottom: 15px; }
.ess-biz-nick, .ess-team-biz-name { font-family: 'Oswald', sans-serif; font-size: 22px; font-weight: 800; text-transform: uppercase; color: #000; margin-bottom: 5px; line-height: 1.2; }
.ess-team-biz-name { text-align: center; }
.ess-biz-realname { color: #888; font-size: 13px; font-weight: 500; margin-bottom: 10px; display: block; }
.ess-biz-role-badge { background: #111; color: #fff; padding: 4px 12px; border-radius: 4px; font-family: 'Oswald', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; display: inline-block; }
.ess-team-biz-role { font-size: 11px; text-transform: uppercase; color: #999; font-weight: bold; letter-spacing: 1px; }
.ess-biz-meta-row { width: 100%; display: flex; justify-content: space-between; border-bottom: 1px solid #f5f5f5; padding: 8px 0; font-size: 13px; }
.ess-biz-label { color: #999; font-weight: bold; font-size: 10px; text-transform: uppercase; }
.ess-biz-val { font-weight: bold; color: #333; }

/* --- SEKCJE ŚRODKOWE --- */
.ess-dash-header { font-family: 'Oswald', sans-serif; font-size: 12px; color: #fca311; border-bottom: 2px solid #fca311; padding-bottom: 5px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; width: 100%; }
.ess-dash-list { margin-bottom: 15px; width: 100%; }
.ess-dash-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; border-bottom: 1px solid #fafafa; padding-bottom: 2px; }
.ess-dash-row .lbl { color: #666; font-weight: bold; }
.ess-dash-row .val { color: #000; font-weight: 500; }
.ess-dash-divider { height: 1px; background: #eee; margin: 15px 0; width: 100%; }
.ess-dash-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ess-dash-tag { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 4px; padding: 4px 8px; font-size: 11px; color: #333; font-weight: bold; }
.ess-dash-link { display: block; text-align: center; font-size: 11px; color: #0073aa; font-weight: bold; text-decoration: none; margin-top: auto; }

/* --- PUCHARY --- */
.ess-dash-trophies { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.ess-dash-trophy-item { display: flex; align-items: flex-start; gap: 10px; }
.trophy-icon { font-size: 18px; line-height: 1; margin-top: 2px; }
.trophy-data { display: flex; flex-direction: column; line-height: 1.3; }
.t-name { font-weight: bold; font-size: 12px; color: #333; }
.t-place { font-size: 10px; color: #999; }

/* --- PRZYCISKI (CZARNY PROFILE, BIAŁY TEKST, PEŁNA RAMKA) --- */
.ess-dash-btn-outline {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: bold;
    text-decoration: none !important;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    transition: 0.2s;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-height: 32px;
    box-sizing: border-box;
    cursor: pointer;
}
.ess-dash-btn-outline:hover { background: #333 !important; border-color: #333 !important; color: #fff !important; }

.ess-dash-btn-edit {
    border: 1px solid #fca311 !important;
    background: #fca311 !important;
    color: #000 !important;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-height: 32px;
    box-sizing: border-box;
}
.ess-dash-btn-edit:hover { background: #e09210 !important; border-color: #e09210 !important; }

/* --- RESPONSYWNOŚĆ --- */
@media(max-width: 1100px) {
    .ess-dashboard-wrapper { gap: 20px; }
    .ess-dash-col { width: 45%; max-width: none; }
}
@media(max-width: 600px) {
    .ess-dash-col { width: 100%; margin-bottom: 20px; }
}