:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-gold: #eab308;
    --ai-purple: #8b5cf6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* MODAL DE VOTAÇÃO DE REINÍCIO */
#vote-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.modal-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--accent-gold);
    text-align: center;
    max-width: 480px;
    width: 90%;
}

/* ==========================================================
   LOBBY DO MAPA MUNDI VETORIAL INTERATIVO & SELEÇÃO DE CLUBES
   ========================================================== */
#lobby-screen {
    position: fixed;
    top: 36px;
    left: 0;
    width: 100%;
    height: calc(100vh - 36px);
    background: radial-gradient(circle at 50% 30%, #0d1527 0%, #060911 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-header-bar {
    padding: 16px 28px 12px;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.map-title-group h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-title-group p {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 3px;
}

.map-controls-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-search-input {
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 220px;
    outline: none;
    transition: all 0.2s;
}

.map-search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.map-zoom-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.map-zoom-btn:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

/* ÁREA DE EXIBIÇÃO DO MAPA */
.map-canvas-area {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    background-image: 
        radial-gradient(rgba(56, 189, 248, 0.08) 1px, transparent 1px),
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px, 80px 80px, 80px 80px;
}

.map-canvas-area.is-dragging {
    cursor: grabbing;
}

#world-map-svg-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transition: transform 0.08s ease-out;
}

#world-map-svg-container svg {
    width: 92%;
    height: 86%;
    max-height: 800px;
    filter: drop-shadow(0 15px 35px rgba(0,0,0,0.6));
}

/* ESTILOS DOS PAÍSES NO SVG */
.country, 
#world-map-svg-container svg path,
#world-map-svg-container svg g {
    fill: #1e293b;
    stroke: #090e1a;
    stroke-width: 0.5px;
    vector-effect: non-scaling-stroke;
    transition: fill 0.25s ease, filter 0.25s ease, stroke 0.2s ease;
}

/* Países com Clubes Cadastrados (Ativos) */
.country-active {
    fill: #334155 !important;
    cursor: pointer !important;
}

.country-active:hover {
    fill: #38bdf8 !important;
    stroke: #bae6fd !important;
    stroke-width: 1.2px !important;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9)) drop-shadow(0 0 20px rgba(14, 165, 233, 0.6)) !important;
}

.country-selected {
    fill: #10b981 !important;
    stroke: #a7f3d0 !important;
    stroke-width: 1.5px !important;
    filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.9)) !important;
}

/* Países Sem Clubes (Bloqueados) */
.country-locked {
    fill: #0c1220 !important;
    opacity: 0.55;
    cursor: not-allowed !important;
}

.country-locked:hover {
    fill: #131c31 !important;
    stroke: #ef4444 !important;
    stroke-width: 0.8px !important;
}

/* TOOLTIP HUD FLUTUANTE */
#map-country-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 1050;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(56, 189, 248, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 16px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
    transform: translate(15px, 15px);
    transition: opacity 0.15s ease;
}

.tooltip-flag-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
}

.tooltip-status {
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tooltip-status.active {
    color: #38bdf8;
}

.tooltip-status.locked {
    color: #ef4444;
}

.tooltip-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 4px;
}

/* MODAL DE SELEÇÃO & FUNDAÇÃO DE CLUBE */
#modal-country-selection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    box-sizing: border-box;
}

