@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --phone-w: min(375px, 92vw);
    --phone-h: min(740px, 90vh);
    --phone-radius: 44px;
    
    --bg-desktop: #0b0f19;
    --phone-frame-border: #2d3748;
    --phone-bezel: #000000;
    
    --ios-bg: #000000;
    --ios-text: #ffffff;
    --ios-card: rgba(255, 255, 255, 0.12);
    --ios-border: rgba(255, 255, 255, 0.15);
    
    --wa-green: #25d366;
    --wa-dark-green: #075e54;
    --wa-bg: #0b141a;
    --wa-incoming: #202c33;
    --wa-outgoing: #005c4b;
    
    --accent-gold: #f59e0b;
    --accent-cyan: #38bdf8;
    --accent-red: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

button, a, [onclick], .app-icon-item, .chat-list-row, .story-item, .gallery-grid-item, .note-row, .dock-icon, .lock-notif-card, .nc-card, .btn-app-back, .nav-bar-btn {
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    pointer-events: auto !important;
}

.app-icon-item > *, .chat-list-row > *, .dock-icon > *, .nav-bar-btn > *, .story-item > * {
    pointer-events: none;
}

html, body {
    background: var(--bg-desktop);
    color: #f1f5f9;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Master Wrapper */
.simulation-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* ========================================= */
/* THE SMARTPHONE FRAME                      */
/* ========================================= */
.phone-frame {
    width: var(--phone-w);
    height: var(--phone-h);
    max-height: 92vh;
    background: #000000;
    border-radius: var(--phone-radius);
    border: 10px solid var(--phone-frame-border);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    body {
        background: #000000;
    }
    .phone-frame {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Status Bar & Dynamic Island */
.phone-status-bar {
    height: 48px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    color: white;
}

.status-time {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.dynamic-island {
    width: 110px;
    height: 28px;
    background: #000000;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.island-camera {
    width: 11px;
    height: 11px;
    background: #0c1a30;
    border-radius: 50%;
    border: 1px solid #1e293b;
}
.island-sensor {
    width: 7px;
    height: 7px;
    background: #08111e;
    border-radius: 50%;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

/* Push Notification Banner (iOS Floating Glass Style) */
.push-notification-banner {
    position: absolute;
    top: -120px;
    left: 12px;
    right: 12px;
    background: rgba(24, 32, 47, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 250;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}
.push-notification-banner.show {
    top: 52px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.push-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.push-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.push-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 2px;
    font-weight: 600;
}
.push-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}
.push-text {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

/* ========================================= */
/* SCREEN 0: GAME START & BRIEFING SCREEN    */
/* ========================================= */
.game-start-screen {
    position: absolute;
    inset: 0;
    z-index: 600;
    background: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0c0a24 45%, #050711 100%);
    display: flex;
    flex-direction: column;
    padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(env(safe-area-inset-bottom, 0px) + 30px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    transition: opacity 0.3s ease;
}
.game-start-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.96);
    display: none !important;
}
.start-screen-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
    padding-bottom: 20px;
}
.start-header-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.start-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.start-badge-publisher {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.start-badge-age {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.start-title-block {
    text-align: center;
    margin-top: 4px;
}
.start-case-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    color: #f59e0b;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
    display: inline-block;
}
.start-main-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin: 2px 0 4px;
    text-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
}
.start-sub-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #38bdf8;
    margin: 0;
    line-height: 1.35;
}

/* Mission Story Card */
.start-mission-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    backdrop-filter: blur(12px);
}
.mission-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.mission-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}
.start-mission-card p {
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.4;
    margin: 0;
}
.start-mission-card p strong {
    color: #ffffff;
}

/* Features List */
.start-features-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.start-feat-item {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.feat-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.icon-chat {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
}
.icon-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.icon-location {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.feat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.feat-text strong {
    font-size: 0.78rem;
    color: #ffffff;
}
.feat-text span {
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.3;
}

/* Bottom Action Section */
.start-action-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.start-audio-notice {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.7rem;
    color: #6ee7b7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}
.btn-start-game-cta {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: 2px solid #34d399;
    border-radius: 16px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
    transition: all 0.15s ease;
    position: relative;
    z-index: 700;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(16, 185, 129, 0.4);
}
.btn-start-game-cta:hover, .btn-start-game-cta:active {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.8);
}

.start-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    font-size: 0.68rem;
}
.start-link-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.68rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.start-link-btn:hover {
    color: #ffffff;
}
.ai-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #cbd5e1;
}
.teacher-link {
    color: #60a5fa;
    font-weight: 600;
}
.teacher-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}
.link-divider {
    color: #475569;
}

/* ========================================= */
/* INTRO VIDEO & MOTION GRAPHICS OVERLAY    */
/* ========================================= */
.intro-video-overlay {
    position: absolute;
    inset: 0;
    z-index: 500;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px 18px 24px;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.intro-video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.04);
    display: none !important;
}
#intro-video-element {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.85;
}
.intro-video-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.7) 0%, rgba(3, 7, 18, 0.2) 40%, rgba(3, 7, 18, 0.85) 100%);
    z-index: 2;
    pointer-events: none;
}
.intro-top-bar {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.intro-case-tag {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #fca5a5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
}
.btn-sound-toggle-intro {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
    touch-action: manipulation;
}
.btn-sound-toggle-intro:hover, .btn-sound-toggle-intro:active {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.04);
}
.btn-skip-intro {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 16px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
    touch-action: manipulation;
}
.btn-skip-intro:hover, .btn-skip-intro:active {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.04);
}

