/* ============================================
   EXPEDITION MAP SCREEN
   World map with boss checkpoints before battles
   ============================================ */

/* === Main Container === */
.expedition-screen {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--wood-dark);
    z-index: 25000;
    transition: opacity 0.7s ease-in-out, visibility 0.7s ease-in-out;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.expedition-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Wood table texture background */
.expedition-screen::before {
    content: '';
    position: absolute;
    inset: -10%;
    /* Larger to allow for parallax movement */
    background:
        url('../img/fantasy_table_bg.png') center/cover,
        radial-gradient(ellipse at center, #2a1a0a 0%, #0f0a05 100%);
    background-blend-mode: overlay;
    opacity: 0.9;
    transform: translate(calc(var(--mouseX, 0) * -35px),
            calc(var(--mouseY, 0) * -35px));
    transition: transform 0.1s ease-out;
}

/* Atmospheric lighting */
.expedition-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 40%,
            rgba(255, 180, 80, 0.12) 0%,
            rgba(200, 120, 40, 0.06) 40%,
            transparent 70%);
    pointer-events: none;
}

/* === Map Container === */
.expedition-map-container {
    position: relative;
    z-index: 1;
    width: clamp(320px, 90vw, 1200px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* === Map Title === */
.expedition-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: transparent;

    /* Premium Gold Gradient - Matching Reward Screen */
    background: linear-gradient(180deg,
            #f0d890 0%,
            #d4a84b 25%,
            #f0d890 45%,
            #d4a84b 55%,
            #a67c30 80%,
            #7a5a20 100%);
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 100% 200%;

    /* Continuous gold shimmer animation */
    animation: expeditionGoldShimmer 3s ease-in-out infinite;

    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(212, 168, 75, 0.4);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.7));
    text-align: center;
}

@keyframes expeditionGoldShimmer {

    0%,
    100% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 0% 100%;
    }
}

.expedition-subtitle {
    font-family: 'IM Fell English', serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-style: italic;
    color: rgba(212, 168, 75, 0.7);
    letter-spacing: 0.15em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-top: -10px;
    position: relative;
}

/* Decorative stars around subtitle */
.expedition-subtitle::before,
.expedition-subtitle::after {
    content: '✦';
    color: rgba(212, 168, 75, 0.6);
    margin: 0 12px;
    font-size: 0.8rem;
    animation: subtitleStarSparkle 2s ease-in-out infinite;
}

.expedition-subtitle::after {
    animation-delay: 1s;
}

@keyframes subtitleStarSparkle {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* === The Map Frame === */
.expedition-map-frame {
    position: relative;
    background:
        linear-gradient(165deg,
            #5c3d1e 0%,
            #4a3016 15%,
            #3d2815 40%,
            #2a1a0a 70%,
            #1a0f08 100%);
    border-radius: 12px;
    padding: 0;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.7),
        0 15px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.08),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);
    transform-style: preserve-3d;
}

/* Decorative frame border - on top of map now */
.expedition-map-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid rgba(92, 61, 30, 0.6);
    border-radius: 12px;
    pointer-events: none;
    z-index: 10;
}

