/* Map Instructions Panel Styles */
.map-instructions-panel {
    position: fixed;
    left: -420px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, 
        rgba(0, 60, 74, 0.4) 0%, 
        rgba(0, 60, 74, 0.35) 50%,
        rgba(0, 60, 74, 0.3) 100%);
    box-shadow: 
        5px 0 30px rgba(0, 60, 74, 0.5),
        10px 0 50px rgba(0, 60, 74, 0.3),
        inset 0 0 100px rgba(255, 255, 255, 0.1);
    z-index: 95;
    transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.map-instructions-panel.open {
    left: 0;
}

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 15px rgba(102, 126, 234, 0.3);
}

.panel-header h2 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.panel-close {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.panel-content {
    padding: 30px;
}

.instruction-section {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    animation: slideInSection 0.5s ease-out backwards;
}

.instruction-section:nth-child(1) { animation-delay: 0.1s; }
.instruction-section:nth-child(2) { animation-delay: 0.2s; }
.instruction-section:nth-child(3) { animation-delay: 0.3s; }
.instruction-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInSection {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.instruction-section h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.instruction-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.instruction-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-section li {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.5;
    transition: transform 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.instruction-section li:hover {
    transform: translateX(5px);
}

.instruction-section li strong {
    color: #FFD93D;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.start-exploring-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.4);
    font-family: 'Fredoka', sans-serif;
    position: relative;
    overflow: hidden;
}

.start-exploring-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.start-exploring-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 30px rgba(102, 126, 234, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.4);
}

.start-exploring-btn:hover::before {
    left: 100%;
}

/* Open Instructions Badge */
.open-instructions-badge {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 94;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.open-instructions-badge.hidden {
    left: -150px;
}

.badge-content {
    background: linear-gradient(135deg, #FFD93D 0%, #FFB931 100%);
    padding: 15px 25px 15px 20px;
    border-radius: 0 30px 30px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 
        3px 0 20px rgba(255, 185, 49, 0.4),
        5px 0 30px rgba(255, 217, 61, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-left: none;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.badge-text {
    color: #8B4513;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    font-family: 'Fredoka', sans-serif;
}

.badge-arrow {
    font-size: 24px;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}

.open-instructions-badge:hover {
    transform: translateY(-50%) translateX(5px);
}

.open-instructions-badge:hover .badge-content {
    background: linear-gradient(135deg, #FFE561 0%, #FFC931 100%);
    box-shadow: 
        0 8px 25px rgba(255, 185, 49, 0.5),
        0 12px 35px rgba(255, 217, 61, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.7);
}

.open-instructions-badge:hover .badge-arrow {
    animation: arrowWave 0.5s ease-in-out infinite;
}

@keyframes arrowWave {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-3px) rotate(-5deg); }
    75% { transform: translateX(-3px) rotate(5deg); }
}

/* Scrollbar styling for panel */
.map-instructions-panel::-webkit-scrollbar {
    width: 8px;
}

.map-instructions-panel::-webkit-scrollbar-track {
    background: rgba(150, 100, 255, 0.1);
    border-radius: 4px;
}

.map-instructions-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.map-instructions-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2 0%, #667eea 100%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .map-instructions-panel {
        width: 85vw;
        left: -87vw;
    }
    
    .panel-content {
        padding: 20px;
    }
    
    .instruction-section {
        padding: 15px;
    }
    
    .open-instructions-badge {
        left: 0;
    }
    
    .badge-content {
        padding: 12px 20px 12px 15px;
    }
    
    .badge-text {
        font-size: 14px;
    }
}