.modal-selection-card {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(56, 189, 248, 0.2);
    border-radius: 14px;
    width: 100%;
    max-width: 860px;
    height: 78vh;
    min-height: 440px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto;
    animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-selection-header {
    padding: 14px 22px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-country-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-country-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 30px;
}

.modal-country-flag-img {
    width: 42px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.modal-country-title h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.modal-country-title p {
    font-size: 0.82rem;
    color: var(--accent-blue);
    margin: 2px 0 0 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px;
}

.modal-close-btn:hover {
    color: #ef4444;
}

#form-select-manager {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-selection-body {
    padding: 16px 22px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.manager-name-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.manager-name-field label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.manager-name-field input {
    background: #090e1a;
    border: 1px solid #334155;
    color: white;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.manager-name-field input:focus {
    border-color: var(--accent-blue);
}

/* Tabs de Escolha: Times Reais / Customizado */
.club-mode-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #334155;
    padding-bottom: 10px;
    flex-shrink: 0;
}

.club-mode-tab {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.club-mode-tab.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Grade de Clubes Reais (TheSportsDB) */
.real-clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
    flex: 1;
    min-height: 180px;
    overflow-y: auto;
    padding: 4px;
}

.real-club-card {
    background: #090e1a;
    border: 2px solid #1e293b;
    border-radius: 10px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.real-club-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    background: #131c31;
    box-shadow: 0 6px 14px rgba(56, 189, 248, 0.2);
}

.real-club-card.selected {
    border-color: var(--accent-green);
    background: #06281e;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.real-club-badge {
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.real-club-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.real-club-league {
    font-size: 0.7rem;
    color: #94a3b8;
}

.custom-club-container {
    display: none;
    flex-direction: column;
    gap: 10px;
    background: #090e1a;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #334155;
    flex-shrink: 0;
}

.modal-selection-footer {
    padding: 14px 22px;
    background: #1e293b;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Responsividade específica para telas com altura compacta (ex: 1366x768) */
@media (max-height: 800px) {
    #modal-country-selection {
        top: 36px;
        height: calc(100vh - 36px);
        padding: 10px 16px;
    }
    .modal-selection-card {
        height: 78vh;
        min-height: 440px;
        max-height: calc(100vh - 46px);
    }
    .modal-selection-header {
        padding: 10px 18px;
    }
    .modal-selection-body {
        padding: 12px 18px;
        gap: 10px;
    }
    .modal-selection-footer {
        padding: 10px 18px;
    }
    .real-clubs-grid {
        flex: 1;
        min-height: 160px;
        gap: 10px;
    }
    .real-club-card {
        padding: 10px 6px;
    }
    .real-club-badge {
        width: 42px;
        height: 42px;
    }
}


/* PAINEL PRINCIPAL */
#app {
    display: flex;
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

/* CHAT EXCLUSIVO DE RECADOS */
#chat-sidebar {
    width: 320px;
    background: #111827;
    border-right: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-header {
    padding: 10px 14px;
    background: #1f2937;
    font-weight: bold;
    border-bottom: 1px solid #374151;
    font-size: 0.9rem;
    flex-shrink: 0;
}

#chat-messages {
    flex: 1;
    min-height: 0;
    padding: 12px 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-msg {
    background: #1f2937;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.84rem;
    line-height: 1.35;
}

.chat-msg .author {
    font-weight: bold;
    color: var(--accent-blue);
    font-size: 0.78rem;
    display: block;
    margin-bottom: 2px;
}

.chat-msg.system {
    border-left: 3px solid var(--accent-gold);
    background: #1e2030;
}

.chat-controls {
    padding: 8px 12px;
    background: #161f30;
    border-top: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.recipient-select {
    width: 100%;
    padding: 5px 8px;
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 0.78rem;
}

.emote-toolbar {
    display: flex;
    gap: 6px;
}

.btn-emote {
    flex: 1;
    padding: 5px 4px;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-emote:hover, .btn-emote.active {
    border-color: var(--accent-blue);
    background: #1e293b;
    transform: translateY(-1px);
}

.btn-emote.active[data-emote="🛡️"] {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.btn-emote.active[data-emote="🔥"] {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.btn-emote.active[data-emote="🧊"] {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    color: #bae6fd;
}

.chat-input-area {
    padding: 8px 12px 10px;
    display: flex;
    gap: 8px;
    background: #111827;
    border-top: 1px solid #1f2937;
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #374151;
    background: #1f2937;
    color: white;
    font-size: 0.85rem;
}

.chat-input-area button {
    padding: 8px 14px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* READY CHECK MULTIPLAYER */
.ready-check-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.manager-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #334155;
    background: #0f172a;
}

.manager-badge.ready {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.manager-badge.waiting {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.15);
    color: #fde047;
}

.btn-ready {
    background: #065f46;
    color: #6ee7b7;
    border: 1px solid #10b981;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ready:hover {
    background: #047857;
    transform: scale(1.02);
}

.btn-ready.is-ready {
    background: #10b981;
    color: white;
}

/* MODAL DE DETALHES DO ELENCO / JOGADOR */
.details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.82);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
    padding: 15px;
    box-sizing: border-box;
}

.details-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 16px;
    width: 100%;
    max-width: 860px;
    height: 78vh;
    min-height: 480px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    padding: 22px 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
    color: #e2e8f0;
    box-sizing: border-box;
    overflow: hidden;
}

#modal-player-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.modal-player-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 14px;
    margin-bottom: 16px;
    gap: 12px;
    flex-shrink: 0;
}

.modal-player-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.player-avatar-circle {
    width: 48px;
    height: 48px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.player-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.player-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.player-name-main {
    font-size: 1.18rem;
    font-weight: 800;
    color: #f8fafc;
    white-space: nowrap;
}

.player-nickname-main {
    color: var(--accent-gold);
    font-style: italic;
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
}

.player-name-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.player-status-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border: 1px solid transparent;
    user-select: none;
    line-height: 1;
}

.player-status-pill.status-titular {
    background: rgba(34, 197, 94, 0.18);
    border-color: #22c55e;
    color: #86efac;
}

.player-status-pill.status-reserva {
    background: rgba(234, 179, 8, 0.18);
    border-color: #eab308;
    color: #fde047;
}

.modal-close-btn {
    width: 34px;
    height: 34px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: scale(1.05);
}

.attr-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.88rem;
}

.attr-table th, .attr-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #1f2937;
    text-align: left;
}

.attr-table th {
    background: #1f2937;
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
}

/* ÁREA DE JOGO */
#main-content {
    flex: 1;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
    gap: 20px;
    min-width: 0;
}