.intro-notifications-stack {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: auto 0;
}
.intro-notif-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    backdrop-filter: blur(25px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    animation: introCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes introCardPop {
    from { opacity: 0; transform: translateY(15px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.intro-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.intro-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.intro-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 600;
}
.intro-card-body {
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.35;
}

.intro-bottom-cta {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.intro-title-box h3 {
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 4px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.intro-title-box p {
    font-size: 0.76rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}
.btn-start-mission {
    width: 100%;
    padding: 15px 18px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: 2px solid #60a5fa;
    border-radius: 16px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    transition: all 0.15s ease;
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.4);
}
.btn-start-mission:hover, .btn-start-mission:active {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.8);
}
@keyframes pulseGlowCta {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.95), 0 0 25px rgba(96, 165, 250, 0.8);
    }
}
.btn-start-mission.pulse-glow-cta {
    animation: pulseGlowCta 1.4s infinite ease-in-out;
    background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
    border-color: #93c5fd !important;
}

/* Phone Views */
.phone-view {
    display: none !important;
    flex: 1 1 0%;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-top: 50px;
    padding-bottom: 58px;
    position: relative;
}
.phone-view.active {
    display: flex !important;
    flex-direction: column;
    min-height: 0;
}

/* ========================================= */
/* NOTIFICATION CENTER (PULL DOWN)           */
/* ========================================= */
.notification-center {
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 100%;
    background: rgba(9, 13, 22, 0.94);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    z-index: 300;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.notification-center.open {
    top: 0;
}
.notif-center-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 5px;
    cursor: pointer;
}
.handle-bar {
    width: 44px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
}
.notif-center-header {
    text-align: center;
    padding: 15px 0 10px;
}
.nc-time {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -1px;
}
.nc-date {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}
.nc-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-nc-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem;
}
.nc-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}
.nc-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}
.nc-card:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.02);
}
.nc-card-danger {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.15);
}
.nc-card-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3px;
}
.nc-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}
.nc-card-body {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.35;
}
.nc-bottom-hint {
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* ========================================= */
/* ON-SCREEN PASSCODE MODAL                  */
/* ========================================= */
.phone-passcode-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 20, 26, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 280;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.phone-passcode-modal.active {
    display: flex;
}
.passcode-container {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 24px 20px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.passcode-lock-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid #f59e0b;
    color: #f59e0b;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 12px;
}
.passcode-container h3 {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 4px;
}
.passcode-container p {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 16px;
}
.passcode-input-wrapper {
    margin-bottom: 8px;
}
.passcode-input-box {
    width: 100%;
    background: #0f172a;
    border: 2px solid #334155;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s;
}
.passcode-input-box:focus {
    border-color: #f59e0b;
}
.passcode-error-msg {
    font-size: 0.78rem;
    color: #ef4444;
    min-height: 20px;
    margin-bottom: 14px;
    font-weight: 600;
}
.passcode-btn-row {
    display: flex;
    gap: 10px;
}
.btn-passcode-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}
.btn-passcode-submit {
    flex: 1;
    background: #f59e0b;
    border: none;
    color: #000000;
    font-weight: 700;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Chat Date Dividers, Phase Tags & System Banners */
.chat-date-divider {
    text-align: center;
    margin: 14px 0 6px;
}
.chat-date-divider span {
    background: rgba(255, 255, 255, 0.08);
    color: #8696a0;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-phase-tag {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.18));
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 8px;
    padding: 6px 10px;
    margin: 6px 0;
    font-size: 0.72rem;
    color: #c084fc;
    line-height: 1.35;
}
.chat-phase-tag strong {
    color: #f3e8ff;
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
}

.chat-mobbing-insight {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 6px 0;
    font-size: 0.72rem;
    color: #fde68a;
    line-height: 1.35;
}
.chat-mobbing-insight strong {
    color: #f59e0b;
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
}

/* Sent Image Attachment Bubble */
.c-bubble.outgoing.image-bubble {
    background: #005c4b;
    padding: 8px 10px;
    max-width: 220px;
}
.image-attachment-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}
.img-attach-icon {
    font-size: 1.8rem;
}
.img-attach-info {
    font-size: 0.75rem;
    line-height: 1.25;
}
.img-attach-name {
    font-weight: 700;
    color: #ffffff;
}
.img-attach-sub {
    color: #8696a0;
    font-size: 0.65rem;
}

.chat-system-warning {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.75rem;
    color: #fca5a5;
    text-align: center;
    line-height: 1.35;
    margin: 8px 0;
}

.chat-system-event {
    text-align: center;
    font-size: 0.7rem;
    color: #8696a0;
    margin: 6px auto;
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 10px;
    border-radius: 8px;
    width: fit-content;
    display: inline-block;
}

/* SCREEN: LOCKSCREEN */
#view-lockscreen {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
    justify-content: space-between;
    padding: 60px 20px 30px;
}

.lock-header {
    text-align: center;
}
#lock-icon {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
}
.lock-date {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2px;
}
.lock-clock {
    font-size: 4.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -2px;
    line-height: 1;
}

.lock-notifications {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    margin-bottom: auto;
}
.lock-notif-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 14px 16px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}
.lock-notif-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.02);
}
.notif-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}
.notif-body {
    font-size: 0.85rem;
    color: #ffffff;
    line-height: 1.4;
}

.lock-bottom {
    text-align: center;
    cursor: pointer;
}
.swipe-bar {
    width: 120px;
    height: 4px;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
    margin: 0 auto 8px;
}
.lock-bottom p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

/* SCREEN: HOMESCREEN */
#view-home {
    background: linear-gradient(135deg, #090d16 0%, #172554 100%);
    padding: 56px 18px calc(58px + env(safe-area-inset-bottom, 0px));
    justify-content: space-between;
    height: 100%;
    overflow: hidden;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.app-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
    z-index: 20;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.25);
}
.app-icon-item:hover .app-icon {
    transform: scale(1.06);
}
.app-icon-item:active .app-icon {
    transform: scale(0.92);
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.7rem;
    color: white;
    position: relative;
    box-shadow: 0 8px 18px rgba(0,0,0,0.35);
    transition: transform 0.2s;
}

