/* ==========================================================================
   PANELE GRACZY, STATYSTYKI I STREFY WPŁYWU
   ========================================================================== */

.stats-bar { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 20px; 
    background: rgba(51, 51, 51, 0.9); 
    padding: 15px; 
    border-radius: 8px; 
    gap: 10px; 
}

.player-stat { 
    text-align: left; 
    padding: 10px 15px; 
    border: 2px solid #555; 
    flex: 1;
    min-width: 0;
    border-radius: 5px; 
    transition: 0.3s; 
    background: #2c2c2c; 
    display: flex; 
    flex-direction: column; 
    position: relative; 
    cursor: pointer; 
    height: 380px;
    box-sizing: border-box;
}

.player-stat.has-stack-cards {
    height: 380px !important;
}

/* --- STANY PANELU --- */
.active-player { 
    border-color: var(--gold-dim); 
    background: #444; 
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.4); 
}

.eliminated { 
    opacity: 0.3; 
    text-decoration: line-through; 
    filter: grayscale(100%); 
    cursor: not-allowed; 
}

.player-stat.targetable { 
    border-color: var(--blue) !important; 
    cursor: crosshair; 
    animation: pulse-blue 1.5s infinite; 
}

.player-stat.targetable:hover { 
    background: #34495e !important; 
}

/* --- TYPOGRAFIA I WSKAŹNIKI --- */
.pop-positive { color: var(--green); font-weight: bold; font-size: 1.2em; }
.pop-negative { color: var(--red); font-weight: bold; font-size: 1.2em; }
.token-text { color: var(--gold); font-weight: bold; }
.role-text { color: var(--gold); font-weight: bold; font-size: 0.85em; margin-top: 5px; display: block; border-top: 1px solid #444; padding-top: 5px;}
.quest-text { color: var(--blue); font-size: 0.8em; font-style: italic; margin-top: 5px; display: block; }
.zone-text { font-size: 0.85em; font-weight: bold; margin-bottom: 5px; }

/* --- ODZNAKI (AURY, PAKTY, KOALICJE) --- */
.pact-badge { 
    font-size: 0.75em; 
    margin-top: 2px; 
    padding: 2px 4px; 
    border-radius: 4px; 
    display: inline-block; 
    border: 1px solid #555; 
    background: rgba(0,0,0,0.5); 
    color:#fff;
}
.pact-nonaggr { border-color: var(--blue); color: var(--blue); background: rgba(41, 128, 185, 0.2); }
.pact-help { border-color: var(--green); color: var(--green); background: rgba(39, 174, 96, 0.2); }
.pact-hostile { border-color: var(--red); color: var(--red); background: rgba(192, 57, 43, 0.2); }

.aura-badge { 
    font-size: 0.75em; 
    margin-top: 2px; 
    padding: 2px 4px; 
    border-radius: 4px; 
    display: inline-block; 
    background: rgba(142, 68, 173, 0.3); 
    border: 1px solid #8e44ad; 
    color:#e056fd;
}

.coalition-badge { 
    font-size: 0.78em; 
    margin-top: 3px; 
    padding: 3px 5px; 
    border-radius: 3px; 
    display: block; 
    background: rgba(52,152,219,0.15); 
    border: 1px solid var(--blue); 
    color: #74b9ff; 
    text-align: center; 
}

.player-stacks { 
    position: absolute; 
    top: -15px;  
    right: -15px; 
    display: flex; 
    flex-direction: column; 
    z-index: 50; 
}

.stack-mini { 
    width: 100px; 
    height: 140px; 
    background-color: #ffffff !important; 
    border-radius: 8px; 
    padding: 6px; 
    color: #333;
    cursor: help; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.7); 
    position: relative; 
    overflow: hidden; 
    margin-top: -100px; 
    transition: transform 0.2s;
    border: 3px solid var(--red); 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    z-index: 1; 
}

.stack-mini:first-child { margin-top: 0; }
.stack-mini:hover { 
    transform: translateX(-30px) scale(1.05); 
    z-index: 60 !important; 
}

.stack-mini-timer-bg { 
    width: 100%; 
    background: rgba(231, 76, 60, 0.4); 
    position: absolute; 
    bottom: 0; left: 0; 
    transition: height 0.1s linear; 
    z-index: 1; 
}

.stack-mini-icon { 
    position: relative; 
    z-index: 2; 
    text-align: left; 
    font-size: 0.7em; 
}

.stack-mini.targetable-stack { 
    border-color: var(--blue) !important; 
    cursor: crosshair; 
    animation: pulse-blue 1s infinite; 
}

/* --- MINIATURY I KARTY OCZEKUJĄCE --- */
.mini-hand { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; min-height: 26px; }
.mini-card {
    width: 16px; height: 24px; border-radius: 2px;
    background-image: url('../grafiki/backside6.jpg');
    background-size: cover; border: 1px solid #7f8c8d; box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.pending-cards-area { 
    position: absolute; 
    top: 6px; 
    right: 6px; 
    display: flex; 
    flex-direction: column; 
    gap: 3px; 
    max-width: 85px; 
    z-index: 20; 
}

.pending-mini-card { 
    background: #1a1a2e; 
    border-radius: 4px; 
    padding: 3px 5px; 
    font-size: 0.65em; 
    cursor: pointer; 
    transition: 0.2s; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.7); 
    display: flex; 
    flex-direction: column; 
    gap: 1px; 
    border: 1.5px solid var(--red); 
    max-width: 82px; 
    line-height: 1.2; 
}

.pending-mini-card.targetable-pending { 
    border-color: var(--gold) !important; 
    animation: pulse-gold 1.2s infinite; 
    cursor: crosshair; 
}

.pending-mini-card:hover { transform: scale(1.05); }

/* --- KOLORY STREF (LEGENDA) --- */
.zone-white { color: #fff; }
.zone-grey { color: var(--text-dim); }
.zone-black { color: var(--red); }
/* Kolorowy punkt identyfikujący gracza */
.player-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Korekta nagłówka gracza */
.player-header {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pop-label { color: #95a5a6; }

/* --- PANEL STOSU GLOBALNEGO (obok graczy w stats-bar) --- */
.global-stack-panel {
    border-color: #8e44ad !important;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%) !important;
}

.global-stack-panel .player-header {
    border-bottom: 1px solid rgba(142, 68, 173, 0.4);
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.global-stack-cards-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    max-height: 120px;
    padding: 3px;
}

.global-stack-panel.targetable {
    border-color: #9b59b6 !important;
    animation: pulse-purple 1.5s infinite;
}

.global-stack-panel.targetable:hover {
    background: linear-gradient(135deg, #2d1b4e 0%, #3d2b5e 100%) !important;
}

.global-stack-panel.drag-over {
    border-color: #e056fd !important;
    box-shadow: 0 0 20px rgba(224, 86, 253, 0.5);
    background: linear-gradient(135deg, #2d1b4e 0%, #4a2d6e 100%) !important;
}

@keyframes pulse-purple {
    0%, 100% { box-shadow: 0 0 8px rgba(142, 68, 173, 0.4); }
    50% { box-shadow: 0 0 20px rgba(142, 68, 173, 0.8); }
}