/* TOP BAR MULTIPLAYER */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 8px;
}

/* DASHBOARD */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-blue);
}

/* BOTÕES GERAIS */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.btn-red {
    background: var(--accent-red);
    color: white;
}

.btn-red:hover {
    background: #dc2626;
    transform: scale(1.02);
}

.btn-green {
    background: var(--accent-green);
    color: white;
}

.btn-green:hover {
    background: #16a34a;
    transform: scale(1.02);
}

.btn-purple {
    background: var(--ai-purple);
    color: white;
}

.btn-purple:hover {
    background: #7c3aed;
}

.btn-train {
    background: var(--accent-blue);
    color: white;
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* SIMULADOR DE PARTIDA */
.match-container {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scoreboard {
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
}

.match-log {
    background: #000;
    height: 220px;
    overflow-y: auto;
    padding: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    color: #4ade80;
    border-radius: 6px;
    line-height: 1.6;
}

/* PAINEL DE MÉTRICA DA IA DE PARTIDA */
.ai-match-metrics {
    display: flex;
    justify-content: space-between;
    background: #111827;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid #374151;
    color: #cbd5e1;
}

/* JORNAL ESPORTIVO CONECTADO À PARTIDA */
.newspaper {
    background: #fef3c7;
    color: #1e293b;
    padding: 25px;
    border-radius: 10px;
    border: 3px solid #d97706;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.newspaper h2 {
    font-family: 'Times New Roman', serif;
    border-bottom: 3px double #1e293b;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 1.8rem;
}

.ai-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--ai-purple);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.newspaper-scroll-container {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 12px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.4);
    padding: 15px;
}

.newspaper-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.newspaper-scroll-container::-webkit-scrollbar-track {
    background: #fef3c7;
}

.newspaper-scroll-container::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 4px;
}

.newspaper-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    font-size: 0.95rem;
}