.bg-chat { background: linear-gradient(135deg, #25d366, #128c7e); }
.bg-insta { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.bg-photos { background: linear-gradient(135deg, #38bdf8, #6366f1); }
.bg-notes { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bg-radar { background: linear-gradient(135deg, #ef4444, #8b5cf6); }
.bg-safari { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.bg-phone { background: linear-gradient(135deg, #10b981, #059669); }

.app-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #000;
}

.app-name {
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 500;
}

.home-dock {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 30px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}
.dock-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* APP: MESSENGER (CHATPULSE) */
#view-messenger {
    background: var(--wa-bg);
    color: #e9edef;
    padding-top: 48px;
    padding-bottom: 25px;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#chat-list-subview {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    min-height: 0;
}

#chat-conversation-subview {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
    flex: 1 1 0%;
    min-height: 0;
}

.app-header {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    gap: 8px;
    min-height: 48px;
}
.app-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-app-back {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 0.74rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.btn-app-back:hover, .btn-app-back:active {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffffff;
    transform: scale(0.96);
}
.header-action {
    font-size: 0.82rem;
    color: var(--wa-green);
    cursor: pointer;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.chat-items-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}
.chat-list-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.2s;
}
.chat-list-row:hover {
    background: rgba(255,255,255,0.04);
}
.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
}
.bg-avatar-group { background: #1e293b; }
.bg-avatar-fiona { background: #6366f1; }
.bg-avatar-danger { background: #7f1d1d; }

.chat-row-details {
    flex: 1;
}
.chat-row-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}
.chat-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}
.chat-time {
    font-size: 0.75rem;
    color: #8696a0;
}
.chat-row-preview {
    font-size: 0.8rem;
    color: #8696a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* Chat Single Conversation */
.chat-header-bar {
    height: 54px;
    background: #202c33;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.btn-chat-back, .btn-chat-info {
    background: transparent;
    border: none;
    color: #aebac1;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
}
.chat-active-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.active-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}
.active-status {
    font-size: 0.7rem;
    color: var(--wa-green);
}

.chat-messages-body {
    flex: 1 1 0%;
    min-height: 0;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    background: #0b141a;
    width: 100%;
}

.c-bubble {
    max-width: 85%;
    width: fit-content;
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
}
.c-bubble.incoming {
    background: var(--wa-incoming);
    color: #e9edef;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}
.c-bubble.outgoing {
    background: var(--wa-outgoing);
    color: #e9edef;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}
.c-sender {
    font-size: 0.75rem;
    font-weight: 700;
    color: #53bdeb;
    margin-bottom: 3px;
    display: block;
}
.c-meta {
    font-size: 0.65rem;
    color: #8696a0;
    text-align: right;
    margin-top: 4px;
}

/* Green Audio Voice Memo Player */
.voice-memo-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 220px;
    padding: 4px 0;
}
.btn-voice-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wa-green);
    border: none;
    color: #0b141a;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}
.voice-wave-bars {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    height: 24px;
}
.wave-bar {
    width: 3px;
    background: #8696a0;
    border-radius: 2px;
    transition: height 0.2s;
}
.wave-bar.playing {
    background: var(--wa-green);
    animation: wavePulse 0.6s infinite alternate ease-in-out;
}
@keyframes wavePulse {
    0% { height: 6px; }
    100% { height: 22px; }
}
.voice-time {
    font-size: 0.7rem;
    color: #8696a0;
}

/* Chat Video Attachment */
.chat-video-attachment {
    margin: 8px 0 4px;
    border-radius: 10px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 260px;
}
.chat-embedded-video {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}
.video-attachment-badge {
    background: rgba(0, 0, 0, 0.75);
    padding: 5px 8px;
    font-size: 0.68rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.video-attachment-badge span:first-child {
    color: #f1f5f9;
    font-weight: 600;
}

/* Fullscreen Toggle Button in Status Bar */
.btn-fullscreen-toggle {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.72rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.btn-fullscreen-toggle:hover {
    color: #38bdf8;
}

/* Chat Input Bar & Choices */
.chat-input-bar {
    background: #202c33;
    padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 52px) 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.input-fake-field {
    font-size: 0.8rem;
    color: #8696a0;
    padding: 5px 12px;
    background: #2a3942;
    border-radius: 16px;
}
.input-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.btn-chat-choice {
    background: #111b21;
    border: 1px solid rgba(255,255,255,0.1);
    color: #e9edef;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-chat-choice:hover {
    background: #005c4b;
    border-color: var(--wa-green);
}

/* Scroll-to-Unlock Prompt Button in Chat Input Bar */
.btn-chat-scroll-prompt {
    width: 100%;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(59, 130, 246, 0.45);
    border-radius: 12px;
    color: #93c5fd;
    font-size: 0.76rem;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: bouncePrompt 1.6s infinite ease-in-out;
    text-align: center;
}
@keyframes bouncePrompt {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); border-color: #38bdf8; box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3); }
}
.btn-chat-scroll-prompt:hover {
    background: #1e1b4b;
    color: #ffffff;
}

/* APP: INSTALIFE (SOCIAL MEDIA FEED) */
#view-social {
    background: #000000;
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding-top: 48px;
    padding-bottom: 20px;
}

/* Stories Bar */
.insta-stories-bar {
    display: flex;
    gap: 14px;
    padding: 10px 14px 12px;
    border-bottom: 1px solid #1a1a1a;
    overflow-x: auto;
    background: #000000;
    flex-shrink: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.insta-stories-bar::-webkit-scrollbar {
    display: none;
}
.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
    width: 62px;
    transition: transform 0.15s ease;
}
.story-item:hover {
    transform: scale(1.05);
}
.story-ring {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
}
.story-ring.story-own {
    background: linear-gradient(45deg, #3b82f6, #6366f1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #18181b;
    border: 2px solid #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    user-select: none;
}
.story-name {
    font-size: 0.68rem;
    font-weight: 500;
    color: #e2e8f0;
    width: 100%;
    text-align: center;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.social-feed-container {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    padding: 0 0 35px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Post Cards */
.social-post-card {
    background: #0d0d0d;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}
.post-user-bar {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.post-user-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 700;
}
.post-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #262626;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
}
.post-sponsor-badge {
    font-size: 0.65rem;
    color: #94a3b8;
    display: block;
    font-weight: 400;
}
.post-image-placeholder {
    min-height: 200px;
    background: linear-gradient(135deg, #1e1b4b, #3b0764);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    position: relative;
    overflow: hidden;
}
.post-image-placeholder.phishing-bg {
    background: linear-gradient(135deg, #1e1b4b, #065f46);
}
.post-image-placeholder.filter-bg {
    background: linear-gradient(135deg, #831843, #4c0519);
}
.post-image-placeholder.challenge-bg {
    background: linear-gradient(135deg, #7c2d12, #451a03);
}
.post-image-placeholder.fakenews-bg {
    background: linear-gradient(135deg, #7f1d1d, #450a0a);
}
.post-image-placeholder.dance-bg {
    background: linear-gradient(135deg, #312e81, #1e1b4b);
}

/* Social Post Reel Video Player */
.post-video-container {
    width: 100%;
    height: 330px;
    position: relative;
    background: #000000;
    overflow: hidden;
}
.post-reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform: scale(1.09);
    transform-origin: center top;
    display: block;
}
.reel-badge-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #ffffff;
    pointer-events: none;
}

.post-badge-top {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 600;
}
.post-actions {
    padding: 10px 14px 6px;
    display: flex;
    gap: 16px;
    font-size: 1.25rem;
}
.post-actions i {
    cursor: pointer;
    transition: transform 0.15s, color 0.15s;
}
.post-actions i:hover {
    transform: scale(1.15);
}
.post-actions i.liked {
    color: #ef4444;
    font-weight: 900;
}
.post-likes {
    padding: 0 14px 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
}
.post-caption {
    padding: 0 14px 8px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #e5e5e5;
}
.post-comments-snippet {
    padding: 0 14px 10px;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.35;
}
.post-comments-snippet span {
    color: #cbd5e1;
    font-weight: 600;
}

.btn-feed-action {
    width: calc(100% - 28px);
    margin: 0 14px 14px;
    padding: 9px 12px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.btn-feed-action:hover {
    filter: brightness(1.15);
    transform: scale(1.01);
}
.btn-feed-action.action-filter {
    background: linear-gradient(135deg, #db2777, #9333ea);
}
.btn-feed-action.action-challenge {
    background: linear-gradient(135deg, #ea580c, #dc2626);
}
.btn-feed-action.action-fakenews {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}
.btn-feed-action.action-privacy {
    background: linear-gradient(135deg, #059669, #047857);
}

/* IN-PHONE BOTTOM SHEET MODAL (No Browser Alerts!) */
.phone-sheet-modal {
    position: absolute;
    inset: 0;
    z-index: 900;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
}
.phone-sheet-modal.active {
    display: flex;
}
.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}
.sheet-container {
    position: relative;
    background: #18181b;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px 24px 0 0;
    padding: 14px 18px 24px;
    max-height: 82%;
    overflow-y: auto;
    animation: sheetSlideUp 0.25s ease-out;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.8);
}
@keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.sheet-grabber {
    width: 38px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto 12px;
}
.sheet-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.sheet-icon {
    font-size: 1.5rem;
}
.sheet-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}
.sheet-body {
    font-size: 0.8rem;
    color: #d4d4d8;
    line-height: 1.45;
    margin-bottom: 16px;
}
.sheet-body strong {
    color: #ffffff;
}
.sheet-fact-box {
    background: rgba(255, 255, 255, 0.06);
    border-left: 3px solid #6366f1;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.76rem;
}
.sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-sheet-primary {
    width: 100%;
    padding: 11px;
    background: #6366f1;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-sheet-primary:hover {
    background: #4f46e5;
}
.btn-sheet-secondary {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #e4e4e7;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

/* APP: GALERIE */
#view-gallery {
    background: #000000;
    color: white;
    padding: 60px 14px 20px;
}
.gallery-intro-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 12px;
    padding: 0 4px;
}

/* Gallery Guide Banner */
.gallery-guide-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.gallery-guide-banner:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(99, 102, 241, 0.35));
    transform: scale(1.01);
    border-color: #60a5fa;
}
.guide-banner-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}
.guide-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.guide-banner-text strong {
    font-size: 0.82rem;
    color: #ffffff;
}
.guide-banner-text span {
    font-size: 0.7rem;
    color: #93c5fd;
}
.gallery-guide-banner i {
    color: #93c5fd;
    font-size: 0.85rem;
}

/* Location Guide Tabs in Modal Sheet */
.guide-platform-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 12px;
}
.guide-tab-btn {
    flex: 1;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.guide-tab-btn.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}
.guide-platform-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.gallery-thumb {
    height: 120px;
    background: #1e293b;
    border-radius: 12px;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}
.gallery-thumb:hover {
    border-color: var(--accent-cyan);
}
.gallery-thumb.resolved {
    border-color: var(--wa-green);
    background: #064e3b;
}
.thumb-emoji {
    font-size: 2.5rem;
    margin-bottom: 6px;
}
.thumb-tag {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Photo Modal */
.photo-inspect-modal, .note-detail-modal {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(15px);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h4 {
    font-size: 1rem;
    color: white;
}
.modal-header button {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
}
.modal-img-preview {
    font-size: 4rem;
    text-align: center;
    padding: 10px 0;
}
.modal-exif {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    background: #0f172a;
    padding: 10px;
    border-radius: 8px;
    color: #38bdf8;
    line-height: 1.4;
}
.modal-verdict {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.4;
}
.btn-modal-action {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* APP: NOTIZEN */
#view-notes {
    background: #000000;
    color: white;
    padding: 60px 16px 20px;
}
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.note-item {
    background: #1c1c1e;
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s;
}
.note-item:hover {
    background: #2c2c2e;
}
.note-item-highlight {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #1c1c1e 0%, rgba(245, 158, 11, 0.12) 100%);
}
.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.note-item h4 {
    font-size: 0.88rem;
    color: #ffd60a;
}
.note-tag-hint {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}
.note-badge-interactive {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
}
.note-item p {
    font-size: 0.76rem;
    color: #a1a1aa;
    line-height: 1.35;
}
.note-date {
    font-size: 0.68rem;
    color: #71717a;
    margin-top: 6px;
    display: block;
}

/* Password Lab Styling */
.pw-lab-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pw-input-row {
    width: 100%;
}
.pw-lab-input {
    width: 100%;
    background: #0f172a;
    border: 2px solid #334155;
    color: #ffffff;
    font-size: 0.88rem;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    transition: border-color 0.2s;
}
.pw-lab-input:focus {
    border-color: #38bdf8;
}
.pw-meter-box {
    background: #0f172a;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.pw-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    margin-bottom: 6px;
}
.pw-meter-label {
    font-weight: 700;
    color: #ffffff;
}
.pw-hack-time {
    font-family: 'JetBrains Mono', monospace;
    color: #f59e0b;
    font-weight: 700;
}
.pw-meter-track {
    width: 100%;
    height: 8px;
    background: #1e293b;
    border-radius: 4px;
    overflow: hidden;
}
.pw-meter-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 4px;
}
.pw-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 2px;
}
.pw-chk-item {
    font-size: 0.68rem;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.6);
    padding: 6px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.pw-chk-item.passed {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    font-weight: 600;
}
.pw-preset-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.btn-pw-preset {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-pw-preset:hover {
    background: rgba(255, 255, 255, 0.15);
}
.btn-preset-good {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}
.pw-success-banner {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6ee7b7;
    font-size: 0.72rem;
    margin-top: 4px;
    animation: popIn 0.3s ease;
}

/* APP: RADAR & CHECKLIST */
#view-radar {
    background: #090d16;
    color: white;
    padding: 60px 16px 30px;
}
.radar-score-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}
.radar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid #3b82f6;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #38bdf8;
    flex-shrink: 0;
}
.radar-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}
.radar-info p {
    font-size: 0.75rem;
    color: #94a3b8;
}

.radar-tasks-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.radar-tasks-card h4 {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.clue-item {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.clue-clickable {
    cursor: pointer;
}
.clue-clickable:hover {
    background: #1e293b;
    border-color: #3b82f6;
    transform: translateX(2px);
}
.clue-arrow {
    margin-left: auto;
    color: #64748b;
    font-size: 0.75rem;
}
.clue-item.done {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.1);
}
.clue-item.done .clue-arrow {
    color: #10b981;
}
.clue-item.done .clue-status-icon i {
    color: #10b981;
}

.radar-cert-box {
    margin-top: 20px;
    background: #1e293b;
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    display: none;
}
.radar-cert-box.unlocked {
    display: block;
}
.btn-unlock-cert {
    background: #f59e0b;
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 800;
    margin-top: 10px;
    cursor: pointer;
}

/* APP: BROWSER */
#view-browser {
    background: #000000;
    color: white;
}
.browser-address-bar {
    height: 44px;
    background: #1c1c1e;
    margin: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    font-size: 0.8rem;
    color: #8e8e93;
}
.browser-body {
    padding: 14px;
}
.browser-card {
    background: #121212;
    border-radius: 12px;
    padding: 16px;
}
.browser-card h3 {
    color: var(--accent-cyan);
    margin-bottom: 8px;
    font-size: 1rem;
}
.browser-card p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 14px;
}
.url-input-group {
    display: flex;
    gap: 8px;
}
.url-input-group input {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
}
.btn-check-url {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* SCREEN: RESCUE & HAPPY END FINALE */
#view-rescue {
    background: linear-gradient(180deg, #0b1329 0%, #030712 100%);
    color: white;
    padding: 48px 14px 110px;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
}
.rescue-screen-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.rescue-top-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #6ee7b7;
    margin: 0 auto 4px;
    letter-spacing: 0.5px;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulseGlow 1.5s infinite;
}
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.rescue-hero-box {
    text-align: center;
    margin-bottom: 6px;
}
.rescue-avatar-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: -10px;
    margin-bottom: 6px;
}
.avatar-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #1e293b;
    border: 3px solid #030712;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.avatar-circle.hero-merle {
    width: 56px;
    height: 56px;
    font-size: 1.7rem;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    z-index: 2;
    border-color: #10b981;
}
.rescue-hero-box h2 {
    font-size: 1.22rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 2px;
    text-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}
.rescue-subtitle {
    font-size: 0.76rem;
    color: #94a3b8;
    margin: 0;
}

/* Rescue Live Video Card */
.rescue-video-card {
    background: #0f172a;
    border: 1.5px solid rgba(236, 72, 153, 0.5);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.25);
}
.rescue-video-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.76rem;
    color: #f472b6;
    font-weight: 800;
}
.video-live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulseGlow 1.2s infinite;
}
.video-time-tag {
    margin-left: auto;
    font-size: 0.65rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}
.rescue-video-frame {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    max-height: 190px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.rescue-video-player {
    width: 100%;
    max-height: 190px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.rescue-story-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
    padding: 2px 0;
}
.rescue-story-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    backdrop-filter: blur(10px);
}
.rescue-story-card.card-merle {
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.35);
}
.rescue-story-card.card-family {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
}
.rescue-story-card.card-school {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}
.rescue-story-card.card-fiona {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(245, 158, 11, 0.4);
}

.story-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.card-tag {
    font-size: 0.76rem;
    font-weight: 800;
    color: #ffffff;
}
.card-time {
    font-size: 0.65rem;
    color: #94a3b8;
}
.rescue-story-card p {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #e2e8f0;
    margin: 0;
}

.rescue-action-area {
    padding: 6px 0 20px;
    width: 100%;
}
.btn-goto-cert {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 14px;
    color: #000000;
    font-size: 0.9rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.2s;
}
.btn-goto-cert:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* SCREEN: VICTORY */
#view-certificate {
    background: #090d16;
    color: white;
    padding: 60px 16px 30px;
    text-align: center;
}
.cert-screen-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-gold);
    margin-bottom: 4px;
}
.cert-screen-header p {
    font-size: 0.85rem;
    color: #94a3b8;
}
.cert-name-form {
    background: #1e293b;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 8px 0 10px;
}
.cert-name-form label {
    font-size: 0.78rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 6px;
}
.phone-cert-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    font-size: 0.95rem;
    text-align: center;
    outline: none;
}
.phone-cert-input:focus {
    border-color: var(--accent-gold);
}

