/* ==========================================================================
   1. RESET E LAYOUT BASE
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F9FAFB;
    -webkit-font-smoothing: antialiased;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header Principale (Sticky con effetto Blur) */
.header-main {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 4px solid #000000;
}

/* Logo Geo:Flirt */
.logo { 
    font-size: 1.5rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    font-style: italic; 
    letter-spacing: -0.05em;
}
.logo span { color: #ef4444; }

/* ==========================================================================
   2. NAVIGAZIONE (Navbar)
   ========================================================================== */

.nav-link {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-style: italic;
    color: #4B5563;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #000000;
}

.btn-speed {
    background-color: #FF6B00;
    color: white !important;
    padding: 0.7rem 1.8rem;
    border-radius: 9999px;
    font-weight: 900;
    text-transform: uppercase;
    font-style: italic;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px -5px rgba(255, 107, 0, 0.4);
    border: none;
}

.btn-speed:hover {
    background-color: #000000;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   3. MAPPA E PROMO MARQUEE
   ========================================================================== */

#map { 
    height: 480px; 
    width: 100%; 
    border-radius: 0 !important; 
    background: #E5E7EB; 
    border-bottom: 4px solid #000;
}

/* Animazione Banner Scorrevole Promo */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee { 
    display: flex; 
    animation: marquee 25s linear infinite; 
}

.map-legend {
    position: absolute;
    bottom: 25px;
    left: 15px;
    background: rgba(255, 255, 255, 1);
    border: 2px solid #000;
    padding: 8px 16px;
    z-index: 10;
    display: flex;
    flex-direction: row;
    gap: 15px;
    box-shadow: 5px 5px 0px rgba(0,0,0,1);
}

/* ==========================================================================
   4. FEED, CARDS E GATED CONTENT (Blur)
   ========================================================================== */

.feed-container { 
    max-width: 1100px; 
    margin: 4rem auto; 
    padding: 0 1.5rem; 
}

.card { 
    background: white; 
    padding: 1.8rem; 
    border-radius: 2.5rem; 
    border: 2px solid #D1D5DB; 
    position: relative; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

.card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08); 
    border-color: #000000;
}

/* Effetto sfocato per utenti non registrati */
.blur-card { 
    filter: blur(6px); 
    opacity: 0.4; 
    user-select: none; 
    pointer-events: none; 
}

.timer { 
    position: absolute; 
    top: 0; 
    right: 0; 
    background: #FEE2E2; 
    color: #B91C1C; 
    padding: 0.4rem 1.2rem; 
    border-radius: 0 2.5rem 0 1.5rem; 
    font-size: 10px; 
    font-weight: 900; 
    text-transform: uppercase;
}

/* ==========================================================================
   5. MODULI E MODAL (FIX IPHONE & ANIMAZIONI)
   ========================================================================== */

.input-geo {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    padding: 1rem;
    background-color: #FFFFFF !important;
    border: 2px solid #9CA3AF !important;
    border-radius: 1.25rem;
    outline: none;
    font-weight: 700;
    font-size: 16px !important; /* Fix Zoom iPhone */
    transition: all 0.2s ease;
    color: #000000;
}

.input-geo:focus {
    border-color: #000000 !important;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.1) !important;
}

.field-label {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    color: #374151;
    margin-left: 0.5rem;
    margin-bottom: 0.4rem;
    display: block;
    font-style: italic;
}

/* Animazioni Modal d'Ingresso */
.modal-enter { 
    opacity: 1 !important; 
    pointer-events: auto !important; 
}

.modal-content-enter { 
    transform: scale(1) translateY(0) !important; 
    opacity: 1 !important; 
}

/* ==========================================================================
   6. UI CHAT (Popup)
   ========================================================================== */

#chat-box { 
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    width: 350px; 
    height: 500px; 
    display: none; 
    flex-direction: column; 
    background: white; 
    border-radius: 2.5rem; 
    box-shadow: 0 25px 60px rgba(0,0,0,0.25); 
    z-index: 1000; 
    overflow: hidden; 
    border: 2px solid #000000;
}

/* ==========================================================================
   7. ANIMAZIONI E UTILITY
   ========================================================================== */

.timer-urgenza {
    animation: pulse-red 2s infinite;
    background: #FEE2E2 !important;
    color: #EF4444 !important;
}

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

.text-\[8px\], .text-\[9px\], .text-\[10px\], .text-\[11px\] {
    font-size: 12px !important;
    letter-spacing: 0.02em;
    font-weight: 800;
}

/* ==========================================================================
   8. ADMIN DASHBOARD
   ========================================================================== */

.admin-bg { background-color: #F3F4F6; min-height: 100vh; }

.stat-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 2px solid #000;
    box-shadow: 4px 4px 0px rgba(0,0,0,1);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0,0,0,1);
}
/* ==========================================================================
   ADULT MODE OVERRIDES (DARK THEME)
   ========================================================================== */
body.adult-mode {
    background-color: #0a0a0a !important;
    color: #e5e5e5 !important;
}

.adult-mode .bg-white { background-color: #121212 !important; color: #fff !important; }
.adult-mode .text-gray-900 { color: #f3f4f6 !important; }
.adult-mode .text-gray-600, .adult-mode .text-gray-500 { color: #9ca3af !important; }
.adult-mode .border-black { border-color: #333 !important; }
.adult-mode .border-gray-100, .adult-mode .border-gray-200 { border-color: #1f2937 !important; }

/* Accenti Oro/Rosso per Adult Mode */
.adult-mode .text-red-500 { color: #ff3e3e !important; }
.adult-mode .bg-blue-600 { background-color: #b91c1c !important; } /* Trasforma il blu in rosso scuro */
.adult-mode .border-blue-600 { border-color: #b91c1c !important; }
.adult-mode .text-blue-600 { color: #f59e0b !important; } /* Blu diventa Oro */
.adult-mode .bg-blue-50 { background-color: #1a1a1a !important; border-color: #333 !important; }

/* Card e Shadow in Adult Mode */
.adult-mode .card, .adult-mode .bg-white.p-8 {
    background: #161616 !important;
    border-color: #262626 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

.adult-mode .input-geo {
    background-color: #0f0f0f !important;
    border-color: #333 !important;
    color: white !important;
}

.adult-mode .nav-link { color: #9ca3af !important; }
.adult-mode .nav-link:hover { color: #fff !important; }

/* Radar Map Adult Mode */
.adult-mode #map {
    border-bottom-color: #b91c1c !important;
    background: #000 !important;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 640px) {
    #chat-box {
        width: calc(100% - 40px) !important;
        right: 20px !important;
        left: 20px !important;
        bottom: 20px !important;
        height: 80vh !important;
    }
}