/* ELENCO */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.player-card {
    background: #0f172a;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    transition: transform 0.2s, border-color 0.2s;
}

.player-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.badge-pos {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.pos-GOL { background: #854d0e; color: #fef08a; }
.pos-ZAG { background: #1e3a8a; color: #93c5fd; }
.pos-ADD, .pos-ADE, .pos-LAT { background: #065f46; color: #6ee7b7; }
.pos-VOL { background: #4338ca; color: #c7d2fe; }
.pos-MC, .pos-MEI { background: #6b21a8; color: #e9d5ff; }
.pos-ATA, .pos-CA { background: #991b1b; color: #fca5a5; }

.nickname {
    color: var(--accent-gold);
    font-weight: bold;
}

.player-meters {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 6px 0;
}

.meter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: #94a3b8;
}

.meter-track {
    width: 90px;
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.fill-psico { background: linear-gradient(90deg, #ef4444, #eab308, #22c55e); }
.fill-disc { background: #3b82f6; }

.player-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    border-top: 1px solid #1e293b;
    padding-top: 6px;
}

/* ========================================================== */
/* LEILÃO AO VIVO DA SALA (MERCADO MULTIPLAYER EM TEMPO REAL) */
/* ========================================================== */

.auction-banner {
    background: linear-gradient(90deg, #991b1b, #b45309, #d97706);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(180, 83, 9, 0.4);
    animation: bannerGlow 2s infinite alternate;
}

@keyframes bannerGlow {
    0% { box-shadow: 0 0 10px rgba(217, 119, 6, 0.5); }
    100% { box-shadow: 0 0 22px rgba(239, 68, 68, 0.8); }
}

.auction-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.auction-box {
    background: #0f172a;
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    width: 92%;
    max-width: 650px;
    padding: 22px;
    color: var(--text-light);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    position: relative;
}

.auction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.auction-timer {
    font-size: 1.5rem;
    font-weight: 900;
    color: #22c55e;
    background: #020617;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auction-timer.urgent {
    color: #ef4444;
    border-color: #ef4444;
    animation: timerPulse 0.5s infinite alternate;
}

@keyframes timerPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); background: #450a0a; }
}

.auction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.auction-player-card {
    background: #1e293b;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.auction-bid-panel {
    background: #020617;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.current-bid-display {
    text-align: center;
    background: #0f172a;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--accent-gold);
}

.current-bid-val {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-gold);
}

.current-leader {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 4px;
}

.bid-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-bid {
    flex: 1;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    font-weight: bold;
    padding: 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    font-size: 0.95rem;
}

.btn-bid:hover {
    background: #22c55e;
    transform: translateY(-2px);
}

.auction-feed {
    max-height: 110px;
    overflow-y: auto;
    background: #0a0f1d;
    padding: 8px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.78rem;
    font-family: monospace;
    color: #cbd5e1;
    border: 1px solid #1e293b;
}

.auction-feed-item {
    padding: 3px 0;
    border-bottom: 1px dashed #1e293b;
}

/* ========================================================== */
/* BOTÕES DE SIMULAÇÃO DINÂMICOS MULTIPLAYER (HOST VS JOGADORES) */
/* ========================================================== */

#btn-simular-partida {
    font-weight: bold;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

#btn-simular-partida.btn-host-ready {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
    border: 1px solid #4ade80;
    animation: hostPulse 2s infinite;
}

#btn-simular-partida.btn-host-ready:hover {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

#btn-simular-partida.btn-host-waiting {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fef3c7;
    border: 1px solid #f59e0b;
    cursor: not-allowed;
    opacity: 0.85;
}

#btn-simular-partida.btn-locked-guest {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    cursor: not-allowed;
    opacity: 0.75;
}

@keyframes hostPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 22px rgba(34, 197, 94, 0.7); }
}

/* ========================================================== */
/* OVERLAY & BARRA DE CARREGAMENTO INTERATIVA DA IA */
/* ========================================================== */

.sim-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 15, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeInOverlay 0.3s ease-out;
}

.sim-loading-card {
    background: linear-gradient(145deg, #0d1527, #080d1a);
    border: 1px solid #2563eb;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(37, 99, 235, 0.25);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 520px;
    text-align: center;
    color: #f8fafc;
}

.sim-loading-header .sim-loading-spinner {
    font-size: 2.8rem;
    display: inline-block;
    animation: spinBall 1.5s linear infinite;
    margin-bottom: 10px;
}

.sim-loading-header h3 {
    font-size: 1.35rem;
    margin-bottom: 6px;
    color: #60a5fa;
    letter-spacing: 0.5px;
}

.sim-loading-header p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 22px;
}

.sim-progress-container {
    width: 100%;
    height: 14px;
    background: #0f172a;
    border-radius: 7px;
    border: 1px solid #1e293b;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.sim-progress-bar {
    height: 100%;
    width: 10%;
    background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
    background-size: 200% 100%;
    border-radius: 7px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressShine 2s linear infinite;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.sim-progress-percent {
    font-size: 0.85rem;
    font-weight: bold;
    color: #38bdf8;
    margin-bottom: 20px;
    font-family: monospace;
}

.sim-steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    background: rgba(15, 23, 42, 0.6);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #1e293b;
}

.sim-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #64748b;
    transition: color 0.3s ease;
}

