/* ==========================================================================
   1. RESET E BASE
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { height: 100vh; width: 100vw; overflow: hidden; background: #e0e5ec; color: #2d3436; }
#main-app { width: 100%; height: 100%; position: relative; overflow: hidden; }
#map { height: 100%; width: 100%; z-index: 1; background: #ddd; }

/* ==========================================================================
   2. LANDING PAGE
   ========================================================================== */
#landing-page { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: url('https://images.unsplash.com/photo-1506947411487-a56738267384?q=80&w=1920&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    z-index: 2000; overflow-y: auto; display: flex; flex-direction: column; color: white; 
}
.hero-content { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; flex-shrink: 0; position: relative; z-index: 2; }
.logo-area i { color: #00cec9; margin-bottom: 20px; text-shadow: 0 0 20px rgba(0,206,201,0.5); }
.logo-area h1 { font-size: 3.5rem; line-height: 1; font-weight: 800; letter-spacing: 2px; margin-bottom: 10px; }
.logo-area p { font-size: 1.1rem; color: #b2bec3; font-weight: 300; }
.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); cursor: pointer; opacity: 0.8; }
.bounce-icon { animation: bounceArrow 2s infinite; }
@keyframes bounceArrow { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }
.search-section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; background: rgba(45, 52, 54, 0.95); padding: 20px; position: relative; z-index: 2; }
.search-section h2 { margin-bottom: 30px; font-size: 1.8rem; text-align: center; }

/* BARRA DE BUSCA */
.landing-input-wrapper { width: 95%; max-width: 500px; background: white; border-radius: 30px; padding: 0 5px; display: flex; align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,0.3); position: relative; z-index: 2002; height: 55px; }
.landing-input-wrapper input { border: none; flex: 1; outline: none; font-size: 1.1rem; padding: 0 10px; color: #333; background: transparent; height: 100%; min-width: 0; }
#landing-loc-btn { width: 45px; min-width: 45px; height: 100%; border: none; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #999; cursor: pointer; transition: 0.2s; }
#landing-loc-btn:hover { color: #333; }
#landing-btn { width: 50px; min-width: 50px; height: 100%; border: none; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #00cec9; cursor: pointer; transition: 0.2s; border-radius: 0 30px 30px 0; }
#landing-btn:hover { color: #00b8b4; transform: scale(1.1); }

/* AUTOCOMPLETE */
#landing-suggestions { margin-top: 10px; width: 95%; max-width: 500px; background: white; border-radius: 20px; list-style: none; box-shadow: 0 10px 40px rgba(0,0,0,0.5); overflow: hidden; max-height: 250px; overflow-y: auto; z-index: 2005; position: absolute; top: 50%; transform: translateY(30px); }
#landing-suggestions li { padding: 15px 20px; border-bottom: 1px solid #f8f9fa; font-size: 1rem; color: #2d3436; cursor: pointer; background: white; text-align: left; display: flex; align-items: center; gap: 10px; }
#landing-suggestions li::before { content: '\f3c5'; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #b2bec3; }
#landing-suggestions li:hover { background: #f0f7ff; color: #007bff; }

/* ==========================================================================
   3. APP UI
   ========================================================================== */
#back-home-btn { position: fixed; top: 20px; left: 20px; width: 45px; height: 45px; background: white; border: none; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #333; cursor: pointer; z-index: 1001; }

.center-card { position: absolute; bottom: 0; left: 0; width: 100%; height: 75vh; max-height: 90vh; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); border-radius: 25px 25px 0 0; padding: 20px 15px 5px 15px; z-index: 999; box-shadow: 0 -5px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); touch-action: none; user-select: none; }
#card-content { flex: 1; overflow-y: auto; margin-top: 10px; padding-bottom: 30px; padding-right: 5px; -webkit-overflow-scrolling: touch; }
#card-content::-webkit-scrollbar { width: 4px; }
#card-content::-webkit-scrollbar-track { background: transparent; }
#card-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