/* Incoming Video Call Modal */
.incoming-call-modal {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(3, 7, 18, 0.96);
    backdrop-filter: blur(20px);
    z-index: 500;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px 40px;
    border-radius: 44px;
}
.incoming-call-modal.active {
    display: flex;
    animation: fadeInCall 0.3s ease-out;
}
@keyframes fadeInCall {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.call-screen-ringing {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-between;
    height: 100%;
    padding: 20px 0 10px;
}
.call-top-status {
    margin-bottom: 20px;
}
.pulse-call-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: pulseGlow 1.2s infinite;
}
.call-avatar-caller {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
}
.caller-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ef4444;
    animation: callerRing 1.5s infinite ease-out;
}
@keyframes callerRing {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}
.caller-avatar-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #1e293b;
    border: 3px solid #ef4444;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}
.caller-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 10px 0 4px;
}
.caller-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}
.call-actions-row {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: auto;
    padding: 20px 10px 10px;
}
.call-btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.call-btn-action span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #cbd5e1;
}
.btn-call-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
}
.btn-call-circle:hover {
    transform: scale(1.08);
}
.btn-call-decline {
    background: #ef4444;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}
.btn-call-accept {
    background: #22c55e;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
    animation: callAcceptBounce 1s infinite alternate ease-in-out;
}
@keyframes callAcceptBounce {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

/* Active Call Screen */
.call-screen-active {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 36px;
    overflow: hidden;
    background: #000000;
    display: flex;
    flex-direction: column;
}
.call-video-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.call-live-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}
.call-header-live {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: auto;
}
.caller-live-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.caller-live-info strong {
    font-size: 1.1rem;
    color: #ffffff;
}
.call-status-tag {
    font-size: 0.72rem;
    color: #f87171;
    display: flex;
    align-items: center;
    gap: 5px;
}
.live-dot-red {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulseGlow 1s infinite;
}
.pip-self-camera {
    width: 85px;
    height: 120px;
    border-radius: 12px;
    background: #1e293b;
    border: 2px solid #334155;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
.pip-blocked-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    color: #64748b;
    font-size: 0.62rem;
    padding: 6px;
}
.pip-blocked-content i {
    font-size: 1.2rem;
    color: #ef4444;
}
.call-footer-live {
    display: flex;
    justify-content: center;
    pointer-events: auto;
    padding-bottom: 10px;
}
.btn-hangup {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transition: transform 0.15s, filter 0.15s;
}
.btn-hangup:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* In-Phone Live Portrait Certificate Preview */
.cert-phone-preview-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 6px;
    margin: 8px 0 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    color: #0f172a;
}
.preview-cert-border {
    border: 4px double #d97706;
    padding: 6px;
    border-radius: 8px;
}
.preview-cert-content {
    border: 1px solid #d97706;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3px;
}
.preview-cert-logo {
    font-size: 1.4rem;
    line-height: 1;
}
.preview-cert-publisher {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748b;
}
.preview-cert-content h3 {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #0f172a;
    margin: 1px 0;
}
.preview-cert-sub {
    font-size: 0.75rem;
    font-weight: 800;
    color: #d97706;
}
.preview-recipient {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
    border-bottom: 1.5px solid #cbd5e1;
    padding: 2px 8px;
    margin: 4px 0;
    text-transform: uppercase;
}
.preview-desc {
    font-size: 0.65rem;
    color: #475569;
    line-height: 1.3;
    max-width: 90%;
    margin-bottom: 4px;
}
.preview-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    margin-top: 4px;
}
.preview-sig {
    font-family: 'Brush Script MT', cursive, sans-serif;
    font-size: 1.1rem;
    color: #0f172a;
}
.preview-seal {
    border: 1px solid #d97706;
    border-radius: 20px;
    font-size: 0.55rem;
    font-weight: 800;
    color: #d97706;
    padding: 2px 6px;
}

