/* ==========================================================================
   GRA TERENOWA: POLOWANIE NA DUSZKI (GHOST HUNT) - STYLE HUD I INTERAKCJI
   ========================================================================== */

/* --- PŁYWAJĄCY PASEK RADARU NA MAPIE (HUD) --- */
.ghost-radar-hud {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 32px);
    max-width: 560px;
    background: rgba(22, 14, 36, 0.94);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 2px solid #ff7518;
    border-radius: 24px;
    padding: 12px 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(255, 117, 24, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    font-family: inherit;
    animation: slideUpHud 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideUpHud {
    from { transform: translate(-50%, 60px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.radar-left-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.radar-blip-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #ff7518 0%, #8e44ad 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(255, 117, 24, 0.6);
}

.radar-blip-box::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 158, 67, 0.7);
    animation: radarPulse 2s infinite ease-out;
}

@keyframes radarPulse {
    0% { transform: scale(0.85); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.radar-info-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.radar-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #ffd074;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.radar-status-text {
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.radar-status-text .badge-cold { color: #70a1ff; }
.radar-status-text .badge-warm { color: #ffa502; }
.radar-status-text .badge-hot { color: #ff4757; text-shadow: 0 0 8px rgba(255, 71, 87, 0.6); }
.radar-status-text .badge-near { color: #2ed573; text-shadow: 0 0 10px rgba(46, 213, 115, 0.8); animation: pulseNear 1.2s infinite; }

@keyframes pulseNear {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.radar-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-radar-klaser {
    background: linear-gradient(135deg, #ff7518 0%, #d35400 100%);
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(255, 117, 24, 0.4);
    transition: transform 0.18s, filter 0.18s;
}

.btn-radar-klaser:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-radar-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #d1bddf;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.18s;
}

.btn-radar-close:hover {
    background: rgba(231, 76, 60, 0.8);
    color: #fff;
    border-color: #e74c3c;
}

/* --- OKNO ZŁAPANIA DUSZKA (MODAL) --- */
.ghost-catch-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(12, 7, 20, 0.88);
    backdrop-filter: blur(8px);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ghost-catch-backdrop.active {
    display: flex;
}

.ghost-catch-card {
    background: linear-gradient(180deg, #2b1842 0%, #160e24 100%);
    border: 2px solid #8e44ad;
    border-radius: 28px;
    width: 100%;
    max-width: 440px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 35px rgba(142, 68, 173, 0.4);
    animation: popInGhost 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    position: relative;
    overflow: hidden;
}

@keyframes popInGhost {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ghost-avatar-big {
    font-size: 80px;
    display: inline-block;
    filter: drop-shadow(0 10px 20px rgba(255, 117, 24, 0.5));
    animation: floatGhostCatch 2.5s ease-in-out infinite alternate;
    margin-bottom: 12px;
}

@keyframes floatGhostCatch {
    0% { transform: translateY(0) rotate(-4deg); }
    100% { transform: translateY(-14px) rotate(4deg); }
}

.ghost-catch-title {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 6px;
}

.ghost-catch-badge {
    display: inline-block;
    background: rgba(255, 117, 24, 0.2);
    border: 1px solid #ff7518;
    color: #ffd074;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.ghost-dialogue-bubble {
    background: #1f1430;
    border: 1px solid #4a3461;
    border-radius: 18px;
    padding: 16px 20px;
    font-size: 14.5px;
    line-height: 1.5;
    color: #e4d7f0;
    margin-bottom: 22px;
    position: relative;
}

.ghost-dialogue-bubble::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #4a3461;
}

.ghost-catch-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-catch-action {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border: none;
    color: #fff;
    padding: 14px 22px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
}

.btn-catch-action:hover {
    transform: scale(1.04);
}

.btn-catch-fallback {
    background: #34224c;
    border: 1px solid #5a3a7f;
    color: #ffd074;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.btn-catch-close {
    background: transparent;
    border: none;
    color: #a491ba;
    font-size: 13px;
    cursor: pointer;
    margin-top: 6px;
    text-decoration: underline;
}

/* --- OKNO KLASERU ŁOWCY I CERTYFIKATU --- */
.ghost-klaser-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 18, 0.88);
    backdrop-filter: blur(10px);
    z-index: 10002;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.ghost-klaser-backdrop.active {
    display: flex;
}

.ghost-klaser-card {
    background: #1b1228;
    border: 2px solid #5d3882;
    border-radius: 28px;
    width: 100%;
    max-width: 600px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.85);
    max-height: 90vh;
    overflow-y: auto;
}

.klaser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #3d2956;
    padding-bottom: 15px;
}

.klaser-header h3 {
    margin: 0;
    font-size: 22px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.klaser-score-badge {
    background: #ff7518;
    color: #140b1e;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 13px;
}

.ghosts-grid-klaser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 25px;
}

.ghost-item-card {
    background: #231735;
    border: 1.5px solid #412a5e;
    border-radius: 18px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.ghost-item-card.caught {
    border-color: #2ecc71;
    background: linear-gradient(180deg, #24223d 0%, #171d2b 100%);
    box-shadow: 0 6px 18px rgba(46, 204, 113, 0.2);
}

.ghost-item-card.locked {
    opacity: 0.5;
    filter: grayscale(0.8);
}

.ghost-item-icon {
    font-size: 40px;
    margin-bottom: 6px;
    display: block;
}

.ghost-item-name {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.ghost-item-status {
    font-size: 11px;
    color: #2ecc71;
    font-weight: 700;
}

.ghost-item-card.locked .ghost-item-status {
    color: #a491ba;
}

/* --- DYPLOM MISTRZA ŁOWCÓW --- */
.diploma-box {
    background: #fff;
    color: #1a1a1a;
    border: 8px double #ff7518;
    border-radius: 16px;
    padding: 30px 24px;
    text-align: center;
    margin-top: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.diploma-title {
    font-size: 26px;
    font-weight: 900;
    color: #c0392b;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.diploma-subtitle {
    font-size: 14px;
    color: #555;
    margin: 0 0 16px;
    font-weight: 600;
}

.diploma-recipient {
    font-size: 24px;
    font-weight: 900;
    color: #8e44ad;
    border-bottom: 2px dashed #8e44ad;
    display: inline-block;
    padding: 0 20px 4px;
    margin-bottom: 14px;
}

.diploma-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: #333;
    max-width: 440px;
    margin: 0 auto 20px;
}

.diploma-seal {
    font-size: 42px;
    margin-bottom: 10px;
}

.diploma-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

@media print {
    body * {
        visibility: hidden !important;
    }
    .diploma-box, .diploma-box * {
        visibility: visible !important;
    }
    .diploma-box {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        box-shadow: none !important;
    }
    .diploma-actions {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .ghost-radar-hud {
        bottom: 16px;
        padding: 10px 14px;
    }
    .radar-blip-box {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    .radar-title-row {
        font-size: 11px;
    }
    .radar-status-text {
        font-size: 13px;
    }
    .btn-radar-klaser {
        padding: 6px 10px;
        font-size: 12px;
    }
}
