/* ========== MonsterAI Chat Page ========== */

/* ── Container ── */
.mai-container {
    height: calc(100vh - var(--topbar-height) - var(--page-header-height));
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mai-ready {
    opacity: 1;
}

/* ── Three-column flex layout ── */
.mai-columns {
    display: flex;
    height: 100%;
}

/* ══════════════════════════════════════════════════════════════
   INFO PANEL (left sidebar)
   ══════════════════════════════════════════════════════════════ */
.mai-col-info {
    width: 25%;
    flex: none;
    padding: 24px 20px;
    overflow-y: auto;
    text-align: center;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

/* Divisor gradiente centrado entre col-info y col-chat */
.mai-col-info::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 70%;
    background: linear-gradient(180deg, transparent, #F07400 30%, #00b4ff 70%, transparent);
    transition: opacity 0.3s ease;
}

.mai-columns.map-active .mai-col-info {
    width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

.mai-columns.map-active .mai-col-info::after {
    opacity: 0;
}

.mai-info-date {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 24px 0;
    width: 100%;
    text-align: left;
}

.mai-welcome {
    color: #F07400;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 2px 0;
}

.mai-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    font-weight: 400;
}

.mai-bot-wrap {
    margin-bottom: 20px;
    position: relative;
}

.mai-bot-img {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(240, 116, 0, 0.25));
    transition: transform 0.3s ease;
}

.mai-bot-img:hover {
    transform: scale(1.05);
}

.mai-description {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 10px 0;
}

.mai-consejos-link {
    color: #F07400;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(240, 116, 0, 0.4);
    transition: border-color 0.2s;
}

.mai-consejos-link:hover {
    border-color: #F07400;
}

/* ══════════════════════════════════════════════════════════════
   CHAT PANEL (center - fills remaining space)
   ══════════════════════════════════════════════════════════════ */
.mai-col-chat {
    width: 50%;
    flex: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    background: var(--bg-primary);
    position: relative;
    transition: width 0.3s ease;
}

/* Divisor gradiente centrado entre col-chat y col-map (solo con mapa) */
.mai-col-chat::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 70%;
    background: linear-gradient(180deg, transparent, #F07400 30%, #00b4ff 70%, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mai-columns.map-active .mai-col-chat {
    width: 40%;
}

.mai-columns.map-active .mai-col-chat::after {
    opacity: 1;
}

/* ── Chat Header (logo) ── */
.mai-chat-header {
    text-align: center;
    padding: 16px 16px 8px;
    flex-shrink: 0;
}

.mai-chat-logo {
    width: 220px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 2px 8px rgba(240, 116, 0, 0.15));
    /* Dark mode: negro→blanco, preserva naranja */
    filter: invert(1) hue-rotate(180deg) drop-shadow(0 2px 8px rgba(240, 116, 0, 0.15));
}

.light-mode .mai-chat-logo {
    filter: drop-shadow(0 2px 8px rgba(240, 116, 0, 0.15));
}

/* ── Chat Messages Area ── */
.mai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    min-height: 0;
    scroll-behavior: smooth;
}

/* ── Message Bubbles ── */
.mai-msg-question {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
    animation: maiFadeUp 0.3s ease;
}

@keyframes maiFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mai-msg-bubble {
    background: linear-gradient(135deg, #F07400 0%, #e06800 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 18px 18px 0 18px;
    max-width: 75%;
    font-size: 13px;
    word-break: break-word;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(240, 116, 0, 0.2);
    position: relative;
}

/* Cola estilo WhatsApp - pregunta (abajo-derecha) */
.mai-msg-bubble::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 12px;
    height: 12px;
    background: #e06800;
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.mai-spinner {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 30%, #F07400 65%, #00b4ff 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), black calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), black calc(100% - 3px));
    animation: maiSpin 0.7s linear infinite;
}

@keyframes maiSpin {
    to { transform: rotate(360deg); }
}

.mai-msg-answer {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px 18px 18px 0;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-primary);
    max-width: 90%;
    word-break: break-word;
    line-height: 1.7;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    animation: maiFadeUp 0.3s ease;
    position: relative;
}

/* Cola estilo WhatsApp - respuesta (abajo-izquierda) */
.mai-msg-answer::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -8px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* ── Tables inside answers ── */
.mai-msg-answer table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.mai-msg-answer thead {
    background: var(--primary-gradient);
}

