/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    /* Goopi Brand Colors - Tokyo Pro Edition (Lila Accent) */
    --primary-purple: #1a0b2e;
    --primary-gradient: linear-gradient(135deg, #2d1b4d 0%, #1a0b2e 100%);
    --secondary-lilac: #be96ff;
    --accent-orange: #ff8c00;
    --accent-pink: #ff00ff;

    /* Tokyo Midnight Palette */
    --bg-dark: #05050a;
    --card-bg: rgba(25, 20, 45, 0.7);
    --text-white: #f0f0f5;
    --text-dim: #9494b8;

    /* Enhanced Glassmorphism */
    --glass-bg: rgba(20, 15, 35, 0.6);
    --glass-border: rgba(190, 150, 255, 0.2);
    --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
    --backdrop-blur: blur(20px);

    /* Glow Effects */
    --lilac-glow: 0 0 15px rgba(190, 150, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* App Layout */
#app {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Header */
.app-header {
    padding: 20px 15px 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.header-search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(15, 10, 30, 0.6);
    
    /* Efecto Bisel 3D Realista */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(255, 255, 255, 0.05);
    
    border-radius: 20px;
    padding: 6px 12px;
    margin: 0 8px;
    height: 38px;
    transition: all 0.3s ease;
}

.header-search-bar:focus-within {
    background: rgba(15, 10, 30, 0.85);
    border-color: var(--secondary-lilac);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 10px rgba(190, 150, 255, 0.2);
}

.header-search-bar input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    font-family: inherit;
    width: 100%;
}

.header-search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.header-search-bar button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    transition: color 0.2s;
}

.header-search-bar button:hover {
    color: var(--secondary-lilac);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: none;
    border: none;
}

.logo-container img {
    height: 40px;
    display: block;
}

/* Share Sheet - Tokyo Pro Edition */
.share-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

.share-sheet.active {
    pointer-events: auto;
}

.share-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.share-sheet.active .share-sheet-backdrop {
    opacity: 1;
}

.share-sheet-content {
    position: relative;
    width: 100%;
    background: linear-gradient(to top, #1a0b2e, #050510);
    border-top: 2px solid var(--secondary-lilac);
    border-radius: 30px 30px 0 0;
    padding: 30px 20px 50px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    text-align: center;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
}

.share-sheet.active .share-sheet-content {
    transform: translateY(0);
}

.share-sheet-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 auto 20px;
}

