/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background-color: #0f172a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #000000;
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #1e293b;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
    color: #ffffff;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: #1e293b;
    border: 2px solid #334155;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.nav-btn:hover {
    background: #334155;
    border-color: #475569;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.nav-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #1e293b;
    border-color: #334155;
}

/* Authentication Styles */
.auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Burger Menu Button */
.burger-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-line {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.burger-menu-btn.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu-btn.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #1e293b;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid #334155;
}

.mobile-sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #334155;
}

.sidebar-header h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.close-sidebar-btn:hover {
    color: #ffffff;
}

.sidebar-nav {
    padding: 1rem 0;
    border-bottom: 1px solid #334155;
}

.sidebar-nav-btn {
    width: 100%;
    background: none;
    border: none;
    color: #ffffff;
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.sidebar-nav-btn:hover {
    background: #334155;
}

.sidebar-nav-btn.active {
    background: #475569;
    border-right: 3px solid #ffffff;
}

.sidebar-nav-btn i {
    width: 20px;
    text-align: center;
}

.sidebar-auth {
    padding: 1.5rem;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.mobile-user-info .user-avatar {
    width: 60px;
    height: 60px;
}

.mobile-user-info .user-name {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.auth-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.google-btn {
    background: #1e293b;
    color: #ffffff;
    border: 2px solid #334155;
}

.google-btn:hover {
    background: #334155;
    border-color: #475569;
    transform: translateY(-1px);
}

.signout-btn {
    background: #1e293b;
    color: #ffffff;
    border: 2px solid #334155;
}

.signout-btn:hover {
    background: #334155;
    border-color: #475569;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #334155;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.user-name {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Auth Required Message */
.auth-required-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: #1e293b;
    border-radius: 15px;
    border: 2px dashed #334155;
}

.auth-required-content {
    text-align: center;
    padding: 2rem;
}

.auth-required-content i {
    font-size: 3rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.auth-required-content h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.auth-required-content p {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Main Content */
.main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #334155;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #1e293b;
    color: #ffffff;
}

.search-box input:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

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

.filter-container select {
    padding: 1rem 1.5rem;
    border: 2px solid #334155;
    border-radius: 25px;
    font-size: 1rem;
    background: #1e293b;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-container select:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.filter-container select option {
    background: #1e293b;
    color: #ffffff;
}

/* Content Sections */
.content-section {
    display: none;
}

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

/* Map Container */
.map-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    height: 600px;
    background: #1e293b;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 15px 0 0 15px;
}

.places-sidebar {
    background: #0f172a;
    padding: 1.5rem;
    overflow-y: auto;
    border-radius: 0 15px 15px 0;
    border-left: 1px solid solid #334155;
}

.places-sidebar h3 {
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
}

.places-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.place-item {
    background: #1e293b;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #334155;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    color: #ffffff;
}

.place-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border-color: #ffffff;
}

.place-item.active {
    border-color: #ffffff;
    background: #334155;
    color: #ffffff;
}

.place-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.place-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.place-item p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

.place-category {
    display: inline-block;
    background: #334155;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.place-item.active .place-category {
    background: #475569;
    color: #ffffff;
}

/* Add Place Section */
.add-place-container {
    max-width: 600px;
    margin: 0 auto;
    background: #1e293b;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid #334155;
}

.add-place-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
}

.add-place-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #ffffff;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 1rem;
    border: 2px solid #334155;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #0f172a;
    color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group small {
    color: #94a3b8;
    font-size: 0.9rem;
}

.form-group select option {
    background: #0f172a;
    color: #ffffff;
}

.submit-btn {
    background: #1e293b;
    color: #ffffff;
    border: 2px solid #334155;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    background: #334155;
    border-color: #475569;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1e293b;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid #334155;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.9);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.close:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.close:active {
    transform: scale(0.95);
}

.close:focus {
    outline: 3px solid rgba(59, 130, 246, 0.8);
    outline-offset: 2px;
}

.modal-place-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.modal-place-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.modal-place-category {
    display: inline-block;
    background: #334155;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.modal-place-descriptions {
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}


.modal-place-author {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    color: #ffffff;
    margin-bottom: 1rem;
    border-left: 4px solid #334155;
    border: 1px solid #334155;
}

.modal-place-date {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    color: #ffffff;
    margin-bottom: 1rem;
    border-left: 4px solid #334155;
    border: 1px solid #334155;
    font-size: 0.9rem;
}

.modal-place-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.modal-place-images img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-place-images img:hover {
    transform: scale(1.05);
}

/* Loading Spinner */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    color: #ffffff;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #334155;
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background: #000000;
    color: #ffffff;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid #1e293b;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Header adjustments */
    .header-content {
        justify-content: space-between;
        align-items: center;
    }
    
    /* Hide desktop navigation and auth */
    .desktop-nav,
    .desktop-auth,
    .desktop-language {
        display: none;
    }
    
    /* Show burger menu */
    .burger-menu-btn {
        display: flex;
    }
    
    /* Logo adjustments */
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    /* Map container - stack vertically */
    .map-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }
    
    #map {
        height: 300px;
        border-radius: 15px;
    }
    
    .places-sidebar {
        height: auto;
        border-radius: 15px;
        border-left: none;
        border-top: 1px solid #334155;
    }
    
    .places-sidebar h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    /* Search container - full width */
    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .search-box input {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .filter-container select {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Place items - more compact */
    .place-item {
        padding: 0.75rem;
    }
    
    .place-item img {
        height: 100px;
    }
    
    .place-item h4 {
        font-size: 1rem;
    }
    
    .place-item p {
        font-size: 0.85rem;
    }
    
    .place-category {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
    }
    
    .close {
        right: 1rem;
        top: 1rem;
        font-size: 2.5rem;
        width: 3rem;
        height: 3rem;
    }
    
    .modal-place-image {
        height: 200px;
    }
    
    .modal-place-title {
        font-size: 1.3rem;
    }
    
    .modal-place-descriptions {
        font-size: 0.9rem;
    }
    
    /* Form adjustments */
    .add-place-container {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .add-place-container h2 {
        font-size: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Auth required message */
    .auth-required-message {
        min-height: 250px;
    }
    
    .auth-required-content {
        padding: 1.5rem;
    }
    
    .auth-required-content i {
        font-size: 2.5rem;
    }
    
    .auth-required-content h3 {
        font-size: 1.2rem;
    }
    
    .auth-required-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Smaller logo */
    .logo {
        font-size: 1.3rem;
    }
    
    .logo i {
        font-size: 1.3rem;
    }
    
    /* Smaller burger menu */
    .burger-menu-btn {
        width: 35px;
        height: 35px;
    }
    
    .burger-line {
        width: 20px;
        height: 2px;
    }
    
    /* Smaller sidebar */
    .mobile-sidebar {
        width: 280px;
    }
    
    /* Smaller map */
    #map {
        height: 250px;
    }
    
    /* More compact place items */
    .place-item {
        padding: 0.6rem;
    }
    
    .place-item img {
        height: 80px;
    }
    
    .place-item h4 {
        font-size: 0.9rem;
    }
    
    .place-item p {
        font-size: 0.8rem;
    }
    
    /* Smaller modal */
    .modal-content {
        margin: 2% auto;
        width: 98%;
        padding: 1rem;
    }
    
    .close {
        right: 0.75rem;
        top: 0.75rem;
        font-size: 2rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .modal-place-image {
        height: 150px;
    }
    
    .modal-place-title {
        font-size: 1.2rem;
    }
    
    /* Smaller form */
    .add-place-container {
        margin: 0 0.5rem;
        padding: 1rem;
    }
    
    .add-place-container h2 {
        font-size: 1.3rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Auth required message */
    .auth-required-message {
        min-height: 250px;
    }
    
    .auth-required-content {
        padding: 1.5rem;
    }
    
    .auth-required-content i {
        font-size: 2.5rem;
    }
    
    .auth-required-content h3 {
        font-size: 1.2rem;
    }
    
    .auth-required-content p {
        font-size: 0.9rem;
    }
}

/* Error and Success Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background: #064e3b;
    color: #10b981;
    border: 1px solid #065f46;
}

.message.error {
    background: #7f1d1d;
    color: #f87171;
    border: 1px solid #991b1b;
}

/* Custom Scrollbar */
.places-sidebar::-webkit-scrollbar {
    width: 6px;
}

.places-sidebar::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 3px;
}

.places-sidebar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.places-sidebar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
