* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 700px;
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.registration-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header i {
    font-size: 48px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

.registration-form {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

label i {
    margin-right: 8px;
    color: #667eea;
    width: 20px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

input::placeholder {
    color: #999;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.location-container {
    display: flex;
    gap: 10px;
}

.location-container input {
    flex: 1;
}

.location-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.location-btn:active {
    transform: translateY(0);
}

.location-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.location-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.error-message {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}

.success-message {
    display: block;
    color: #27ae60;
    font-size: 13px;
    margin-top: 6px;
}

.input-error {
    border-color: #e74c3c !important;
    background: #fff5f5 !important;
}

.input-success {
    border-color: #27ae60 !important;
}

.success-card {
    display: none;
    text-align: center;
    padding: 60px 30px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-card.show {
    display: block;
}

.success-card i {
    font-size: 80px;
    color: #27ae60;
    margin-bottom: 20px;
}

.success-card h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 28px;
}

.success-card p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .header i {
        font-size: 40px;
    }

    .registration-form {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .location-container {
        flex-direction: column;
    }

    .location-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }

    .header p {
        font-size: 14px;
    }

    .registration-form {
        padding: 25px 15px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        padding: 12px 14px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* Loading Animation */
.form-loading {
    pointer-events: none;
    opacity: 0.6;
}

.form-loading .submit-btn {
    background: #999;
}

/* Map Modal Styles */
.map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.map-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.map-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.map-search-container {
    position: relative;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.map-search-input {
    width: 100%;
    padding: 14px 45px 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.map-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.map-container {
    width: 100%;
    height: 450px;
    background: #f0f0f0;
}

.map-info {
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
}

.map-info i {
    color: #667eea;
    font-size: 16px;
}

.map-modal-actions {
    padding: 20px 25px;
    display: flex;
    gap: 15px;
    border-top: 2px solid #f0f0f0;
}

.map-action-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.map-action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.map-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.map-action-btn.secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.map-action-btn.secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.map-action-btn:active {
    transform: translateY(0);
}

.map-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Google Maps Autocomplete Dropdown Styling */
.pac-container {
    border-radius: 10px;
    margin-top: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pac-item {
    padding: 12px 15px;
    border-top: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 14px;
}

.pac-item:hover {
    background: #f8f9fa;
}

.pac-item-query {
    font-size: 15px;
    color: #333;
}

/* Responsive Design for Map Modal */
@media (max-width: 768px) {
    .map-modal {
        padding: 10px;
    }

    .map-modal-content {
        max-height: 95vh;
        border-radius: 15px;
    }

    .map-modal-header {
        padding: 15px 20px;
        border-radius: 15px 15px 0 0;
    }

    .map-modal-header h3 {
        font-size: 18px;
    }

    .map-search-container {
        padding: 15px 20px;
    }

    .map-container {
        height: 350px;
    }

    .map-modal-actions {
        flex-direction: column;
        padding: 15px 20px;
    }

    .map-action-btn {
        width: 100%;
    }

    .search-icon {
        right: 35px;
    }
}

@media (max-width: 480px) {
    .map-modal-header h3 {
        font-size: 16px;
    }

    .map-container {
        height: 300px;
    }

    .map-info {
        font-size: 13px;
        padding: 12px 20px;
    }

    .close-modal-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* Animation for spinner */
.fa-spin {
    animation: spin 1s linear infinite;
}

/* Leaflet Map Specific Styles */
.leaflet-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
}

.leaflet-popup-content {
    font-size: 14px;
}

/* Hide default Leaflet geocoder control since we have custom search */
.leaflet-control-geocoder {
    display: none;
}

/* Ensure map renders properly */
#map {
    z-index: 1;
}

.leaflet-marker-icon {
    transition: transform 0.3s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.1);
}

/* Search Suggestions Autocomplete */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item i {
    color: #667eea;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.suggestion-item span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.suggestion-item.loading {
    color: #667eea;
    font-style: italic;
    cursor: default;
    justify-content: center;
}

.suggestion-item.loading:hover {
    background: white;
}

.suggestion-item.no-results {
    color: #999;
    font-style: italic;
    cursor: default;
    justify-content: center;
}

.suggestion-item.no-results:hover {
    background: white;
}

/* Responsive suggestions */
@media (max-width: 768px) {
    .search-suggestions {
        max-height: 200px;
    }
    
    .suggestion-item {
        padding: 10px 14px;
    }
    
    .suggestion-item span {
        font-size: 13px;
    }
}

/* Photo Upload Styles */
.photo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-photo-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-photo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.upload-photo-btn:active {
    transform: translateY(0);
}

.photo-preview {
    position: relative;
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #27ae60;
    background: #f8f9fa;
}

.photo-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.remove-photo-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.remove-photo-btn:hover {
    background: rgba(231, 76, 60, 1);
    transform: scale(1.1);
}

.photo-info {
    display: block;
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin-top: 5px;
}

/* Responsive photo upload */
@media (max-width: 768px) {
    .photo-preview {
        max-width: 100%;
    }
    
    .upload-photo-btn {
        width: 100%;
    }
}