.drag-handle-bar { width: 40px; height: 5px; background-color: #dfe6e9; border-radius: 10px; margin: 0 auto 5px auto; display: block; cursor: grab; }
.card-header { cursor: grab; padding-bottom: 5px; border-bottom: 1px solid rgba(0,0,0,0.05); margin-bottom: 5px; }
.card-header:active { cursor: grabbing; }
.card-header h2 { font-size: 1.4rem; color: #2d3436; margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-header p { color: #007bff; font-weight: 600; font-size: 0.8rem; margin-bottom: 5px; }

.tabs-nav { display: flex; gap: 10px; margin-bottom: 15px; padding: 5px; background: #f1f2f6; border-radius: 12px; }
.tab-btn { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 8px; font-weight: 600; color: #636e72; cursor: pointer; transition: 0.3s; font-size: 0.9rem; }
.tab-btn.active { background: white; color: #00cec9; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.card-scroll-indicator {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    width: 35px; height: 35px; background: rgba(255,255,255,0.9);
    border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center;
    color: #6c5ce7; font-size: 1.2rem; cursor: pointer;
    opacity: 0; transition: opacity 0.3s ease; pointer-events: none; /* Invisível por padrão */
    z-index: 100;
}
.card-scroll-indicator.visible { opacity: 1; pointer-events: auto; }

.big-data { display: flex; justify-content: center; align-items: center; gap: 15px; margin: 5px 0; }
.big-data h1 { font-size: 3rem; line-height: 1; font-weight: 700; color: #2d3436; }
.big-data img { width: 60px; }
#description { font-size: 1rem; text-transform: capitalize; color: #636e72; margin-bottom: 10px; }
.drone-badge { background: #f1f2f6; color: #2d3436; padding: 8px; border-radius: 8px; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 10px; text-align: center; }

/* INDICADOR DE VENTO PRINCIPAL (AO LADO DA TEMP) */
.main-wind-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #636e72;
}
#main-wind-arrow {
    font-size: 1.8rem;
    color: #00cec9; /* Cor de destaque */
    transition: transform 0.5s ease;
    margin-bottom: 2px;
}
#main-wind-text {
    font-size: 0.8rem;
    font-weight: 800;
}

/* BOTÕES DE AÇÃO */
.action-buttons-container { display: flex; gap: 8px; margin-bottom: 15px; justify-content: center; }
.action-btn { flex: 1; border: none; border-radius: 8px; padding: 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer; color: white; display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.action-btn:active { transform: scale(0.95); }
.action-btn.google { background: #4285F4; }
.action-btn.whatsapp { background: #25D366; }
.action-btn.email { background: #555; }

.flight-dashboard, .wind-profile-container { background: #2d3436; color: white; border-radius: 12px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.section-header { font-size: 0.7rem; color: #b2bec3; font-weight: 700; text-transform: uppercase; margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.safe-hours-vertical { display: flex; flex-direction: column; gap: 5px; max-height: 120px; overflow-y: auto; padding-right: 2px; }
.hour-list-item { display: flex; justify-content: space-between; padding: 8px; border-radius: 6px; font-size: 0.8rem; background: rgba(255,255,255,0.05); color: #ccc; cursor: pointer; }
.item-safe { background: #55efc4; color: #006266; }
.item-warning { background: #ffeaa7; color: #b7791f; }
.hour-list-item.selected { border: 2px solid #fff; }
.proa-box { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.05); border-radius: 10px; padding: 10px; min-height: 60px; }
#proa-arrow { font-size: 1.5rem; color: #ffeaa7; transition: 0.5s; margin: 0; }
.dir-text-yellow { font-size: 1rem; font-weight: 800; color: #ffeaa7; }
#proa-time-ref { display: none; }

.altitude-grid { font-size: 0.8rem; display: flex; flex-direction: column; gap: 4px; }
.alt-header, .alt-row { display: grid; grid-template-columns: 0.8fr 1fr 1.2fr 0.5fr; gap: 5px; padding: 5px; }
.alt-header { color: #aaa; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.5px; }
.alt-row { background: rgba(255,255,255,0.05); border-radius: 6px; align-items: center; }
.alt-label { text-align: left; }
.alt-temp { color: #81ecec; text-align: center; }
.alt-val { text-align: right; }
.alt-dir { text-align: center; }
.alt-safe { border-left: 3px solid #55efc4; } 
.alt-warning { border-left: 3px solid #ffeaa7; } 
.alt-danger { border-left: 3px solid #ff7675; }

.grid-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; background: white; padding: 10px; border-radius: 15px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.detail-item { display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; transition: transform 0.1s; }
.detail-item:active { transform: scale(0.95); }
.icon-wrapper { position: relative; display: inline-block; }
.info-badge-item { position: absolute; top: -5px; right: -8px; font-size: 0.7rem; color: #0984e3; background: white; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.info-badge-header { margin-left: auto; color: #0984e3; cursor: pointer; font-size: 0.9rem; opacity: 0.8; transition: opacity 0.2s; }
.info-badge-header:hover { opacity: 1; }

.detail-item i { font-size: 1.1rem; margin-bottom: 2px; }
.detail-item p { font-size: 0.6rem; color: #888; margin: 0; text-transform: uppercase; }
.detail-item span { font-weight: 700; color: #333; font-size: 0.85rem; }
.timeline-container { border-top: 1px solid #eee; padding-top: 10px; }
.time-buttons-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.time-btn { padding: 6px 12px; background: white; border: 1px solid #ddd; border-radius: 10px; min-width: 70px; font-size: 0.8rem; color: #555; }
.time-btn.active { background: #007bff; color: white; border-color: #007bff; }
.time-btn.status-safe { border-left: 3px solid #2ed573; }
.time-btn.status-warning { border-left: 3px solid #ffa502; }
.time-btn.status-danger { border-left: 3px solid #ff4d4d; }

.toggle-btn { position: absolute; top: 15px; right: 15px; left: auto; transform: none; width: 32px; height: 32px; background: rgba(0,0,0,0.05); border: none; border-radius: 50%; cursor: pointer; color: #555; font-size: 1rem; display: flex; align-items: center; justify-content: center; z-index: 1001; transition: all 0.3s ease; }

@keyframes bounceBtnAnim { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px); } 60% { transform: translateY(-4px); } }

.center-card.minimized { width: 60px; height: 60px; border-radius: 50%; padding: 0; overflow: hidden; background: white; position: fixed; bottom: 120px !important; left: 50% !important; transform: translateX(-50%) !important; top: auto !important; box-shadow: 0 10px 25px rgba(0,0,0,0.3); z-index: 2000; }
.center-card.minimized > *:not(#toggle-card) { display: none; }
.center-card.minimized #toggle-card { width: 100%; height: 100%; top: 0; right: 0; left: 0; background: #00cec9; color: white !important; font-size: 1.5rem; border-radius: 50%; }
@keyframes bounceArrowUp { 0%, 100% { transform: rotate(180deg) translateY(0); } 50% { transform: rotate(180deg) translateY(5px); } }
.center-card.minimized #toggle-card i { animation: bounceArrowUp 1.5s infinite ease-in-out; }

.solar-card { background: white; border-radius: 15px; padding: 15px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 10px; }
.solar-header { font-weight: 700; color: #555; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.solar-body { display: flex; align-items: center; gap: 15px; }
.kp-display { background: #2d3436; color: white; border-radius: 12px; padding: 10px; min-width: 80px; text-align: center; }
.kp-display span { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1; }
.kp-display small { font-size: 0.7rem; text-transform: uppercase; color: #b2bec3; }
.kp-info p:first-child { font-weight: 700; color: #333; margin-bottom: 2px; }
.info-box { background: #e1f5fe; color: #0277bd; padding: 10px; border-radius: 8px; font-size: 0.8rem; display: flex; gap: 8px; align-items: flex-start; }

.forecast-scroller { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.forecast-item { background: #f8f9fa; border-radius: 10px; padding: 10px; min-width: 90px; text-align: center; border: 1px solid #eee; display: flex; flex-direction: column; align-items: center; }
.forecast-date { font-size: 0.7rem; color: #888; margin-bottom: 5px; }
.forecast-val { font-size: 1.2rem; font-weight: 800; color: #2d3436; }
.forecast-kp-label { font-size: 0.6rem; color: #b2bec3; }

@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(0, 206, 201, 0.7); border-color: #00cec9; transform: scale(1); } 50% { box-shadow: 0 0 0 10px rgba(0, 206, 201, 0); border-color: #00cec9; transform: scale(1.05); } 100% { box-shadow: 0 0 0 0 rgba(0, 206, 201, 0); border-color: #00cec9; transform: scale(1); } }
.blink-active { animation: pulseGlow 1.5s infinite; border: 2px solid #00cec9 !important; font-weight: 800; color: #00cec9 !important; }

/* TABLET/DESKTOP */
@media (min-width: 768px) {
    #back-home-btn { top: 30px; left: 30px; width: 50px; height: 50px; }
    .center-card { top: 50%; left: 50%; transform: translate(-50%, -50%); bottom: auto; width: 420px; height: auto; max-height: 85vh; border-radius: 24px; padding: 25px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); }
    .center-card.minimized { width: 60px; height: 60px; top: auto !important; bottom: 30px !important; left: 50%; transform: translateX(-50%); border-radius: 50%; }
    .big-data h1 { font-size: 4rem; } .big-data img { width: 80px; } .card-header h2 { font-size: 1.6rem; }
    .flight-dashboard { flex-direction: row; } .flight-section-dir { border-left: 1px solid rgba(255,255,255,0.1); padding-left: 10px; } .flight-divider { display: block; width: 1px; background: rgba(255,255,255,0.1); }
    .proa-box { flex-direction: column; justify-content: center; height: 100%; } #proa-arrow { font-size: 2rem; margin-bottom: 5px; } #proa-time-ref { display: block; }
    .toggle-btn { top: 15px; right: 15px; left: auto; transform: none; background: rgba(0,0,0,0.05); box-shadow: none; width: 32px; height: 32px; }
}

/* TELA DE LOGIN (Estilos movidos do HTML para cá) */
#login-container {
    display: block;
    width: 100%; height: 100%; 
    background: url('Tela_Inicial.png') no-repeat center center;
    background-size: cover;
    padding: 0;
    position: fixed; top: 0; left: 0; z-index: 9999; overflow-y: auto;
    scroll-behavior: smooth;
}

.login-bg-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(45, 52, 54, 0.7), rgba(45, 52, 54, 0.95));
    z-index: 1;
}

.login-card {
    width: 100%; max-width: 340px; background: white;
    border-radius: 16px; padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative; z-index: 2;
}