body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#map { 
    width: 100%; 
    height: calc(100vh - 80px); 
    margin-top: 80px;
}

/* Fixed Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.app-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
}

/* Login Modal */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.modal-content h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.modal-content p {
    margin: 0 0 1.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #333;
    background-color: #f5f5f5;
}

.tab-btn.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

.login-form input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin: 0.25rem;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #2196F3;
    color: white;
}

.btn-secondary:hover {
    background-color: #1976D2;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: #f44336;
    color: white;
}

.btn-small:hover {
    background-color: #d32f2f;
}

.info-text {
    margin-top: 1rem;
    text-align: center;
}

.info-text small {
    color: #666;
    font-size: 0.8rem;
}

/* User Info Bar */
.user-info {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info span {
    color: white;
    font-weight: 500;
}

/* Travel Stats */
.travel-stats {
    display: flex;
    gap: 1.5rem;
    margin-right: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Share Button */
.btn-share {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.btn-share:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.share-icon {
    font-size: 1rem;
}

/* Share Modal Styles */
.share-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.map-preview {
    width: 100%;
    height: 120px;
    background: #e9ecef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

/* Stats Container */
.stats-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
    margin: 10px;
}

.share-stats .stat-item {
    text-align: center;
    flex: 1;
}

.share-stats .stat-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4CAF50;
    display: block;
}

.share-stats .stat-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Share Modal Centering and Styling */
#showShareModal {
    display: none !important;
}

#showShareModal.show {
    display: block !important;
}

#showShareModal .modal-dialog {
    margin: 0.25rem auto;
    max-width: 500px;
    width: 90%;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}

#showShareModal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#showShareModal .modal-header {
    border-bottom: 1px solid #e9ecef;
}

#showShareModal .modal-title {
    font-weight: 600;
    color: #333;
}

#showShareModal .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 8rem);
}

/* Custom scrollbar for modal body */
#showShareModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#showShareModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#showShareModal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#showShareModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

#showShareModal .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    background: none;
    border: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#showShareModal .btn-close:hover {
    opacity: 1;
}

#showShareModal .btn-close:focus {
    box-shadow: none;
    opacity: 1;
}

/* Social Media Icon Buttons Container */
.social-buttons-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Social Media Icon Buttons */
.social-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-icon-btn:active {
    transform: translateY(0);
}

/* Individual Social Media Button Colors */
#shareTwitter {
    background: #1da1f2;
    color: white;
}

#shareTwitter:hover {
    background: #0d8bd9;
    color: white;
}

#shareFacebook {
    background: #1877f2;
    color: white;
}

#shareFacebook:hover {
    background: #0d5bb8;
    color: white;
}

#shareLinkedIn {
    background: #0077b5;
    color: white;
}

#shareLinkedIn:hover {
    background: #005885;
    color: white;
}

#shareWhatsApp {
    background: #25d366;
    color: white;
}

#shareWhatsApp:hover {
    background: #1ea952;
    color: white;
}

/* Hide modal when user is logged in */
.modal.hidden {
    display: none;
}

/* City boundary styling */
.city-boundary {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.1;
    }
}

/* Image Upload Styles */
.image-upload {
    margin-top: 1rem;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
}

.image-captions {
    margin: 1rem 0;
}

.image-captions input {
    width: 100%;
    padding: 0.5rem;
    margin: 0.25rem 0;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* Image Gallery on Hover */
.image-gallery {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 300px;
    display: none;
}

.image-gallery h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
}

.image-gallery .gallery-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.image-gallery .gallery-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-gallery .gallery-images img:hover {
    transform: scale(1.1);
}

.image-gallery .upload-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
}

.image-gallery .upload-btn:hover {
    background: #45a049;
}

/* Country Hover UI */
.country-hover-ui {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
    display: none;
    pointer-events: none;
}

.country-hover-ui.show {
    display: block;
    pointer-events: auto;
}


.country-hover-ui h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
}

.country-hover-ui .image-count {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.country-hover-ui .action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.country-hover-ui .action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.country-hover-ui .action-btn.primary {
    background: #4CAF50;
    color: white;
}

.country-hover-ui .action-btn.primary:hover {
    background: #45a049;
}

.country-hover-ui .action-btn.secondary {
    background: #2196F3;
    color: white;
}

.country-hover-ui .action-btn.secondary:hover {
    background: #1976D2;
}

.country-hover-ui .action-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Image Gallery Modal */
.image-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.image-gallery-modal.show {
    display: flex;
}

.image-gallery-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

.image-gallery-content .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
}

.image-gallery-content .close-btn:hover {
    background: #d32f2f;
}

.image-gallery-content h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-gallery-item .image-caption {
    padding: 0.5rem;
    background: #f8f9fa;
    font-size: 0.9rem;
    color: #666;
}

.image-gallery-item .delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(244, 67, 54, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
}

.image-gallery-item .delete-btn:hover {
    background: rgba(244, 67, 54, 1);
}

.upload-section {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.upload-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

.upload-section .file-input {
    margin-bottom: 1rem;
}

.upload-section .file-input input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.upload-section .upload-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.upload-section .upload-btn:hover {
    background: #45a049;
}

.upload-section .upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}