.share-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.share-icon {
    width: 55px;
    height: 55px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    transition: transform 0.2s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.share-option:active .share-icon {
    transform: scale(0.9);
}

.share-icon.wa { background: linear-gradient(135deg, #25D366, #128C7E); }
.share-icon.fb { background: linear-gradient(135deg, #1877F2, #0C4D9F); }
.share-icon.copy { background: linear-gradient(135deg, #666, #333); }
.share-icon.more { background: linear-gradient(135deg, var(--secondary-lilac), #8c309b); }

.share-option span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-white);
}

.share-cancel-btn {
    width: 100%;
    padding: 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 160px;
    /* Ajuste para barra de 125px */
    /* Space for bottom nav */
    scrollbar-width: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.main-content::-webkit-scrollbar {
    display: none;
}

/* Hero Section */
.hero {
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #ffffff, var(--secondary-lilac));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-dim);
    font-size: 16px;
}

/* Action Buttons */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.action-card {
    padding: 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.action-card:active {
    transform: scale(0.95);
}

.action-card.taxi {
    background: linear-gradient(135deg, #ffcc00 0%, #ff9500 100%);
    color: #432e00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

.action-card.delivery {
    background: linear-gradient(135deg, #00f3ff 0%, #00a8b3 100%);
    color: #00363d;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.action-card i {
    font-size: 24px;
}

/* Carousel / Guide Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.see-all {
    color: var(--secondary-lilac);
    font-size: 14px;
    text-decoration: none;
}

.scroll-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.business-card {
    min-width: 160px;
    background: var(--card-bg);
    border-radius: 18px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: 0.3s;
}

.business-card:hover {
    border-color: var(--secondary-lilac);
    transform: translateY(-5px);
}

.business-card img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 10px;
}

.business-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.business-card p {
    font-size: 12px;
    color: var(--text-dim);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 125px;
    /* Ajuste fino de +10px total respecto a v46 */
    background: linear-gradient(to top, rgba(5, 5, 10, 1), rgba(15, 10, 30, 0.95));
    /* Degradado más rico */
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(190, 150, 255, 0.2);
    /* Borde más sutil */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 10000;
    /* Asegurar que esté por encima de casi todo */
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.8);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    /* Texto un poco más legible */
    transition: all 0.3s;
    cursor: pointer;
    flex: 1;
    padding: 15px 0;
    /* Más área de clic */
}

.nav-item.active {
    color: var(--secondary-lilac);
    transform: translateY(-5px);
}

.nav-item i {
    font-size: 25px;
    /* Iconos un 10% más pequeños acorde a la barra */
    margin-bottom: 4px;
}



/* Details Overlay */
.details-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 2000;
    padding: 25px;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.details-overlay.active {
    display: flex;
    animation: fadeInUp 0.4s ease forwards;
}

.back-btn {
    background: none;
    border: none;
    color: var(--secondary-lilac);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    cursor: pointer;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content>* {
    animation: fadeInUp 0.5s ease forwards;
}

/* TikTok Style Feed */
.tiktok-feed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    background: #000;
    z-index: 500;
    scrollbar-width: none;
}

.tiktok-feed::-webkit-scrollbar {
    display: none;
}

.tiktok-post {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #000;
}

.tiktok-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    background: #000;
}

.tiktok-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 120px 20px 110px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

.tiktok-info {
    color: white;
    max-width: 80%;
    pointer-events: auto;
}

.user-tag {
    font-weight: 800;
    font-size: 16px;
    /* Slightly smaller */
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.post-desc {
    font-size: 15px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tiktok-actions {
    position: absolute;
    right: 15px;
    top: 50%;
    /* Middle height as requested */
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    z-index: 10;
    pointer-events: auto;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /* Better spacing to avoid overlap */
    color: white;
    cursor: pointer;
    opacity: 0.6;
    /* Higher transparency */
    transition: 0.2s;
}

.action-item:hover {
    opacity: 1;
}

.action-item i {
    font-size: 26px;
    /* Slightly smaller for premium look */
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.7));
}

.action-item i.liked {
    color: #ff2d55;
    animation: heartPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-item span {
    font-size: 12px;
    font-weight: 700;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Centered Rectangular FAB - Robust Centering */
.floating-post-btn {
    position: fixed;
    left: 0;
    right: 0;
    margin: 0 auto;
    bottom: 60px;
    /* Raised 10px more */
    width: 70px;
    /* Slightly wider */
    height: 48px;
    background: linear-gradient(135deg, rgba(186, 150, 255, 0.4) 0%, rgba(140, 48, 155, 0.4) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 11000;
    cursor: pointer;
    opacity: 0.6;
    /* More transparent as requested */
    transition: all 0.2s ease;
}

.floating-post-btn:active {
    transform: scale(0.92);
}

/* Comments Sheet */
.comment-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: 75vh;
    background: #1a0b2e;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    z-index: 10000;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--glass-border);
}

/* Mines Goopi - Casino Style */
.mines-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    padding: 20px;
}

.mines-container {
    background: linear-gradient(135deg, #1a0b2e 0%, #05050a 100%);
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    border: 2px solid var(--secondary-lilac);
    padding: 25px;
    text-align: center;
    box-shadow: 0 0 40px rgba(190, 150, 255, 0.3);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.mine-cell {
    aspect-ratio: 1/1;
    background: rgba(186, 150, 255, 0.1);
    border: 1px solid rgba(186, 150, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mine-cell:active {
    transform: scale(0.9);
}

.mine-cell.revealed-diamond {
    background: linear-gradient(135deg, #00f3ff 0%, #00a8b3 100%);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
    border: none;
    animation: popIn 0.3s ease-out;
}

.mine-cell.revealed-mine {
    background: linear-gradient(135deg, #ff2d55 0%, #8b0000 100%);
    box-shadow: 0 0 15px rgba(255, 45, 85, 0.5);
    border: none;
    animation: shake 0.3s ease;
}

.mines-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.mines-btn {
    width: 100%;
    padding: 16px;
    border-radius: 15px;
    border: none;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.mines-btn-primary {
    background: linear-gradient(135deg, var(--secondary-lilac) 0%, #8c309b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(186, 150, 255, 0.4);
}

.mines-btn-cashout {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #4a3b00;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Animations */
@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.comment-sheet.active {
    bottom: 0;
}

.comment-list {
    flex: 1;
    overflow-y: auto;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: none;
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--secondary-lilac);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 14px;
}

.comment-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 15px;
    color: white;
}

.comment-content b {
    display: block;
    font-size: 13px;
    color: var(--secondary-lilac);
    margin-bottom: 4px;
}

.comment-input-area {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px 15px;
    color: white;
    outline: none;
}

.badge-gooper {
    background: var(--secondary-lilac);
    color: white;
}

/* Dynamic Info Popup Overlay - Enhanced Centering */
.popup-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease, background-color 0.4s ease;
}

.popup-overlay.active {
    display: flex;
    opacity: 1;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
}

.popup-content {
    background: linear-gradient(135deg, rgba(30, 11, 46, 0.98) 0%, rgba(10, 10, 20, 0.98) 100%);
    border: 1px solid rgba(186, 150, 255, 0.3);
    border-radius: 24px;
    width: 320px;
    max-width: 95vw;
    height: 480px;
    padding: 10px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    
    /* Configuración inicial para la animación */
    opacity: 0;
    transform: scale(0.7) translateY(40px);
}

.popup-overlay.active .popup-content {
    animation: bounceUpPopup 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s forwards;
}

@keyframes bounceUpPopup {
    from {
        transform: scale(0.7) translateY(40px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: 0.3s;
    z-index: 100001;
}

/* Popup Image Forced Aspect Ratio 2:3 */
.popup-img {
    width: 300px !important;
    height: 450px !important;
    /* Relación 2:3 (300 x 1.5) */
    display: block !important;
    border-radius: 15px;
    object-fit: cover;
    /* Asegura que llene el espacio 2:3 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    opacity: 1 !important;
    visibility: visible !important;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 20000; /* Por encima de bottom-nav (10000) */
    padding: 20px;
    display: none;
    flex-direction: column;
}

.search-overlay.active {
    display: flex;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
}

.search-header input {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 12px 15px;
    color: white;
    outline: none;
    font-size: 16px;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 80px; /* Padding extra para que el scroll supere el teclado u otros elementos */
}

.search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.search-item img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.search-item h4 {
    font-size: 14px;
    color: white;
}

/* --- MESSAGING SYSTEM --- */
.chat-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.chat-list-item:active {
    transform: scale(0.98);
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-lilac);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--glass-border);
}

.chat-info {
    flex: 1;
}

.chat-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.chat-info p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    text-align: right;
    font-size: 10px;
    color: var(--text-dim);
}

.chat-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
}

.chat-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 150px;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.4;
    position: relative;
}

.message-bubble.sent {
    align-self: flex-end;
    background: var(--secondary-lilac);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(190, 150, 255, 0.3);
}

.message-bubble.received {
    align-self: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: white;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 5px;
    display: block;
    text-align: right;
}

.chat-input-container {
    padding: 15px 20px calc(15px + env(safe-area-inset-bottom, 0px));
    background: #000;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40000;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    outline: none;
    font-size: 15px;
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--secondary-lilac);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(190, 150, 255, 0.4);
}

.unread-badge {
    background: #ff2d55;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Streak Fire Dynamics */
[class^="streak-fire-"] {
    filter: drop-shadow(0 0 5px currentColor);
    animation: firePulse 1.5s infinite ease-in-out;
}

.streak-fire-1, .streak-fire-2 { color: #00f3ff; } /* Cyan Cold */
.streak-fire-3, .streak-fire-4 { color: var(--secondary-lilac); } /* Lilac */
.streak-fire-5, .streak-fire-6 { color: #ffcc00; } /* Yellow */
.streak-fire-7, .streak-fire-8 { color: #ff8c00; } /* Orange */
.streak-fire-9, .streak-fire-10 { 
    color: #ff2d55; 
    animation: firePulse 0.8s infinite ease-in-out, shake 0.5s infinite;
} /* Red Super Hot */

@keyframes firePulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 10px currentColor); }
}

/* Reward Overlay */
.reward-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 50000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.reward-overlay.active {
    display: flex;
    opacity: 1;
}

.reward-content {
    background: linear-gradient(135deg, #1a0b2e 0%, #050510 100%);
    border: 2px solid var(--secondary-lilac);
    border-radius: 35px;
    padding: 40px 30px;
    width: 320px;
    text-align: center;
    box-shadow: 0 0 50px rgba(186, 150, 255, 0.4);
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reward-overlay.active .reward-content {
    transform: scale(1);
}

.reward-fire {
    font-size: 80px;
    margin-bottom: 20px;
}

.reward-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, var(--secondary-lilac));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reward-amount {
    font-size: 48px;
    font-weight: 900;
    color: white;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.reward-btn {
    width: 100%;
    padding: 18px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, var(--secondary-lilac) 0%, #8c309b 100%);
    color: white;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.confetti-emoji {
    position: fixed;
    top: -50px;
    font-size: 24px;
    z-index: 50001;
    animation: fall linear forwards;
    pointer-events: none;
}

/* Reels Map Markers */
.reels-custom-icon {
    background: none !important;
    border: none !important;
}

.reel-marker-anim {
    animation: markerPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes markerPop {
    from { transform: scale(0) translateY(20px); opacity: 0; }
    to { opacity: 1; }
}

@keyframes fall {
    to { transform: translateY(110vh) rotate(360deg); }
}

/* ===== CARRUSEL DE FOTOS TÁCTIL (DETALLES COMERCIALES) ===== */
.carrusel-contenedor {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #000;
}

.carrusel-fotos {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: all 0.3s ease;
}

.carrusel-fotos::-webkit-scrollbar {
    display: none;
}

.carrusel-slide {
    min-width: 100%;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carrusel-slide img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.carrusel-indicadores {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
}

.carrusel-indicadores .punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.carrusel-indicadores .punto.activo {
    background: var(--secondary-lilac);
    transform: scale(1.3);
    box-shadow: 0 0 8px var(--secondary-lilac);
}