.mai-msg-answer th,
.mai-msg-answer td {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.mai-msg-answer th {
    background: transparent;
    font-weight: 600;
    color: white;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.mai-msg-answer strong {
    color: #F07400;
}

/* ── Chart Wrapper ── */
.mai-chart-wrap {
    width: 100%;
    height: 280px;
    position: relative;
}

/* ── Photo Grid ── */
.mai-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mai-photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid var(--border-color);
}

.mai-photo-item img:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ══════════════════════════════════════════════════════════════
   CHAT FOOTER / INPUT
   ══════════════════════════════════════════════════════════════ */
.mai-chat-footer {
    padding: 12px 24px 16px;
    flex-shrink: 0;
    position: relative;
}

.mai-prompt-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid transparent;
    border-radius: 28px;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--primary-gradient) border-box;
    padding: 4px 6px 4px 20px;
    gap: 8px;
    transition: box-shadow 0.2s ease;
}

.mai-prompt-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(240, 116, 0, 0.15);
}

.mai-prompt-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

.mai-prompt-input::placeholder {
    color: var(--text-secondary);
    font-size: 13px;
}

.mai-send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: none;
    background: #F07400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(240, 116, 0, 0.3);
}

.mai-send-btn:hover {
    background: #d96800;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(240, 116, 0, 0.4);
}

.mai-send-btn:active {
    transform: scale(0.95);
}

.mai-send-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(10);
}

/* ══════════════════════════════════════════════════════════════
   DROPDOWNS (autocomplete + history)
   ══════════════════════════════════════════════════════════════ */
.mai-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 24px;
    right: 24px;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--primary-gradient) border-box;
    border-radius: 14px;
    max-height: 340px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
    animation: maiDropUp 0.15s ease;
}

@keyframes maiDropUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.mai-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.mai-dropdown li {
    padding: 10px 18px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
}

.mai-dropdown li:hover {
    background: rgba(240, 116, 0, 0.08);
}

.mai-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mai-history-delete {
    color: #F07400;
    cursor: pointer;
    margin-left: 10px;
    opacity: 0.5;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.mai-history-delete:hover {
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   MAP PANEL (right)
   ══════════════════════════════════════════════════════════════ */
.mai-col-map {
    width: 25%;
    flex: none;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.mai-columns.map-active .mai-col-map {
    width: 60%;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
}

/* Leaflet pre-init: ya no necesita posicionamiento especial,
   la columna siempre esta en el layout con 25% invisible */
.mai-col-map.map-preinit {
    opacity: 0;
    pointer-events: none;
}

.mai-map-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
}

.mai-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(135deg, #F07400 0%, #00b4ff 100%);
    color: white;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.mai-map-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mai-map-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mai-map-body {
    flex: 1;
    min-height: 0;
    position: relative;
}

/* ── Floating map controls ── */
.mai-map-back-btn {
    position: absolute;
    bottom: 20px;
    left: 8px;
    z-index: 1000;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mai-map-back-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(240, 116, 0, 0.5);
}

.mai-map-dd-container {
    position: absolute;
    bottom: 20px;
    left: 56px;
    z-index: 1000;
    min-width: 220px;
}

.mai-map-dd-input {
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 9px 36px 9px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: box-shadow 0.2s;
    user-select: none;
}

.mai-map-dd-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.mai-map-dd-input:hover,
.mai-map-dd-input:focus {
    box-shadow: 0 4px 16px rgba(240, 116, 0, 0.5);
}

.mai-map-dd-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.mai-map-dd-arrow.open {
    transform: translateY(-50%) rotate(180deg);
}

.mai-map-dd-list {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    max-height: 260px;
    overflow-y: auto;
    animation: maiDropUp 0.2s ease-out;
}

/* ══════════════════════════════════════════════════════════════
   CONSEJOS MODAL
   ══════════════════════════════════════════════════════════════ */
.mai-consejos-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: consejosOverlayIn 0.3s ease;
}

.mai-consejos-overlay.closing {
    animation: consejosOverlayOut 0.3s ease forwards;
}

@keyframes consejosOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes consejosOverlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ── Modal Card ── */
.mai-consejos-modal {
    background: var(--bg-card);
    border: 1px solid transparent;
    background-clip: padding-box;
    border-radius: 20px;
    max-width: 50%;
    width: 50%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 0 1px rgba(240, 116, 0, 0.15),
        0 24px 64px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(240, 116, 0, 0.06);
    animation: consejosModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
}

.mai-consejos-modal.closing {
    animation: consejosModalOut 0.25s ease forwards;
}

@keyframes consejosModalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes consejosModalOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to { opacity: 0; transform: scale(0.92) translateY(12px); }
}

/* ── Header ── */
.mai-consejos-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 28px 16px;
    flex-shrink: 0;
}