.cert-actions-row {
    margin-bottom: 12px;
}
.btn-cert-print {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: all 0.2s;
}
.btn-cert-print:hover {
    transform: scale(1.02);
}
.btn-guide-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.2s;
}
.btn-guide-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.minecraft-promo-card {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
    text-align: left;
}
.minecraft-promo-card h4 {
    color: var(--accent-cyan);
    margin-bottom: 4px;
}
.minecraft-promo-card p {
    font-size: 0.78rem;
    color: #cbd5e1;
}
.btn-return-home {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Universal OS Bottom Navigation Dock */
.phone-home-bar-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(11, 20, 26, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 150;
    backdrop-filter: blur(14px);
    padding: 0 16px env(safe-area-inset-bottom, 0px);
}
.nav-bar-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 18px;
    border-radius: 10px;
    transition: all 0.15s ease;
}
.nav-bar-btn i {
    font-size: 1rem;
}
.nav-bar-btn:hover, .nav-bar-btn:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.96);
}
.nav-bar-btn.nav-btn-home {
    color: #38bdf8;
}
.nav-bar-btn.nav-btn-home:hover {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.18);
}

/* ========================================= */
/* PRINT CERTIFICATE LAYOUT (@media print)   */
/* ========================================= */
.certificate-print-container {
    display: none;
}