/* Small metallic corner rivets - more authentic look */
.expedition-map-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 12px;
    z-index: 11;
    /* Small brass rivets at corners */
    background:
        radial-gradient(circle 4px at 8px 8px,
            #f0d890 0%, #d4a84b 30%, #8b6914 60%, transparent 70%),
        radial-gradient(circle 4px at calc(100% - 8px) 8px,
            #f0d890 0%, #d4a84b 30%, #8b6914 60%, transparent 70%),
        radial-gradient(circle 4px at 8px calc(100% - 8px),
            #f0d890 0%, #d4a84b 30%, #8b6914 60%, transparent 70%),
        radial-gradient(circle 4px at calc(100% - 8px) calc(100% - 8px),
            #f0d890 0%, #d4a84b 30%, #8b6914 60%, transparent 70%);
}

/* === Map Image Container === */
.expedition-map-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 1000px;
    background: #2a1a0a;
}

.expedition-map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(15%) saturate(85%) brightness(90%);
    transition: filter 0.3s ease;
}

/* Side edge fading - hides map borders with gradient overlay */
.expedition-map-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* Strong left edge fade */
        linear-gradient(to right,
            rgba(42, 26, 10, 0.95) 0%,
            rgba(42, 26, 10, 0.7) 3%,
            rgba(42, 26, 10, 0.3) 8%,
            transparent 15%),
        /* Strong right edge fade */
        linear-gradient(to left,
            rgba(42, 26, 10, 0.95) 0%,
            rgba(42, 26, 10, 0.7) 3%,
            rgba(42, 26, 10, 0.3) 8%,
            transparent 15%),
        /* Subtle top edge */
        linear-gradient(to bottom,
            rgba(42, 26, 10, 0.5) 0%,
            transparent 10%),
        /* Subtle bottom edge */
        linear-gradient(to top,
            rgba(42, 26, 10, 0.5) 0%,
            transparent 10%),
        /* Center vignette */
        radial-gradient(ellipse at center, transparent 50%, rgba(42, 26, 10, 0.4) 100%);
    pointer-events: none;
    z-index: 3;
    border-radius: 6px;
}

/* Inner shadow for depth */
.expedition-map-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow:
        inset 0 0 60px rgba(20, 12, 5, 0.6),
        inset 0 0 100px rgba(10, 6, 3, 0.3);
    border-radius: 6px;
    pointer-events: none;
    z-index: 4;
}

/* === Boss Checkpoint Markers === */
.checkpoint-markers {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.checkpoint-marker {
    position: absolute;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    transition: all 0.3s ease;
    z-index: 10;
}

.checkpoint-marker::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 75, 0.4) 0%, transparent 70%);
    animation: markerPulse 2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkpoint-marker.active::before,
.checkpoint-marker.current::before {
    opacity: 1;
}

.checkpoint-marker.locked::before {
    display: none;
}

@keyframes markerPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

/* Marker icon container */
.marker-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(160deg,
            #5c3d1e 0%,
            #4a3016 50%,
            #3d2815 100%);
    border: 3px solid #d4a84b;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.marker-icon img {
    width: 85%;
    height: 85%;
    object-fit: cover;
    border-radius: 50%;
    filter: sepia(10%) saturate(110%);
}

/* State variations */
.checkpoint-marker.completed .marker-icon {
    border-color: #5a9a3e;
    box-shadow:
        0 4px 12px rgba(90, 154, 62, 0.3),
        0 0 20px rgba(90, 154, 62, 0.2);
}

.checkpoint-marker.completed::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #6db33f, #4a8b2a);
    border-radius: 50%;
    border: 2px solid #fff;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 15;
}

.checkpoint-marker.current .marker-icon {
    border-color: #fff8e0;
    border-width: 4px;
    animation: currentGlow 2s ease-in-out infinite;
    transform: scale(1.08);
}

/* Dramatic outer selection halo ring - uses glow instead of ring to avoid label overlap */
.checkpoint-marker.current::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle at center,
            rgba(255, 250, 230, 0.25) 0%,
            rgba(255, 240, 200, 0.15) 40%,
            transparent 70%);
    box-shadow:
        0 0 25px rgba(255, 250, 230, 0.7),
        0 0 50px rgba(255, 235, 180, 0.4);
    animation: haloGlow 2.5s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes haloGlow {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Juicy selection pop animation */
.checkpoint-marker.selecting .marker-icon {
    animation: selectionPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

.checkpoint-marker.selecting::after {
    animation: selectionBurst 0.5s ease-out forwards !important;
}

@keyframes selectionPop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.25);
        box-shadow:
            0 6px 25px rgba(255, 255, 245, 1),
            0 0 60px rgba(255, 250, 230, 0.9),
            0 0 100px rgba(255, 240, 200, 0.6);
    }

    70% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1.08);
    }
}

@keyframes selectionBurst {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    30% {
        transform: scale(1.5);
        opacity: 1;
        box-shadow:
            0 0 40px rgba(255, 255, 245, 0.9),
            0 0 80px rgba(255, 250, 230, 0.6);
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
        box-shadow:
            0 0 25px rgba(255, 250, 230, 0.7),
            0 0 50px rgba(255, 235, 180, 0.4);
    }
}