.mai-consejos-header-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 14px rgba(240, 116, 0, 0.3);
}

.mai-consejos-header h3 {
    color: #F07400;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.mai-consejos-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

/* ── Divider ── */
.mai-consejos-divider {
    height: 2px;
    margin: 0 28px;
    background: linear-gradient(90deg, transparent, #F07400 30%, #00b4ff 70%, transparent);
}

/* ── Scrollable body ── */
.mai-consejos-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    padding: 18px 28px 10px;
    flex-shrink: 0;
}

.mai-consejos-desc strong {
    color: #F07400;
}

.mai-consejos-list {
    overflow-y: auto;
    padding: 8px 28px 8px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
}

.mai-consejos-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.mai-consejos-item:hover {
    background: rgba(240, 116, 0, 0.06);
}

.mai-consejos-bullet {
    color: #F07400;
    margin-top: 2px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.mai-consejos-item:hover .mai-consejos-bullet {
    opacity: 1;
}

.mai-consejos-text {
    font-size: 12.5px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ── Footer ── */
.mai-consejos-footer {
    padding: 16px 28px 24px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.mai-consejos-close {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 11px 40px;
    border-radius: 22px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(240, 116, 0, 0.3);
}

.mai-consejos-close:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 24px rgba(240, 116, 0, 0.4);
}

.mai-consejos-close:active {
    transform: scale(0.97);
}

/* ══════════════════════════════════════════════════════════════
   SPLASH / WELCOME SCREEN
   ══════════════════════════════════════════════════════════════ */

/* Splash theme variables (dark default) */
:root {
    --splash-grid-color: rgba(255, 255, 255, 0.02);
    --splash-bar-bg: rgba(255, 255, 255, 0.08);
}

.light-mode {
    --splash-grid-color: rgba(0, 0, 0, 0.04);
    --splash-bar-bg: rgba(0, 0, 0, 0.1);
}

.mai-splash {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mai-splash.exiting {
    animation: splashExit 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashExit {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.08); }
}

/* ── Background gradient orbs ── */
.mai-splash-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mai-splash-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.mai-splash-glow.glow-orange {
    width: 500px;
    height: 500px;
    top: -10%;
    left: -8%;
    background: radial-gradient(circle, rgba(240, 116, 0, 0.18), transparent 70%);
    animation: splashGlow1 6s ease-in-out infinite;
}

.mai-splash-glow.glow-cyan {
    width: 450px;
    height: 450px;
    bottom: -5%;
    right: -8%;
    background: radial-gradient(circle, rgba(0, 180, 255, 0.14), transparent 70%);
    animation: splashGlow2 7s ease-in-out infinite 1s;
}

.mai-splash-glow.glow-accent {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle, rgba(255, 154, 60, 0.08), transparent 70%);
    animation: splashGlow1 8s ease-in-out infinite 2s;
}

@keyframes splashGlow1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    50% { transform: translate(30px, -20px) scale(1.15); opacity: 0.7; }
}

@keyframes splashGlow2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    50% { transform: translate(-20px, 15px) scale(1.1); opacity: 0.7; }
}

/* ── Grid pattern overlay ── */
.mai-splash-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--splash-grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--splash-grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
    animation: splashFadeIn 1.5s ease both;
    pointer-events: none;
}

/* ── Orbiting particles ── */
.mai-splash-orbits {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
}

.mai-splash-dot {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
}

.mai-splash-dot.dot-1 {
    --orbit-r: 200px;
    width: 7px;
    height: 7px;
    background: rgba(240, 116, 0, 0.95);
    box-shadow: 0 0 14px 4px rgba(240, 116, 0, 0.6), 0 0 40px 8px rgba(240, 116, 0, 0.2);
    animation: splashOrbit 12s linear infinite;
}

.mai-splash-dot.dot-2 {
    --orbit-r: 150px;
    width: 6px;
    height: 6px;
    background: rgba(0, 180, 255, 0.9);
    box-shadow: 0 0 12px 4px rgba(0, 180, 255, 0.5), 0 0 35px 6px rgba(0, 180, 255, 0.15);
    animation: splashOrbit 10s linear infinite reverse;
}