.sim-step.active {
    color: #f1f5f9;
    font-weight: bold;
}

.sim-step.completed {
    color: #4ade80;
}

.sim-step-icon {
    font-size: 1rem;
}

@keyframes spinBall {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes progressShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================================== */
/* SKELETON SHIMMER DO JORNAL (GAZETA ESPORTIVA) */
/* ========================================================== */

.newspaper-skeleton {
    background: #fdfbf7;
    border: 2px solid #ca8a04;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.skeleton-shimmer-badge {
    width: 140px;
    height: 20px;
    background: #e2d9cc;
    border-radius: 10px;
    margin: 0 auto 12px;
    animation: shimmerSkeleton 1.5s infinite linear;
}

.skeleton-shimmer-title {
    width: 320px;
    height: 32px;
    background: #d4c5b3;
    border-radius: 6px;
    margin: 0 auto 12px;
    animation: shimmerSkeleton 1.5s infinite linear;
}

.skeleton-shimmer-headline {
    width: 60%;
    height: 24px;
    background: #e7ded2;
    border-radius: 4px;
    margin: 0 auto 20px;
    animation: shimmerSkeleton 1.5s infinite linear;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.skeleton-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 14px;
    background: #e2d9cc;
    border-radius: 4px;
    animation: shimmerSkeleton 1.5s infinite linear;
}

.skeleton-box {
    width: 100%;
    height: 100px;
    background: #e9e1d5;
    border-radius: 6px;
    animation: shimmerSkeleton 1.5s infinite linear;
}

.skeleton-status-msg {
    text-align: center;
    background: #fef08a;
    border: 1px solid #eab308;
    color: #854d0e;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.skeleton-spin {
    display: inline-block;
    animation: pulseIcon 1.2s infinite ease-in-out;
}

@keyframes shimmerSkeleton {
    0% { opacity: 0.5; }
    50% { opacity: 0.9; }
    100% { opacity: 0.5; }
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

/* ========================================================== */
/* READY CHECK MULTIPLAYER (SINCRONIZAÇÃO DE SALA) */
/* ========================================================== */

.ready-check-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.ready-check-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.ready-check-title {
    font-size: 1.05rem;
    font-weight: bold;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ready-tecnicos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.ready-tecnico-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s, background 0.2s;
}

.ready-tecnico-item.is-me {
    border-color: var(--accent-blue);
    background: #172554;
}

.ready-tecnico-item.is-ready {
    border-color: var(--accent-green);
}

.badge-pronto {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #86efac;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-aguardando {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid #eab308;
    color: #fde047;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-host-crown {
    color: var(--accent-gold);
    font-size: 0.85rem;
    margin-right: 4px;
}

/* BOTÕES DE ESTADO BLOQUEADO E PRONTO */
.btn-locked-guest {
    background: #1e293b !important;
    border: 1px dashed #475569 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.75;
    box-shadow: none !important;
    transform: none !important;
}

.btn-locked-host {
    background: #362808 !important;
    border: 1px dashed #ca8a04 !important;
    color: #fef08a !important;
    cursor: not-allowed !important;
    opacity: 0.85;
    box-shadow: none !important;
    transform: none !important;
}

.pulse-ready-glow {
    animation: readyPulse 1.8s infinite ease-in-out;
}

@keyframes readyPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 24px rgba(239, 68, 68, 0.95);
        transform: scale(1.03);
    }
}

