/* ==============================================
   BROWSTERZ - Challenge System Styles
   ============================================== */

/* Challenge objectives list (in briefing overlay) */
.challenge-objectives-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0.5rem 1rem;
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    color: var(--accent-art);
}

.challenge-objectives-list li {
    padding: 0.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.challenge-objectives-list li::before {
    content: '☐';
    font-size: 0.8rem;
    color: var(--accent-art);
}

/* Challenge Overlay (Initial Briefing) */
.challenge-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.95);
    z-index: 100010;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.challenge-overlay.active {
    display: flex;
}

.challenge-terminal {
    background: #0A0A14;
    border: 2px solid #00FF41;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5), inset 0 0 20px rgba(0, 255, 65, 0.1);
    max-width: 700px;
    width: 90%;
    animation: terminalGlitch 0.5s ease;
}

@keyframes terminalGlitch {
    0% {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }
    20% {
        transform: scale(1.02) translateX(-2px);
    }
    40% {
        transform: scale(0.98) translateX(2px);
    }
    60% {
        transform: scale(1.01) translateX(-1px);
    }
    100% {
        transform: scale(1) translateX(0);
        opacity: 1;
    }
}

.challenge-header {
    background: linear-gradient(135deg, #00FF41 0%, #00CC33 100%);
    color: #0A0A14;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.challenge-header-text {
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.challenge-close {
    background: transparent;
    border: 1px solid #0A0A14;
    color: #0A0A14;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.2s;
}

.challenge-close:hover {
    background: #0A0A14;
    color: #00FF41;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.challenge-body {
    padding: 30px;
}

.challenge-title {
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    color: #00FF41;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    letter-spacing: 2px;
}

.challenge-description {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: rgba(0, 255, 65, 0.9);
    line-height: 1.8;
    margin-bottom: 25px;
    background: rgba(0, 255, 65, 0.05);
    padding: 20px;
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.terminal-line {
    margin-bottom: 8px;
}

.challenge-blink {
    animation: terminalBlink 1.2s infinite;
}

@keyframes terminalBlink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0.3;
    }
}

.challenge-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.challenge-btn {
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    padding: 12px 30px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    text-shadow: none;
}

.challenge-btn-accept {
    background: #00FF41;
    color: #0A0A14;
    border-color: #00FF41;
}

.challenge-btn-accept:hover {
    background: #33FF66;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    transform: scale(1.05);
}

.challenge-btn-cancel {
    background: transparent;
    color: #FF3030;
    border-color: #FF3030;
}

.challenge-btn-cancel:hover {
    background: #FF3030;
    color: #FFFFFF;
    box-shadow: 0 0 20px rgba(255, 48, 48, 0.6);
    transform: scale(1.05);
}

/* Force crosshair cursor during challenge */
body.challenge-active #zoomBody,
body.challenge-active #zoomBody * {
    cursor: none !important;
}

/* Challenge HUD (Active State) */
.challenge-hud {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100005;
    background: rgba(10, 10, 20, 0.95);
    border: 2px solid #FFD700;
    padding: 15px 20px;
    display: none;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    backdrop-filter: blur(4px);
    min-width: 280px;
    max-width: 350px;
    cursor: auto !important;
}

.challenge-hud.active {
    display: flex;
}

.challenge-hud.minimized {
    padding: 10px 15px;
}

.challenge-hud.minimized .challenge-hud-checklist,
.challenge-hud.minimized .challenge-hud-quit {
    display: none;
}

.challenge-hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.challenge-hud-title {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    color: #FFD700;
    letter-spacing: 1px;
}

.challenge-hud-toggle {
    background: transparent;
    border: 1px solid #FFD700;
    color: #FFD700;
    padding: 2px 8px;
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
}

.challenge-hud-toggle:hover {
    background: rgba(255, 215, 0, 0.2);
}

.challenge-hud-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    width: 100%;
}

.challenge-hud-checklist li {
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--stark-white);
    transition: all 0.3s ease;
}

.challenge-hud-checklist li::before {
    content: '☐';
    font-size: 0.8rem;
    color: var(--mid-gray);
    flex-shrink: 0;
}

.challenge-hud-checklist li.found {
    color: #00FF41;
    text-decoration: line-through;
}

.challenge-hud-checklist li.found::before {
    content: '☑';
    color: #00FF41;
}

.challenge-hud-quit {
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    background: transparent;
    border: 1px solid #FF3030;
    color: #FF3030;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.challenge-hud-quit:hover {
    background: #FF3030;
    color: #FFFFFF;
}

/* Challenge Victory Overlay */
.challenge-victory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.98);
    z-index: 100020;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.challenge-victory-overlay.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.challenge-victory-terminal {
    background: #0A0A14;
    border: 3px solid #00FF41;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.7), inset 0 0 30px rgba(0, 255, 65, 0.15);
    max-width: 600px;
    width: 90%;
    padding: 40px;
    animation: victoryPulse 2s ease infinite;
}

@keyframes victoryPulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(0, 255, 65, 0.7), inset 0 0 30px rgba(0, 255, 65, 0.15);
    }
    50% {
        box-shadow: 0 0 60px rgba(0, 255, 65, 0.9), inset 0 0 40px rgba(0, 255, 65, 0.2);
    }
}

.challenge-victory-content {
    text-align: center;
}

.challenge-victory-title {
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    color: #00FF41;
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
    letter-spacing: 3px;
    margin-bottom: 30px;
    animation: glowPulse 1.5s ease infinite;
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
    }
    50% {
        text-shadow: 0 0 25px rgba(0, 255, 65, 1), 0 0 35px rgba(0, 255, 65, 0.5);
    }
}

.challenge-victory-ascii {
    font-family: monospace;
    font-size: 0.6rem;
    line-height: 1;
    color: #FFD700;
    margin: 20px 0;
    white-space: pre;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.challenge-victory-message {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00FF41;
    line-height: 2;
    margin-top: 20px;
}

/* Challenge Zone Markers (when clicked) */
.challenge-zone-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 100002;
    animation: markerAppear 0.5s ease;
}

@keyframes markerAppear {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.challenge-zone-marker::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #00FF41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
    animation: checkPulse 1s ease infinite;
}

@keyframes checkPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.challenge-zone-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid #00FF41;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: markerRipple 1.5s ease infinite;
}

@keyframes markerRipple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Challenge Active State - Cursor change */
body.challenge-active .zoom-body {
    cursor: crosshair !important;
}

body.challenge-active .zoom-fake-artwork {
    cursor: crosshair !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .challenge-terminal {
        width: 95%;
        max-width: none;
    }

    .challenge-body {
        padding: 20px;
    }

    .challenge-title {
        font-size: 1rem;
    }

    .challenge-description {
        font-size: 0.75rem;
        padding: 15px;
    }

    .challenge-actions {
        flex-direction: column;
        gap: 10px;
    }

    .challenge-btn {
        width: 100%;
        padding: 14px;
    }

    .challenge-hud {
        flex-direction: column;
        gap: 8px;
        padding: 10px 15px;
    }

    .challenge-victory-terminal {
        width: 95%;
        padding: 25px;
    }

    .challenge-victory-title {
        font-size: 1.1rem;
    }

    .challenge-victory-ascii {
        font-size: 0.5rem;
    }

    .challenge-victory-message {
        font-size: 0.8rem;
    }
}