@page {
    size: A4 portrait;
    margin: 0;
}

@media print {
    html, body {
        width: 210mm !important;
        height: 297mm !important;
        background: #ffffff !important;
        color: #0f172a !important;
        padding: 0 !important;
        margin: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .simulation-wrapper {
        display: none !important;
    }
    .certificate-print-container {
        display: block !important;
        width: 210mm !important;
        height: 297mm !important;
        box-sizing: border-box !important;
        padding: 12mm 10mm !important;
        background-color: #ffffff !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
    }
    .cert-border {
        width: 100% !important;
        height: 100% !important;
        border: 10px double #d97706 !important;
        padding: 8mm 6mm !important;
        background-color: #ffffff !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .cert-content {
        border: 1.5px solid #d97706 !important;
        width: 100% !important;
        height: 100% !important;
        padding: 24px 18px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: center !important;
        background-color: #ffffff !important;
        box-sizing: border-box !important;
    }
    .cert-header-block {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .cert-logo {
        font-size: 2.8rem !important;
        margin-bottom: 2px !important;
        line-height: 1 !important;
    }
    .cert-publisher {
        font-size: 0.92rem !important;
        font-weight: 800 !important;
        letter-spacing: 2px !important;
        text-transform: uppercase !important;
        color: #475569 !important;
        margin-bottom: 8px !important;
    }
    .cert-content h1 {
        font-size: 2.6rem !important;
        font-weight: 900 !important;
        letter-spacing: 4px !important;
        color: #0f172a !important;
        margin: 0 0 2px 0 !important;
        line-height: 1.1 !important;
    }
    .cert-subtitle {
        font-size: 0.88rem !important;
        color: #64748b !important;
        margin-bottom: 2px !important;
    }
    .cert-title-name {
        font-size: 1.7rem !important;
        font-weight: 900 !important;
        color: #d97706 !important;
        margin-bottom: 0 !important;
    }
    
    .cert-body-block {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin: 12px 0 !important;
    }
    .cert-awarded {
        font-size: 0.9rem !important;
        color: #64748b !important;
        margin-bottom: 6px !important;
    }
    .cert-recipient-name {
        font-size: 2.3rem !important;
        font-weight: 900 !important;
        border-bottom: 2px solid #cbd5e1 !important;
        padding-bottom: 4px !important;
        min-width: 260px !important;
        max-width: 90% !important;
        display: inline-block !important;
        margin-bottom: 14px !important;
        color: #0f172a !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }
    .cert-text-body {
        font-size: 0.82rem !important;
        color: #334155 !important;
        max-width: 90% !important;
        margin: 0 auto 14px auto !important;
        line-height: 1.45 !important;
    }
    .cert-skills-badge-row {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .cert-skill-pill {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 20px !important;
        padding: 4px 8px !important;
        font-size: 0.68rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
    }

    .cert-footer {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        padding: 0 10px !important;
        margin-top: 10px !important;
    }
    .cert-signature-box {
        text-align: center !important;
    }
    .cert-signature {
        font-family: 'Brush Script MT', cursive, sans-serif !important;
        font-size: 2.1rem !important;
        border-bottom: 1px solid #94a3b8 !important;
        padding-bottom: 2px !important;
        margin-bottom: 2px !important;
        color: #0f172a !important;
    }
    .cert-signature-title {
        font-size: 0.75rem !important;
        color: #64748b !important;
        font-weight: 600 !important;
    }
    .cert-seal {
        border: 2px solid #d97706 !important;
        border-radius: 50% !important;
        width: 72px !important;
        height: 72px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 0.62rem !important;
        font-weight: 800 !important;
        color: #d97706 !important;
        transform: rotate(-10deg) !important;
        text-align: center !important;
        line-height: 1.15 !important;
    }
}

/* ======================================================= */
/* ⚡ IMMERSIVE THRILLER UPGRADE: SOUND, GLITCH & GPS APPS */
/* ======================================================= */

/* Status Bar Sound & Pause Buttons */
.btn-sound-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #38bdf8;
    border-radius: 12px;
    padding: 2px 7px;
    font-size: 0.72rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: auto !important;
}
.btn-sound-toggle.muted {
    color: #94a3b8;
    opacity: 0.6;
}

.btn-pause-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fcd34d;
    border-radius: 12px;
    padding: 2px 7px;
    font-size: 0.72rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: auto !important;
    touch-action: manipulation;
}
.btn-pause-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: scale(1.05);
}
.btn-pause-toggle.is-paused {
    background: #f59e0b !important;
    color: #000000 !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
    animation: pulsePauseBtn 1.5s infinite;
}
@keyframes pulsePauseBtn {
    0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(245, 158, 11, 0.6); }
    50% { transform: scale(1.1); box-shadow: 0 0 14px rgba(245, 158, 11, 1); }
}