/* ==========================================================
   BARRA DE ABAS DE NAVEGAÇÃO (RODADA & PARTIDA / TIME & ESCALAÇÃO)
   ========================================================== */
.tabs-nav-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: rgba(15, 23, 42, 0.75);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #334155;
    backdrop-filter: blur(8px);
}

.tab-nav-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 12px 18px;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-nav-btn:hover {
    color: #f8fafc;
    background: rgba(51, 65, 85, 0.5);
}

.tab-nav-btn.active {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #f8fafc;
    border-color: var(--accent-green);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.tab-nav-btn#tab-btn-time.active {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.tab-view-content {
    animation: fadeInTab 0.3s ease;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   LAYOUT DE GERENCIAMENTO DE TIME (BANCO DE RESERVAS + CAMPO)
   ========================================================== */
.team-management-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 950px) {
    .team-management-layout {
        grid-template-columns: 1fr;
    }
}

/* COLUNA DO BANCO DE RESERVAS */
.bench-sidebar {
    background: var(--card-bg);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    max-height: 700px;
}

.bench-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.bench-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent-gold);
}

.badge-reservas {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.bench-scroll-container {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 6px;
    max-height: 600px;
}

.bench-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.bench-scroll-container::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.bench-scroll-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

/* CARD DE JOGADOR NO BANCO DE RESERVAS */
.bench-player-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bench-player-card:hover {
    border-color: var(--accent-gold);
    transform: translateX(4px);
    background: #172033;
}

.bench-player-emoji {
    font-size: 1.8rem;
    background: #1e293b;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #334155;
    flex-shrink: 0;
}

.bench-player-info {
    flex: 1;
    min-width: 0;
}

.bench-player-info strong {
    font-size: 0.92rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bench-player-info small {
    color: #94a3b8;
    font-size: 0.78rem;
}

.bench-player-ovr {
    text-align: right;
    flex-shrink: 0;
}

.bench-player-ovr b {
    color: var(--accent-gold);
    font-size: 1.1rem;
    display: block;
}

/* ==========================================================
   CAMPO DE FUTEBOL TÁTICO (SOCCER PITCH)
   ========================================================== */
.tactical-field-wrapper {
    background: var(--card-bg);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.field-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.soccer-pitch {
    background: linear-gradient(180deg, #15803d 0%, #166534 50%, #14532d 100%);
    background-image: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.03) 0px,
        rgba(255, 255, 255, 0.03) 40px,
        rgba(0, 0, 0, 0.04) 40px,
        rgba(0, 0, 0, 0.04) 80px
    ), linear-gradient(180deg, #15803d 0%, #166534 50%, #14532d 100%);
    border: 3px solid rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    min-height: 620px;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 15px;
    overflow: hidden;
}

/* LINHAS DO GRAMADO */
.pitch-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pitch-half-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%);
}

.pitch-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pitch-center-spot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}

.pitch-penalty-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top: none;
}

.pitch-penalty-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-bottom: none;
}

