/* ==========================================================================
   GRA TERENOWA 3: KLĄTWA STAREGO MIASTA (HALLOWEEN ESCAPE WALK)
   Style dla Radaru Pieczęci, Dziennika Zegarmistrza, Wirtualnej Skrzyni i Dyplomu
   ========================================================================== */

/* --- RADAR DROGI DO PIECZĘCI (HUD) --- */
.escape-radar-hud {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 32px);
    max-width: 580px;
    background: rgba(18, 14, 28, 0.96);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 2px solid #f1c40f;
    border-radius: 24px;
    padding: 12px 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(241, 196, 15, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    font-family: inherit;
    animation: slideUpEscapeHud 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

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

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

.escape-blip-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #f39c12 0%, #7e5109 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.7);
}

.escape-blip-box::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(241, 196, 15, 0.75);
    animation: escapeRadarPulse 2s infinite ease-out;
}

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

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

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

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

.escape-status-text .badge-near {
    color: #2ecc71;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.7);
    animation: pulseNearEscape 1.2s infinite;
}

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

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

.btn-radar-journal {
    background: linear-gradient(135deg, #f39c12 0%, #b77708 100%);
    border: 1px solid #ffd074;
    color: #1a0f00;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(243, 156, 18, 0.45);
    transition: transform 0.18s, filter 0.18s;
}

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

.btn-escape-radar-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e4d7f0;
    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-escape-radar-close:hover {
    background: rgba(231, 76, 60, 0.8);
    color: #fff;
    border-color: #e74c3c;
}

/* --- MODAL ROZWIĄZYWANIA ZAGADKI PIECZĘCI --- */
.escape-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 7, 16, 0.88);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.escape-modal-backdrop.active {
    display: flex;
}

.seal-puzzle-card {
    background: linear-gradient(145deg, #2b1f3a 0%, #171022 100%);
    border: 2px solid #f1c40f;
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    padding: 30px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(241, 196, 15, 0.35);
    text-align: center;
    animation: popInSeal 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    color: #fff;
}

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

.seal-icon-big {
    font-size: 56px;
    margin-bottom: 10px;
    display: inline-block;
    filter: drop-shadow(0 0 16px rgba(241, 196, 15, 0.8));
}

.seal-number-badge {
    background: #4a3411;
    border: 1.5px solid #f39c12;
    color: #ffd074;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.seal-puzzle-box {
    background: rgba(26, 17, 38, 0.8);
    border-left: 3px solid #f1c40f;
    border-radius: 14px;
    padding: 16px;
    margin: 16px 0;
    text-align: left;
    font-size: 14.5px;
    line-height: 1.55;
    color: #f0e6ff;
}

.seal-answers-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 18px;
}

.seal-ans-btn {
    background: #251838;
    border: 1.5px solid #57397e;
    border-radius: 14px;
    padding: 12px 16px;
    color: #e8dbfc;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.seal-ans-btn:hover {
    background: #412668;
    border-color: #f1c40f;
    color: #fff;
    transform: translateX(4px);
}

/* --- DZIENNIK ZEGARMISTRZA & WIRTUALNA SKRZYNIA --- */
.journal-modal-card {
    background: #191224;
    border: 2px solid #a37d22;
    border-radius: 28px;
    width: 100%;
    max-width: 640px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    color: #fff;
}

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

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

.story-intro-scroll {
    background: #241733;
    border: 1px dashed #7d591b;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 22px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #d8c9ec;
}

.seals-progress-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 26px;
}

.seal-slot-card {
    background: #221435;
    border: 1.5px solid #4a3068;
    border-radius: 14px;
    padding: 10px 4px;
    text-align: center;
}

.seal-slot-card.unlocked {
    border-color: #f1c40f;
    background: #382811;
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.35);
}

.seal-slot-digit {
    font-size: 22px;
    font-weight: 900;
    color: #ffd074;
    margin-top: 4px;
}

/* --- WIRTUALNA SKRZYNIA I MECHANIZM ZEGARA --- */
.chest-vault-box {
    background: linear-gradient(135deg, #2e1d10 0%, #190e06 100%);
    border: 2px solid #f39c12;
    border-radius: 22px;
    padding: 26px 20px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.chest-icon-wrap {
    font-size: 68px;
    margin-bottom: 12px;
    display: inline-block;
    filter: drop-shadow(0 0 16px rgba(243, 156, 18, 0.8));
}

.chest-vault-box.unlocked .chest-icon-wrap {
    animation: chestOpenGlow 1.5s infinite alternate;
}

@keyframes chestOpenGlow {
    0% { transform: scale(1); filter: drop-shadow(0 0 12px #2ecc71); }
    100% { transform: scale(1.08); filter: drop-shadow(0 0 25px #2ecc71); }
}

.code-inputs-grid {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 18px 0;
}

.code-digit-box {
    width: 48px;
    height: 56px;
    background: #120a03;
    border: 2px solid #f39c12;
    border-radius: 12px;
    font-size: 26px;
    font-weight: 900;
    color: #ffd074;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-unlock-chest {
    background: linear-gradient(135deg, #f1c40f 0%, #e67e22 100%);
    border: 2px solid #fff;
    color: #1a0f00;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 16.5px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.6);
    transition: all 0.22s;
}

.btn-unlock-chest:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 30px rgba(243, 156, 18, 0.8);
}

.btn-unlock-chest:disabled {
    background: #382a46;
    border-color: #554168;
    color: #9281a8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media (max-width: 600px) {
    .escape-radar-hud {
        bottom: 16px;
        padding: 10px 14px;
    }
    .code-digit-box {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
}
