:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --accent: #38bdf8;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --success: #22c55e;
    --error: #ef4444;
    --nav-bg: rgba(30, 41, 59, 0.7);
    /* Glass color */
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll on mobile */
}

/* --- GLASS NAVBAR --- */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 1.5rem;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

/* --- MAIN CONTENT WRAPPER --- */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 15px;
}

.container {
    width: 100%;
    max-width: 450px;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
}

/* --- ANIMATIONS & STYLES --- */
.header h1 {
    font-size: 1.5rem;
    margin: 1rem 0 0.2rem 0;
    letter-spacing: -0.025em;
}

.header p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.icon-pulse {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(56, 189, 248, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

.status-box {
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.loading {
    color: var(--accent);
}

.success {
    color: var(--success);
    border-color: var(--success);
}

.error {
    color: var(--error);
    border-color: var(--error);
}

#map {
    height: 200px;
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: none;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.info-preview {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.info-preview ul {
    text-align: left;
    padding-left: 20px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
    margin-bottom: 1.5rem;
}

.result-item {
    background: rgba(15, 23, 42, 0.4);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-label {
    font-size: 0.65rem;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
}

.result-value {
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-main);
    word-break: break-all;
}

.primary-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
    scale: 0.98;
}

.card-footer-info {
    margin-top: 2rem;
    color: var(--text-dim);
    opacity: 0.5;
}

/* --- GLASS FOOTER --- */
.glass-footer {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-left span {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.creator-text {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--text-main);
    font-size: 1.1rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* --- RESPONSIVE ADJUSTMENTS --- */

/* Mobile & Small Tablets */
@media (max-width: 600px) {
    .nav-container {
        padding: 0.8rem 1rem;
    }

    .logo span {
        font-size: 0.95rem;
        /* Slightly smaller text for logo on mobile */
    }

    .nav-links a {
        margin-left: 1rem;
        font-size: 0.85rem;
    }

    .main-content {
        padding: 20px 10px;
    }

    .card {
        padding: 1.5rem 1rem;
        border-radius: 18px;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        /* Single column for results on mobile */
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer-right {
        flex-direction: column;
        gap: 10px;
    }
}

/* Very Small Devices */
@media (max-width: 380px) {
    .nav-container {
        flex-direction: column;
        /* Stack logo and links if screen is extremely narrow */
        gap: 10px;
    }

    .nav-links {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .nav-links a {
        margin: 0 10px;
    }
}

/* --- UPDATED LOGO STYLES --- */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Balanced spacing between logo and text */
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
}

.logo-img {
    height: 32px;
    /* Fixed height for consistency */
    width: auto;
    /* Maintains aspect ratio */
    border-radius: 6px;
    /* Softens the corners to match your UI */
    object-fit: contain;
    /* Keeps the image crisp */
    image-rendering: -webkit-optimize-contrast;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05);
    /* Subtle interaction effect */
}

/* --- RESPONSIVE LOGO ADJUSTMENTS --- */

@media (max-width: 600px) {
    .nav-container {
        padding: 0.8rem 1rem;
    }

    .logo-img {
        height: 28px;
        /* Slightly smaller for mobile navbar */
    }

    .logo span {
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .logo {
        gap: 8px;
    }

    .logo-img {
        height: 24px;
        /* Minimum size for very small phones */
    }
}

/* --- NAV RIGHT WRAPPER --- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- FLOATING MESSAGE ICON --- */
.msg-float {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(56, 189, 248, 0.15);
    /* Tinted glass */
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 3s ease-in-out infinite;
    backdrop-filter: blur(4px);
}

.msg-float:hover {
    background: var(--accent);
    color: #000;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

/* Float Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 600px) {
    .nav-container {
        padding: 0.8rem 1rem;
    }

    .nav-links {
        display: none;
        /* Hide standard links on mobile to save space */
    }

    .msg-float {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

/* Add this at the end of your styles.css */

/* Fix for Leaflet Map on Mobile */
#map {
    height: 250px;
    /* Increased height for better mobile visibility */
    width: 100%;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: none;
    /* Controlled by JS */
    border: 1px solid rgba(56, 189, 248, 0.3);
    position: relative;
    /* Crucial: Ensures Leaflet tiles stay above the card background */
    z-index: 5;
    /* Prevents the container from collapsing on mobile browsers */
    min-height: 200px;
}

/* Ensure the Leaflet pane itself is visible */
.leaflet-container {
    height: 100% !important;
    width: 100% !important;
}

@media (max-width: 600px) {
    #map {
        height: 220px;
        /* Slightly shorter for smaller screens */
        margin-top: 10px;
    }
}