/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Accessibility Utility */
.visually_hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #0b0d17; /* Dark midnight blue */
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

/* Layout Container */
.app_container {
    display: flex;
    flex-direction: row; /* Horizontal again */
    height: calc(100vh - 40px); /* Subtract footer height */
    width: 100%;
}

/* Main Stage (Map) */
.main_stage {
    flex: 1; /* Takes remaining space */
    min-width: 0; /* Allows shrinking below content size */
    height: 100%;
    position: relative;
    background: radial-gradient(circle at center, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mapa_fondo {
    position: relative; /* Wrapper for img */
    width: auto;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    /* background-image removed */
}

.bg_img_ref {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.mapa_placeholder_text {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    width: 90%; /* prevent overflow */
    
    /* Animation */
    animation: floatText 6s ease-in-out infinite alternate;
}

@keyframes floatText {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(10px); }
}

.mapa_placeholder_text h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: #e63946; /* Santa Red */
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    
    /* Contrast & Glow */
    text-shadow: 
        3px 3px 0px #ffffff, 
        0 0 20px rgba(230, 57, 70, 0.6);
}

.mapa_placeholder_text p#estado_viaje {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: #ffd700; /* Gold */
    font-weight: 700;
    margin-top: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.4); /* subtle pill for readability */
    display: inline-block;
    padding: 5px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Midnight Line */