@keyframes currentGlow {

    0%,
    100% {
        box-shadow:
            0 4px 15px rgba(255, 250, 230, 0.7),
            0 0 35px rgba(255, 240, 200, 0.5),
            0 0 60px rgba(255, 235, 180, 0.3);
    }

    50% {
        box-shadow:
            0 6px 20px rgba(255, 255, 245, 0.9),
            0 0 50px rgba(255, 250, 230, 0.7),
            0 0 80px rgba(255, 240, 200, 0.4);
    }
}

/* Make current marker label always visible and more prominent */
.checkpoint-marker.current .marker-label {
    opacity: 1;
    bottom: -35px;
    transform: translateX(-50%);
    background: linear-gradient(180deg,
            rgba(40, 28, 12, 0.95) 0%,
            rgba(25, 18, 8, 0.95) 100%);
    border: 1px solid #d4a84b;
    color: #f0d890;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow:
        0 0 8px rgba(212, 168, 75, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.7),
        0 0 15px rgba(212, 168, 75, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.checkpoint-marker.locked .marker-icon {
    border-color: #666;
    filter: grayscale(80%) brightness(60%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.checkpoint-marker.locked {
    cursor: not-allowed;
}

/* Available but not currently selected */
.checkpoint-marker.available .marker-icon {
    border-color: #d4a84b;
    transition: all 0.3s ease;
}

.checkpoint-marker.available:hover .marker-icon {
    border-color: #f0d890;
    box-shadow:
        0 4px 12px rgba(212, 168, 75, 0.4),
        0 0 20px rgba(212, 168, 75, 0.3);
    transform: scale(1.05);
}

.checkpoint-marker.available:hover {
    z-index: 15;
}

/* Completed bosses - not clickable */
.checkpoint-marker.completed {
    cursor: default;
}

.checkpoint-marker.completed .marker-icon img {
    filter: sepia(20%) saturate(80%) brightness(85%);
}

/* Marker label */
.marker-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: 'IM Fell English', serif;
    font-size: 0.85rem;
    color: #f5ebe0;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.6);
    padding: 2px 8px;
    background: rgba(30, 20, 10, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(212, 168, 75, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.checkpoint-marker:hover .marker-label,
.checkpoint-marker.current .marker-label {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px);
}

.checkpoint-marker.locked .marker-label {
    color: #888;
}



/* === Expedition Path === */
.expedition-path {
    display: none;
    /* Hidden - path lines removed */
}

.expedition-path svg {
    width: 100%;
    height: 100%;
}

.path-line {
    fill: none;
    stroke: rgba(212, 168, 75, 0.4);
    stroke-width: 4;
    stroke-dasharray: 12, 8;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.path-line.traveled {
    stroke: rgba(90, 154, 62, 0.6);
    stroke-dasharray: none;
}

/* === Proceed Button === */
.btn-proceed {
    margin-top: 15px;
    padding: 10px 50px 8px;
    font-family: var(--font-display, 'Cinzel Decorative', serif);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--parchment-light, #f5ebe0);
    background: linear-gradient(165deg,
            var(--red-wax-light, #a82828) 0%,
            var(--red-wax, #8b1a1a) 50%,
            #6b1010 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 0 #5a0a0a,
        0 6px 20px rgba(139, 26, 26, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

/* Sword icon now moved to .btn-proceed-text::before */

.btn-proceed::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn-proceed:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 #5a0a0a,
        0 10px 30px rgba(139, 26, 26, 0.5);
}

.btn-proceed:hover::after {
    left: 100%;
}

.btn-proceed:active,
.btn-proceed.pressed {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #5a0a0a,
        0 4px 10px rgba(139, 26, 26, 0.3);
}

/* Button content layout */
.btn-proceed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.btn-proceed-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-proceed-text::before {
    content: '⚔';
    font-size: 1.2rem;
}

/* Spacebar hint styling */
.btn-proceed-hint {
    font-family: 'IM Fell English', serif;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.02em;
    color: rgba(245, 235, 224, 0.5);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.btn-proceed:hover .btn-proceed-hint {
    opacity: 1;
    color: rgba(245, 235, 224, 0.7);
}

.btn-proceed-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 2px;
    font-family: inherit;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* === Legend/Key === */
.map-legend {
    position: absolute;
    bottom: 25px;
    left: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(30, 20, 10, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(212, 168, 75, 0.3);
    z-index: 10;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'IM Fell English', serif;
    font-size: 0.9rem;
    color: #e8dcc8;
    line-height: 1;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid;
    flex-shrink: 0;
    position: relative;
    top: -1px;
    /* Optical refinement */
}

.legend-dot.current {
    border-color: #fff8e0;
    background: #5c3d1e;
    box-shadow: 0 0 10px rgba(255, 250, 230, 0.6);
}

.legend-dot.available {
    border-color: #d4a84b;
    background: #4a3016;
}

.legend-dot.completed {
    border-color: #5a9a3e;
    background: #2d4d20;
}

.legend-dot.locked {
    border-color: #666;
    background: #333;
}

/* === Compass Rose === */
.compass-rose {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    opacity: 0.6;
    z-index: 10;
}

.compass-rose svg {
    width: 100%;
    height: 100%;
}

/* === Responsive === */
@media (max-width: 768px) {
    .expedition-map-container {
        width: 95vw;
    }

    .expedition-map-frame {
        padding: 10px;
    }

    .checkpoint-marker {
        width: 45px;
        height: 45px;
    }

    .marker-label {
        font-size: 0.75rem;
        bottom: -24px;
    }

    .map-legend {
        bottom: 10px;
        left: 10px;
        padding: 8px 12px;
    }

    .legend-item {
        font-size: 0.7rem;
    }

    .compass-rose {
        width: 40px;
        height: 40px;
    }

    .btn-proceed {
        padding: 14px 35px;
        font-size: 1rem;
    }
}

@media (max-width: 500px) {
    .expedition-title {
        font-size: 1.3rem;
    }

    .expedition-subtitle {
        font-size: 0.8rem;
    }

    .checkpoint-marker {
        width: 38px;
        height: 38px;
    }

}

/* === Floating Selection Arrow === */
.selection-arrow {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 14px solid #f0d890;
    filter:
        drop-shadow(0 0 6px rgba(240, 216, 144, 0.7)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 10px rgba(212, 168, 75, 0.5));
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 20;
}

.checkpoint-marker.current .selection-arrow {
    opacity: 1;
    animation: arrowFloat 1.5s ease-in-out infinite;
}

.checkpoint-marker.current .selection-arrow::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -10px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(240, 216, 144, 0.4) 0%, transparent 70%);
    filter: blur(2px);
    animation: arrowPulse 1.5s ease-in-out infinite alternate;
}

@keyframes arrowFloat {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-6px);
    }
}

@keyframes arrowPulse {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    100% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* ============================================
   ENTRANCE ANIMATIONS - Dramatic Map Reveal
   ============================================ */

/* Animated entrance state - triggered via JS */
.expedition-screen.animating .expedition-map-container {
    animation: mapContainerReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes mapContainerReveal {
    0% {
        opacity: 0;
        transform: scale(calc(0.85 * var(--ui-scale))) translateY(30px);
        filter: blur(8px);
    }

    40% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: scale(var(--ui-scale)) translateY(0);
        filter: blur(0);
    }
}

/* Title dramatic sweep-in */
.expedition-screen.animating .expedition-title {
    animation: titleSweepIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes titleSweepIn {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.8);
        filter: blur(10px);
        letter-spacing: 0.3em;
    }

    50% {
        opacity: 1;
        filter: blur(0);
    }

    70% {
        transform: translateY(5px) scale(1.02);
        letter-spacing: 0.08em;
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: 0.1em;
        filter: blur(0);
    }
}

/* Subtitle fade in with float */
.expedition-screen.animating .expedition-subtitle {
    animation: subtitleFadeIn 0.8s ease-out 0.4s both;
}

@keyframes subtitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Map frame dramatic entrance - unfurling scroll effect */
.expedition-screen.animating .expedition-map-frame {
    animation: mapFrameUnfurl 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes mapFrameUnfurl {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateX(15deg) scale(0.9) translateY(40px);
        box-shadow:
            0 60px 120px rgba(0, 0, 0, 0.9),
            0 30px 60px rgba(0, 0, 0, 0.7);
    }

    60% {
        transform: perspective(1000px) rotateX(-3deg) scale(1.02) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: perspective(1000px) rotateX(0) scale(1) translateY(0);
        box-shadow:
            0 30px 60px rgba(0, 0, 0, 0.7),
            0 15px 30px rgba(0, 0, 0, 0.5);
    }
}

/* Map image reveal with vignette pulse */
.expedition-screen.animating .expedition-map-image {
    animation: mapImageReveal 1.2s ease-out 0.3s both;
}

@keyframes mapImageReveal {
    0% {
        opacity: 0;
        transform: scale(1.1);
        filter: sepia(40%) saturate(60%) brightness(60%) blur(3px);
    }

    50% {
        opacity: 1;
        filter: sepia(20%) saturate(80%) brightness(85%) blur(0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: sepia(15%) saturate(85%) brightness(90%);
    }
}

/* Checkpoint markers - staggered magical appearance */
.expedition-screen.animating .checkpoint-marker {
    animation: checkpointAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Stagger the checkpoint animations */
.expedition-screen.animating .checkpoint-marker:nth-child(1) {
    animation-delay: 0.5s;
}

.expedition-screen.animating .checkpoint-marker:nth-child(2) {
    animation-delay: 0.6s;
}

.expedition-screen.animating .checkpoint-marker:nth-child(3) {
    animation-delay: 0.7s;
}

.expedition-screen.animating .checkpoint-marker:nth-child(4) {
    animation-delay: 0.8s;
}

.expedition-screen.animating .checkpoint-marker:nth-child(5) {
    animation-delay: 0.9s;
}

.expedition-screen.animating .checkpoint-marker:nth-child(6) {
    animation-delay: 1.0s;
}

.expedition-screen.animating .checkpoint-marker:nth-child(7) {
    animation-delay: 1.1s;
}

.expedition-screen.animating .checkpoint-marker:nth-child(8) {
    animation-delay: 1.2s;
}

.expedition-screen.animating .checkpoint-marker:nth-child(9) {
    animation-delay: 1.3s;
}

@keyframes checkpointAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
    }

    70% {
        transform: translate(-50%, -50%) scale(0.95) rotate(-5deg);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

/* Checkpoint glow burst on appear */
.expedition-screen.animating .checkpoint-marker .marker-icon {
    animation: markerGlowBurst 0.8s ease-out both;
    animation-delay: inherit;
}

@keyframes markerGlowBurst {
    0% {
        box-shadow:
            0 0 0 0 rgba(212, 168, 75, 0.8),
            0 4px 12px rgba(0, 0, 0, 0.5);
    }

    50% {
        box-shadow:
            0 0 30px 10px rgba(212, 168, 75, 0.4),
            0 4px 12px rgba(0, 0, 0, 0.5);
    }

    100% {
        box-shadow:
            0 0 0 0 rgba(212, 168, 75, 0),
            0 4px 12px rgba(0, 0, 0, 0.5);
    }
}

/* Proceed button entrance */
.expedition-screen.animating .btn-proceed {
    animation: buttonSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s both;
}

@keyframes buttonSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    70% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Legend fade in */
.expedition-screen.animating .map-legend {
    animation: legendFadeIn 0.5s ease-out 1s both;
}

@keyframes legendFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Compass spin in */
.expedition-screen.animating .compass-rose {
    animation: compassSpinIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s both;
}

@keyframes compassSpinIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }

    100% {
        opacity: 0.6;
        transform: rotate(0deg) scale(1);
    }
}

/* Atmospheric light sweep across map */
.expedition-screen.animating .expedition-map-wrapper::before {
    animation: lightSweep 1.5s ease-out 0.4s both;
}

@keyframes lightSweep {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

/* Golden dust particles floating effect (pseudo-element) */
.expedition-screen.animating::before {
    animation: dustFloat 2s ease-out 0.3s both;
}

@keyframes dustFloat {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.9;
    }
}