:root {
    --primary: #3a86ff;
    --primary-hover: #1e6bf2;
    --secondary: #8338ec;
    --bg-dark: #0a0f1a;
    --text-light: #f8f9fa;
    --text-muted: #8d9bb0;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --success: #06d6a0;
    --warning: #ffd166;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

.background-animation {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden;
}
.blurry-orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}
.orb-1 { width: 400px; height: 400px; background: radial-gradient(circle, var(--primary) 0%, transparent 70%); top: -100px; left: -100px; }
.orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, var(--secondary) 0%, transparent 70%); bottom: -100px; right: -50px; animation-delay: -5s; }
.orb-3 { width: 250px; height: 250px; background: radial-gradient(circle, #ff006e 0%, transparent 70%); top: 40%; left: 40%; opacity: 0.3; animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, 80px) scale(0.9); }
}

.container { width: 100%; max-width: 600px; padding: 2rem 1.5rem; z-index: 1; display: flex; flex-direction: column; gap: 2.5rem; }

.hero-section { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; animation: fade-down 0.8s ease-out; }
@keyframes fade-down { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }

.badge {
    background: rgba(255, 255, 255, 0.1); padding: 0.5rem 1rem; border-radius: 2rem; font-size: 0.85rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--glass-border); backdrop-filter: blur(10px);
}

h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; }
.highlight {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle { font-size: 1.1rem; color: var(--text-muted); font-weight: 300; max-width: 90%; }
.subtitle strong { color: var(--warning); font-weight: 600; }

.glass-card {
    background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 20px; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); padding: 2.5rem 2rem; display: flex; flex-direction: column; gap: 2rem; animation: fade-up 1s ease-out; transition: transform 0.3s ease;
}
.glass-card:hover { transform: translateY(-3px); }
@keyframes fade-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.info-banner { display: flex; align-items: center; gap: 1.2rem; background: rgba(58, 134, 255, 0.1); border: 1px solid rgba(58, 134, 255, 0.2); padding: 1rem; border-radius: 12px; }
.info-icon { width: 45px; height: 45px; background: rgba(58, 134, 255, 0.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; flex-shrink: 0; }
.info-text strong { display: block; margin-bottom: 0.2rem; font-size: 1.05rem; }
.info-text p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

.input-group { display: flex; flex-direction: column; gap: 0.8rem; }
.input-group label { font-weight: 600; font-size: 1rem; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 1.2rem; color: var(--text-muted); font-size: 1.1rem; transition: color 0.3s ease; }
.input-wrapper input { width: 100%; padding: 1.2rem 3.5rem 1.2rem 3.5rem; border-radius: 12px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.05); color: white; font-family: inherit; font-size: 1.05rem; outline: none; transition: all 0.3s ease; }
.input-wrapper input:focus { border-color: var(--primary); background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 4px rgba(58, 134, 255, 0.15); }
.input-wrapper input:focus + .input-icon { color: var(--primary); }
.hint { font-size: 0.8rem; color: var(--text-muted); }
.hint b { color: var(--primary); }

/* --- GPS BUTTON STYLES --- */
.btn-gps {
    position: absolute; right: 0.8rem;
    width: 35px; height: 35px; border-radius: 8px; border: none;
    background: rgba(58, 134, 255, 0.15); color: var(--primary); font-size: 1.1rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; outline: none; z-index: 5;
}
.btn-gps:hover { background: var(--primary); color: white; transform: scale(1.05); }
.btn-gps.active { background: var(--success); color: white; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(6, 214, 160, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(6, 214, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(6, 214, 160, 0); } }

/* --- AUTOCOMPLETE LIST STYLES --- */
.autocomplete-list {
    position: absolute; top: calc(100% + 10px); left: 0; width: 100%;
    background: rgba(10, 15, 26, 0.95); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border); border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); padding: 0.5rem 0; list-style: none;
    z-index: 100; max-height: 250px; overflow-y: auto; text-align: left;
    animation: fade-up 0.2s ease-out;
}
.autocomplete-list.hidden { display: none !important; }
.autocomplete-item {
    padding: 0.8rem 1.2rem; cursor: pointer; display: flex; flex-direction: column;
    border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.2s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: rgba(58, 134, 255, 0.15); }
.item-title { font-weight: 600; color: white; font-size: 0.95rem; margin-bottom: 2px; }
.item-desc { font-size: 0.8rem; color: var(--text-muted); }

.action-area { margin-top: 1rem; }
.btn-primary { width: 100%; padding: 1.2rem; border: none; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; font-family: inherit; font-size: 1.1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 0.8rem; transition: all 0.3s ease; box-shadow: 0 10px 20px -10px var(--primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 25px -10px var(--primary); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
    display: inline-flex;  align-items: center; justify-content: center; gap: 0.8rem;
    width: 100%; padding: 1.2rem; border-radius: 12px; background: var(--success); color: #111;
    text-decoration: none; font-weight: 800; font-size: 1rem; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.3); margin-bottom: 0.5rem;
}
.btn-secondary:hover { background: #05b888; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(6, 214, 160, 0.4); }

.btn-ghost { background: transparent; border: none; color: var(--text-muted); font-family: inherit; font-size: 0.95rem; cursor: pointer; transition: color 0.3s ease; text-decoration: underline; margin-top: 10px; }
.btn-ghost:hover { color: white; }

.hidden { display: none !important; }
.loading-state, .result-state { text-align: center; padding: 1rem 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; animation: fade-in 0.5s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255, 255, 255, 0.1); border-left-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-icon { font-size: 3.5rem; color: var(--success); margin-bottom: 0.5rem; }
.result-state h3 { font-size: 1.8rem; color: white; margin-bottom:0; }
.result-state p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.5rem; }

/* Container de Mapa Embutido do Google */
.map-container {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    animation: fade-up 0.8s ease-out;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

footer { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding-bottom: 2rem; }
footer strong { color: white; }
@media (max-width: 600px) { h1 { font-size: 2.2rem; } .glass-card { padding: 1.5rem; } .info-banner { flex-direction: column; text-align: center; } }
