/* Base styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    height: 100%;
    overflow: hidden;
}

/* Map layout */
#map-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
}

#map {
    width: 100%;
    height: 100%;
}

/* Floating glassmorphism search box */
#search-box {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 360px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#search-box:focus-within {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    padding: 8px 12px;
}

#search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    color: #1e293b;
}

#search-input::placeholder {
    color: #94a3b8;
}

#search-button {
    background: #2563eb;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#search-button:hover {
    background: #1d4ed8;
}

/* Results Dropdown */
#search-results {
    max-height: 250px;
    overflow-y: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: none;
}

.result-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: background-color 0.2s, color 0.2s;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: rgba(37, 99, 235, 0.06);
    color: #2563eb;
}

/* Custom map marker pin */
.custom-div-icon {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #e11d48; /* Rose red */
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.4);
}

.marker-pin::after {
    content: '';
    width: 22px;
    height: 22px;
    margin: 4px 0 0 4px;
    background: #fff;
    position: absolute;
    border-radius: 50%;
}

.custom-div-icon span {
    position: absolute;
    z-index: 10;
    top: -5px;
    left: 0;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    font-size: 16px;
    pointer-events: none;
}

/* Floating Auth Button */
#auth-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#auth-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Card */
.modal-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Header */
.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.modal-header p {
    margin: 6px 0 0 0;
    font-size: 14px;
    color: #64748b;
}

/* Role Selector */
.role-selector {
    display: flex;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.role-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.2s;
}

.role-tab.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Form Type Toggle */
.form-toggle {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 8px;
}

.toggle-tab {
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px 12px;
    position: relative;
    transition: color 0.2s;
}

.toggle-tab.active {
    color: #2563eb;
}

.toggle-tab.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2563eb;
    border-radius: 2px;
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInForm 0.3s ease;
}

@keyframes fadeInForm {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.input-group input {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Submit Button */
.submit-btn {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.submit-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.submit-btn:active {
    transform: scale(0.98);
}