.mai-splash-dot.dot-3 {
    --orbit-r: 240px;
    width: 5px;
    height: 5px;
    background: rgba(255, 154, 60, 0.85);
    box-shadow: 0 0 10px 3px rgba(255, 154, 60, 0.5), 0 0 30px 6px rgba(255, 154, 60, 0.15);
    animation: splashOrbit 16s linear infinite;
}

.mai-splash-dot.dot-4 {
    --orbit-r: 180px;
    width: 4px;
    height: 4px;
    background: rgba(0, 180, 255, 0.7);
    box-shadow: 0 0 8px 3px rgba(0, 180, 255, 0.4);
    animation: splashOrbit 14s linear infinite reverse;
    animation-delay: -4s;
}

@keyframes splashOrbit {
    from { transform: rotate(0deg) translateX(var(--orbit-r)) rotate(0deg); }
    to { transform: rotate(360deg) translateX(var(--orbit-r)) rotate(-360deg); }
}

/* ── Center hero ── */
.mai-splash-center {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 2;
}

/* Spinning ring */
.mai-splash-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-top: -148px;
    margin-left: -100px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, #F07400 25%, #00b4ff 50%, transparent 75%);
    -webkit-mask: radial-gradient(transparent 62%, black 64%);
    mask: radial-gradient(transparent 62%, black 64%);
    animation: splashScaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both 0.4s,
               splashRingSpin 3s linear infinite 0.4s;
    pointer-events: none;
}

/* Glow halo behind ring */
.mai-splash-ring-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 220px;
    margin-top: -158px;
    margin-left: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 116, 0, 0.12) 30%, transparent 70%);
    animation: splashScaleIn 1s ease both 0.3s, splashPulse 2.5s ease-in-out infinite 1s;
    pointer-events: none;
}

@keyframes splashRingSpin {
    to { transform: rotate(360deg); }
}

@keyframes splashScaleIn {
    from { opacity: 0; transform: scale(0.3); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes splashPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* Bot image */
.mai-splash-bot {
    width: 130px;
    height: auto;
    filter: drop-shadow(0 4px 30px rgba(240, 116, 0, 0.4));
    animation: splashBotIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both 0.7s,
               splashBotFloat 4s ease-in-out infinite 1.4s;
    z-index: 3;
}

@keyframes splashBotIn {
    from { opacity: 0; transform: scale(0.4) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

/* Logo text */
.mai-splash-logo {
    width: 200px;
    height: auto;
    filter: invert(1) hue-rotate(180deg) drop-shadow(0 2px 16px rgba(240, 116, 0, 0.25));
    animation: splashFadeUp 0.6s ease both 1.4s;
}

.light-mode .mai-splash-logo {
    filter: drop-shadow(0 2px 16px rgba(240, 116, 0, 0.25));
}

/* Tagline */
.mai-splash-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
    margin: 0;
    animation: splashFadeUp 0.6s ease both 1.8s;
}

/* Decorative line */
.mai-splash-line {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #F07400, #00b4ff, transparent);
    animation: splashLineGrow 0.8s ease both 2.2s;
}

@keyframes splashFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes splashFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes splashLineGrow {
    from { width: 0; }
    to { width: 120px; }
}

/* ── Bottom progress ── */
.mai-splash-bottom {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.mai-splash-hint {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin: 0;
    animation: splashFadeIn 0.5s ease both 2.5s;
}

.mai-splash-bar {
    width: 200px;
    height: 3px;
    background: var(--splash-bar-bg);
    border-radius: 3px;
    overflow: hidden;
    animation: splashFadeIn 0.5s ease both 2.5s;
}

.mai-splash-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #F07400, #00b4ff);
    border-radius: 3px;
    animation: splashBarFill 3.5s ease-out forwards 0.7s;
}

@keyframes splashBarFill {
    from { width: 0; }
    to { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .mai-col-info {
        display: none !important;
    }

    .mai-col-chat {
        width: 100% !important;
    }

    .mai-col-map {
        width: 0 !important;
    }

    .mai-columns.map-active .mai-col-chat {
        width: 35% !important;
        min-width: 250px !important;
    }

    .mai-columns.map-active .mai-col-map {
        width: 65% !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        overflow: visible !important;
    }
}

@media (max-width: 576px) {
    .mai-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mai-chat-logo {
        width: 160px;
    }

    .mai-chat-body {
        padding: 12px 16px;
    }

    .mai-chat-footer {
        padding: 10px 16px 12px;
    }

    .mai-columns.map-active .mai-col-chat {
        display: none !important;
    }

    .mai-columns.map-active .mai-col-map {
        width: 100% !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        overflow: visible !important;
    }
}
