/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4285F4;
    --primary-hover: #3b76db;
    --bg-color: #f8f9fa;
    --text-color: #202124;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --danger: #ea4335;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

/* Glassmorphism utility */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Top Navigation */
.top-nav {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-radius: 30px;
    z-index: 1000;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #4285F4, #34A853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-container {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 25px;
    padding: 5px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
    transform: translateY(-2px);
}

.animated-search {
    border: none;
    outline: none;
    padding: 10px;
    width: 100%;
    font-size: 1rem;
    background: transparent;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #5f6368;
    padding: 5px;
    transition: color 0.3s ease;
}

.icon-btn:hover {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-greeting {
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-block;
    text-align: center;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.3);
}

.outline-btn {
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
}

.outline-btn:hover {
    background-color: var(--text-color);
    color: white;
}

.w-100 {
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Map area */
main, #map {
    width: 100vw;
    height: 100vh;
}

#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background-image: url('https://user-images.githubusercontent.com/11250/39013954-f5091c3a-43e6-11e8-9cac-37cf8e8c8e4e.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    z-index: 1;
}

/* Directions Panel */
#directions-panel {
    position: absolute;
    top: 100px;
    left: 20px;
    width: 350px;
    border-radius: 20px;
    overflow: hidden;
    z-index: 1000;
    animation: slideIn 0.4s ease forwards;
}

.hidden {
    display: none !important;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-body input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    font-size: 0.95rem;
}

.panel-body input:focus {
    border-color: var(--primary-color);
}

.route-details {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

/* Auth Pages */
.auth-bg {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.auth-container h2 {
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--text-color);
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    outline: none;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

.input-group input:focus {
    background: #fff;
    border-color: var(--primary-color);
}

.auth-link {
    margin-top: 20px;
    font-size: 0.9rem;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.error {
    color: var(--danger);
    background: rgba(234, 67, 53, 0.1);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Dashboard */
.dashboard-bg {
    background: #f0f2f5;
}

.dashboard-container {
    display: flex;
    height: calc(100vh - 80px); /* 60px nav + 20px top */
    margin-top: 80px;
    padding: 20px;
    gap: 20px;
}

.sidebar {
    width: 350px;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 15px;
}

.locations-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.locations-list::-webkit-scrollbar {
    width: 6px;
}

.locations-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.location-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.location-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.loc-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.loc-info p {
    font-size: 0.8rem;
    color: #666;
}

.loc-actions {
    display: flex;
    gap: 10px;
}

.view-btn {
    background: var(--primary-color);
    color: white;
}

.delete-btn {
    background: var(--danger);
    color: white;
}

.main-map {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--glass-shadow);
}

.dashboard-map {
    width: 100%;
    height: 100%;
    background-image: url('https://user-images.githubusercontent.com/11250/39013954-f5091c3a-43e6-11e8-9cac-37cf8e8c8e4e.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    min-height: 500px;
}

.no-data {
    text-align: center;
    color: #888;
    margin-top: 50px;
}

/* Info Window */
.info-window h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-window p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .top-nav {
        width: 95%;
        border-radius: 15px;
        top: 10px;
    }
    .search-container {
        display: none;
    }
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: 300px;
    }
}