.linea_medianoche {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* Center for demo, JS will adjust */
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 2;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.etiqueta_medianoche {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #e63946;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Santa Animation */
.santa_lottie {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px; /* Reduced from 300px */
    max-height: 200px;
    z-index: 10;
    pointer-events: none;
    /* mix-blend-mode: multiply; Hides white background - removed per previous user edit or keep if needed? User removed it in diff 153, so I won't re-add it */
    animation: floatVertical 10s ease-in-out infinite alternate;
}

@keyframes floatVertical {
    0% { top: 10%; }
    100% { top: 90%; }
}

/* Sidebar */
.sidebar_multimedia {
    flex: 0 0 200px; /* Fixed width to ensure visibility */
    max-width: 40vw; /* Prevent overtaking on medium screens */
    height: 100%;
    position: relative;
    background-color: #161b22;
    border-left: 1px solid #30363d;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.sidebar_header {
    padding: 20px;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar_header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.live_badge {
    background: #e63946;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    animation: pulse 2s infinite;
}

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

.lista_feed {
    flex: 25;
    overflow-y: auto;
    padding: 10px;
    display: block; /* Vertical list */
    gap: normal;
}

.feed_item {
    background: #0d1117;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid #30363d;
    width: auto;
    min-width: 0;
}

.feed_item:hover {
    transform: translateY(-2px);
    border-color: #8b949e;
}

.feed_thumbnail_container {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
    background: #21262d;
}

.feed_thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.type_icon {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.feed_info {
    padding: 10px;
}

.feed_caption {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #e6edf3;
}

.feed_meta {
    font-size: 0.75rem;
    color: #8b949e;
}

/* Footer (Announcement Bar) */
.barra_anuncios {
    height: 40px;
    background: #e63946;
    color: white;
    display: flex;
    align-items: center;
    overflow: hidden;
    font-weight: 600;
    border-top: 1px solid #ff6b6b;
}

.marquee_container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee_content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 60s linear infinite;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Modal */
.modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal_content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.modal_body img, .modal_body video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.modal_caption {
    margin-top: 10px;
    font-size: 1.1rem;
    color: #fff;
}

.boton_cerrar {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .app_container {
        flex-direction: column;
        height: auto;
    }

    .main_stage {
        height: 50vh;
        width: 100%;
        flex: 0 0 auto;
    }

    .sidebar_multimedia {
        height: 40vh;
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
    }
}

/* City Popup Notification */
.city_popup {
    position: absolute;
    top: 20%; 
    left: 75%;
    right: auto;
    transform: translateX(-50%); /* Center on the 75% line */
    
    /* Festive Christmas Style - Enhanced */
    background: linear-gradient(135deg, #b31217 0%, #e52d27 100%);
    /* Subtle Snowflake Pattern */
    background-image: 
        radial-gradient(white 15%, transparent 16%),
        radial-gradient(white 15%, transparent 16%),
        linear-gradient(135deg, #b31217 0%, #e52d27 100%);
    background-size: 20px 20px, 20px 20px, 100% 100%;
    background-position: 0 0, 10px 10px, 0 0;
    background-blend-mode: overlay;

    backdrop-filter: blur(8px);
    border: 3px solid #FFD700; /* Thicker Gold Border */
    border-radius: 16px;
    padding: 20px 25px; /* Reduced by ~30% */
    z-index: 1000;
    
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.6), /* Stronger Gold Glow */
        inset 0 0 20px rgba(0,0,0,0.2);
        
    animation: 
        slideInRight 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        floatCard 4s ease-in-out infinite alternate;
    pointer-events: auto; /* Allow clicks */
    cursor: pointer;
    min-width: 320px; /* Reduced by ~30% */
}
/* Snow Decoration on Top */
.city_popup::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 15px;
    right: 15px;
    height: 10px; /* Reduced */
    background: rgba(255,255,255,0.9);
    border-radius: 20px 20px 5px 5px;
    filter: blur(3px);
    opacity: 0.8;
}

@keyframes floatCard {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(-10px); } /* Reduced float */
}


@keyframes slideInRight {
    0% { opacity: 0; transform: translateX(-20%) scale(0.9); }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

.city_popup_content {
    display: flex;
    align-items: center;
    gap: 15px; /* Reduced */
}

.popup_flag {
    width: 70px; /* Reduced */
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transform: rotate(-3deg);
}

.popup_text {
    text-align: left;
    color: #fff;
    flex: 1;
}

.popup_text h3 {
    margin: 0;
    font-size: 2rem; /* Reduced from 2.8rem */
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    text-shadow: 2px 2px 0px #8b0000;
    line-height: 1;
    letter-spacing: -1px;
}

.popup_text p {
    margin: 4px 0 8px 0;
    color: #ffd700; 
    font-size: 0.9rem; /* Reduced */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup_badge {
    display: inline-block;
    background: #fff;
    color: #b31217;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-transform: uppercase;
}

/* Coordinates Corner Box */
.coordenadas_corner {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    color: #8b949e;
    pointer-events: none;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* User City Button */
.btn_user_city {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
    z-index: 20;
}

.btn_user_city:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Small Modal Adjustments */
.modal_small {
    max-width: 400px;
    text-align: center;
}

.input_city {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    margin: 15px 0;
    box-sizing: border-box;
}

.btn_action {
    background: #e63946;
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}
.btn_action:hover {
    background: #ff4d5a;
}
.feedback_text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #ffd700;
    min-height: 1.2em;
}

/* Footer Info Links */
.footer_links {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0d1117;
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 8px 0;
    border-top: 1px solid #30363d;
    font-size: 0.85rem;
}

.barra_anuncios {
    bottom: 35px; /* Move up to make room for footer_links */
}

.link_footer {
    color: #8b949e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-family: 'Outfit', sans-serif;
}

.link_footer:hover {
    color: #58a6ff;
}

.btn_link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    text-decoration: underline;
}

.separator {
    color: #30363d;
}

/* Payment Modal */
.modal_medium {
    max-width: 500px;
    width: 90%;
    text-align: left;
}

.payment_options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.payment_row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #30363d;
}

.flag_payment {
    width: 50px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
}

.payment_details {
    flex: 1;
    color: #c9d1d9;
    font-size: 0.95rem;
}

.payment_details strong {
    color: #fff;
    display: block;
    margin-bottom: 2px;
}

.highlight_number {
    color: #ffd700;
    font-family: monospace;
    font-size: 1.1em;
    font-weight: bold;
    background: rgba(255, 215, 0, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

.modal_intro {
    font-size: 0.95rem;
    color: #c9d1d9;
    margin-bottom: 20px;
}

.modal_footer_note {
    font-size: 0.8rem;
    color: #8b949e;
    margin-top: 15px;
    text-align: center;
    font-style: italic;
}