/* Floating Workshop Pause Indicator */
.pause-indicator-banner {
    position: absolute;
    top: 54px;
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, rgba(20, 24, 45, 0.98) 0%, rgba(10, 15, 30, 0.98) 100%);
    border: 2px solid #f59e0b;
    border-radius: 18px;
    padding: 16px 16px;
    z-index: 350;
    box-shadow: 0 15px 40px rgba(0,0,0,0.85), 0 0 25px rgba(245, 158, 11, 0.25);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    animation: slideDownPause 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDownPause {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.pause-indicator-badge {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    color: #fbbf24;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}
.pause-indicator-text {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin: 2px 0 6px 0;
}
.btn-pause-resume {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 9px 24px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    pointer-events: auto !important;
}
.btn-pause-resume:hover, .btn-pause-resume:active {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Screen Glitch & Remote Stalker Overlay */
.screen-glitch-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.1s ease;
    background: repeating-linear-gradient(0deg, rgba(239, 68, 68, 0.15) 0px, rgba(239, 68, 68, 0.15) 2px, transparent 2px, transparent 4px);
}
.screen-glitch-overlay.glitch-active {
    opacity: 1;
    animation: glitchFlicker 0.4s steps(2, start) infinite;
}
@keyframes glitchFlicker {
    0% { transform: translate(0, 0); filter: hue-rotate(0deg); }
    25% { transform: translate(-3px, 2px); filter: hue-rotate(90deg); }
    50% { transform: translate(3px, -2px); filter: hue-rotate(180deg); }
    75% { transform: translate(-2px, -2px); filter: hue-rotate(270deg); }
    100% { transform: translate(0, 0); filter: hue-rotate(0deg); }
}

/* Ghost Call Voice Waveform Screen */
.call-audio-voice-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px 20px;
    background: radial-gradient(circle at center, #1e1b4b 0%, #030712 100%);
    text-align: center;
    color: #fff;
    z-index: 10;
}
.ghost-audio-avatar {
    width: 80px;
    height: 80px;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 12px;
    animation: pulseRing 1.5s infinite;
}
.ghost-audio-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
}
.ghost-audio-timer {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 4px;
    font-family: monospace;
}
.ghost-audio-waveform {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 45px;
    margin: 24px 0;
}
.ghost-audio-waveform .bar {
    width: 5px;
    background: #38bdf8;
    border-radius: 3px;
    animation: waveBar 1.2s infinite ease-in-out;
}
.ghost-audio-waveform .b1 { height: 15px; animation-delay: 0.1s; }
.ghost-audio-waveform .b2 { height: 32px; animation-delay: 0.25s; }
.ghost-audio-waveform .b3 { height: 42px; animation-delay: 0.4s; }
.ghost-audio-waveform .b4 { height: 20px; animation-delay: 0.15s; }
.ghost-audio-waveform .b5 { height: 38px; animation-delay: 0.5s; }
.ghost-audio-waveform .b6 { height: 45px; animation-delay: 0.3s; }
.ghost-audio-waveform .b7 { height: 28px; animation-delay: 0.6s; }
.ghost-audio-waveform .b8 { height: 35px; animation-delay: 0.2s; }
.ghost-audio-waveform .b9 { height: 18px; animation-delay: 0.35s; }

@keyframes waveBar {
    0%, 100% { transform: scaleY(0.4); background: #38bdf8; }
    50% { transform: scaleY(1.1); background: #ef4444; }
}

.ghost-subtitles-box {
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #fecaca;
    font-style: italic;
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
    max-width: 320px;
}

/* App: Map Icon */
.bg-map {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
}
.app-badge-live {
    background: #ef4444 !important;
    color: #fff !important;
    font-size: 0.55rem !important;
    font-weight: 900 !important;
    padding: 1px 4px !important;
    letter-spacing: 0.5px;
    animation: pulseBadge 1.5s infinite;
}
@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Map Timeline View */
.map-app-container {
    padding: 14px 16px 80px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    height: 100%;
}
.map-status-banner {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
}
.map-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #38bdf8;
    margin-bottom: 4px;
    font-weight: 800;
}
.map-live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulseDot 1.2s infinite;
}
.map-status-banner p {
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.35;
}

.timeline-station-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}
.timeline-station-list::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 15px;
    bottom: 20px;
    width: 2px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 1;
}