.pitch-goal-box {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 35px;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.pitch-penalty-top .pitch-goal-box { top: 0; border-top: none; }
.pitch-penalty-bottom .pitch-goal-box { bottom: 0; border-bottom: none; }

/* FORMAÇÃO TÁTICA NO CAMPO (LINHAS DE JOGADORES) */
.pitch-formation-grid {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 580px;
    gap: 12px;
}

.pitch-line-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    gap: 10px;
}

/* SLOT TÁTICO NO GRAMADO (CONTAINER FIXO DE CADA POSIÇÃO) */
.pitch-tactical-slot {
    flex: 1;
    max-width: 135px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pitch-slot-empty {
    border: 2px dashed rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.45);
    padding: 12px 8px;
    cursor: pointer;
    text-align: center;
    backdrop-filter: blur(2px);
}

.pitch-slot-empty:hover {
    border-color: var(--accent-gold);
    background: rgba(15, 23, 42, 0.75);
    transform: scale(1.03);
}

.pitch-slot-empty .slot-placeholder-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

.pitch-slot-empty .slot-placeholder-sub {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* ESTADOS DE DRAG & DROP E QUICK SWAP */
.pitch-tactical-slot.drag-over {
    border: 2px solid var(--accent-gold) !important;
    background: rgba(234, 179, 8, 0.25) !important;
    transform: scale(1.06);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.6);
}

.pitch-tactical-slot.swap-target-active {
    border: 2px dashed #38bdf8 !important;
    animation: pulseSwapBorder 1.5s infinite alternate ease-in-out;
}

@keyframes pulseSwapBorder {
    0% { box-shadow: 0 0 6px rgba(56, 189, 248, 0.4); transform: scale(1); }
    100% { box-shadow: 0 0 16px rgba(56, 189, 248, 0.8); transform: scale(1.04); }
}

.is-swap-source {
    border: 2px solid var(--accent-gold) !important;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.8) !important;
    animation: pulseSourceGold 1.2s infinite alternate ease-in-out;
}

@keyframes pulseSourceGold {
    0% { transform: scale(1.02); }
    100% { transform: scale(1.08); }
}

/* CARD DO JOGADOR DENTRO DO SLOT TÁTICO */
.pitch-player-node {
    background: rgba(15, 23, 42, 0.88);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    user-select: none;
    position: relative;
}

.pitch-player-node:active {
    cursor: grabbing;
}

.pitch-player-node:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: var(--accent-gold);
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.45);
    background: rgba(15, 23, 42, 0.98);
}