.timeline-node {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    z-index: 2;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 12px;
    transition: all 0.2s;
}
.timeline-node.done .node-icon {
    background: #059669;
    border-color: #34d399;
}
.timeline-node.danger .node-icon {
    background: #d97706;
    border-color: #fbbf24;
}
.timeline-node.alert {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}
.timeline-node.alert .node-icon {
    background: #ef4444;
    border-color: #fca5a5;
    animation: pulseRing 1.5s infinite;
}
.timeline-node.lost {
    border-color: #64748b;
    opacity: 0.8;
}
.timeline-node.lost .node-icon {
    background: #475569;
}

.node-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.node-content {
    flex: 1;
}
.node-time {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 2px;
}
.node-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.node-desc {
    font-size: 0.74rem;
    color: #cbd5e1;
    line-height: 1.3;
}

.btn-map-action {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    border: none;
    color: #fff;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    transition: all 0.2s;
}
.btn-map-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.6);
}

/* Scratch & Wipe Puzzle in Gallery */
.scratch-puzzle-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
    width: 100%;
}
.scratch-instruction {
    font-size: 0.75rem;
    color: #38bdf8;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}
.scratch-container {
    width: 280px;
    height: 160px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.8);
    border: 2px solid #38bdf8;
}
.scratch-revealed-image {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b, #0f172a);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    position: absolute;
    top: 0; left: 0;
}
.scratch-station-scene {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}
.scene-tag-danger {
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.scene-clock {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fbbf24;
}
.scene-locker {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
}
.scene-suspect {
    font-size: 0.75rem;
    color: #f87171;
    font-weight: 600;
}

.scratch-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 280px;
    height: 160px;
    touch-action: none;
    cursor: crosshair;
    z-index: 5;
}

.scratch-progress-bar {
    width: 280px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
.scratch-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #10b981);
    transition: width 0.15s ease;
}