.pitch-slot-role-tag {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #020617;
    border: 1px solid #475569;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pitch-player-emoji {
    font-size: 1.5rem;
    margin-top: 4px;
    margin-bottom: 2px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.pitch-player-name {
    font-size: 0.75rem;
    font-weight: bold;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.pitch-player-nickname {
    font-size: 0.68rem;
    color: var(--accent-gold);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.pitch-player-badges {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 3px;
    flex-wrap: wrap;
    justify-content: center;
}

.pitch-player-ovr {
    background: #0f172a;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.72rem;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 4px;
}

/* BADGES DE PENALIDADE DE OVR POR SETOR INAPROPRIADO */
.badge-penalty-none {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #86efac;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
}

.badge-penalty-warn {
    background: rgba(245, 158, 11, 0.25);
    border: 1px solid #f59e0b;
    color: #fde047;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
}

.badge-penalty-danger {
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid #ef4444;
    color: #fca5a5;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
}

/* ESTILO DO BANCO DE RESERVAS INTERATIVO */
.bench-player-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.bench-player-card:active {
    cursor: grabbing;
}

.bench-player-card:hover {
    border-color: #38bdf8;
    background: #1e293b;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bench-scroll-container.drag-over {
    border: 2px dashed #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

/* SEÇÃO DE ADAPTAÇÃO TÁTICA / MUDANÇA DE FUNÇÃO NO MODAL */
.tactical-adaptation-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-left: 4px solid #38bdf8;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.tactical-adaptation-select {
    width: 100%;
    background: #020617;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 6px;
    margin-bottom: 8px;
    outline: none;
}

.tactical-adaptation-select:focus {
    border-color: #38bdf8;
}

.btn-adaptation-train {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid #38bdf8;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.btn-adaptation-train:hover {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: #0f172a;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

/* ==========================================================
   MODAL DE DETALHES & TREINO INDIVIDUAL DE ATRIBUTOS
   ========================================================== */
.attr-train-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.attr-train-row {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.attr-train-info {
    flex: 1;
}

.attr-train-name-wrap {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.attr-train-bar-track {
    background: #1e293b;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.attr-train-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.btn-train-single {
    background: linear-gradient(135deg, #15803d, #166534);
    border: 1px solid #22c55e;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-train-single:hover {
    background: linear-gradient(135deg, #22c55e, #15803d);
    transform: scale(1.04);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.btn-psychology {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: 1px solid #a855f7;
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-psychology:hover {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.player-modal-grid {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .player-modal-grid {
        grid-template-columns: 1fr;
    }
}

.modal-col-attributes {
    display: flex;
    flex-direction: column;
}

.modal-col-behavior {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #020617;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #1e293b;
}

.attr-mental-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.attr-mental-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.meter-track-wide {
    background: #1e293b;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.trait-card-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-left: 4px solid var(--accent-gold);
    border-radius: 8px;
    padding: 10px 12px;
}

.modal-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.btn-titular-toggle {
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-titular-toggle.is-titular {
    background: linear-gradient(135deg, #b45309, #92400e);
    border-color: #f59e0b;
    color: #fff;
}

.btn-titular-toggle.is-titular:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.btn-titular-toggle.is-reserva {
    background: linear-gradient(135deg, #15803d, #166534);
    border-color: #22c55e;
    color: #fff;
}

.btn-titular-toggle.is-reserva:hover {
    background: linear-gradient(135deg, #22c55e, #15803d);
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

/* ==========================================================
   TELA DE LOADING FUTURISTA / ORB NEURAL - CONVOCAÇÃO POR IA
   ========================================================== */
.ai-squad-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.3s ease forwards;
}

.ai-squad-loading-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    padding: 36px 40px;
    width: 90%;
    max-width: 540px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ai-squad-loading-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 60%);
    animation: rotateAura 12s linear infinite;
    pointer-events: none;
}

@keyframes rotateAura {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-orb-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-orb-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, rgba(147, 51, 234, 0.2) 60%, transparent 80%);
    animation: orbPulse 2s infinite ease-in-out;
}

.ai-orb-core {
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 16px #38bdf8);
    animation: orbFloat 3s ease-in-out infinite alternate;
}

@keyframes orbPulse {
    0% { transform: scale(0.85); opacity: 0.6; }
    50% { transform: scale(1.35); opacity: 1; filter: drop-shadow(0 0 25px #38bdf8); }
    100% { transform: scale(0.85); opacity: 0.6; }
}

@keyframes orbFloat {
    0% { transform: translateY(0px) rotate(-3deg); }
    100% { transform: translateY(-8px) rotate(3deg); }
}

.ai-squad-loading-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #38bdf8, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-squad-loading-header p {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0 0 24px 0;
    line-height: 1.4;
}

.ai-steps-container {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.ai-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #64748b;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.ai-step.active {
    color: #f1f5f9;
    font-weight: 700;
    opacity: 1;
    transform: translateX(4px);
}

.ai-step.completed {
    color: #22c55e;
    opacity: 0.85;
}

.ai-step-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.ai-step.active .ai-step-icon {
    animation: bounceIcon 1s infinite alternate;
}

@keyframes bounceIcon {
    0% { transform: scale(1); }
    100% { transform: scale(1.25); }
}

.ai-loading-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(51, 65, 85, 0.8);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}

.ai-loading-progress-fill {
    width: 15%;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #a855f7);
    border-radius: 4px;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px #38bdf8;
}

.ai-loading-footnote {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    padding: 8px 12px;
}



