* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #FF431E;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #f5f5f5;
    color: #333;
    overflow: hidden;
}

/* Menu bar styles - shared across all pages */
.top-menu-bar {
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%) !important;
    border-bottom: 2px solid #ff6600;
    padding: 0.5rem 0;
    position: sticky !important;
    top: 0;
    z-index: 1000 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
}

.menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.menu-logo-section {
    flex-shrink: 0;
    display: block !important;
    visibility: visible !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.menu-logo-link {
    display: flex !important;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: inherit;
    padding: 0;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.menu-logo-link:hover {
    transform: none;
    background: none !important;
    opacity: 0.9;
}

.menu-logo-img {
    height: 50px !important;
    width: auto !important;
    max-width: 200px !important;
    min-width: 120px !important;
    object-fit: contain !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.menu-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.2;
}

.logo-main {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff6600;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(255,102,0,0.2);
}

.logo-tagline {
    font-size: 0.7rem;
    color: #888;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.menu-items {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    flex: 1;
    justify-content: center;
    padding: 0 1rem;
}

.menu-link {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    position: relative;
}

.menu-link:hover {
    color: #ff6600;
    background: rgba(255,102,0,0.08);
}

.menu-link:active {
    transform: scale(0.98);
}

.menu-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.65rem;
    margin-left: 0.3rem;
    transition: transform 0.3s;
    display: inline-block;
}

.menu-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 200px;
    display: none;
    padding: 0.5rem 0;
    margin-top: 0;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.65rem 1.25rem;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: #fff5f0;
    color: #ff6600;
    border-left-color: #ff6600;
    padding-left: 1.5rem;
}

.menu-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.menu-signin {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.menu-signin:hover {
    color: #ff6600;
    background: rgba(255,102,0,0.08);
}

.user-icon {
    font-size: 1.1rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-reviews {
    background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
    color: white;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255,102,0,0.3);
    border: none;
    cursor: pointer;
}

.btn-add-reviews:hover {
    background: linear-gradient(135deg, #e55a00 0%, #ff6600 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255,102,0,0.4);
    transform: translateY(-1px);
}

.btn-add-reviews:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255,102,0,0.3);
}

.plus-icon {
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1;
    display: inline-block;
}

/* Responsive Menu */
@media (max-width: 1200px) {
    .menu-items {
        gap: 0;
    }
    
    .menu-link {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 1024px) {
    .menu-container {
        gap: 1.5rem;
    }
    
    .menu-items {
        gap: 0;
    }
    
    .menu-link {
        font-size: 0.8rem;
        padding: 0.6rem 0.6rem;
    }
    
    .logo-main {
        font-size: 1.2rem;
    }
    
    .logo-tagline {
        font-size: 0.65rem;
    }
}

@media (max-width: 768px) {
    .menu-container {
        flex-wrap: wrap;
        padding: 0.5rem 1rem;
        gap: 1rem;
    }
    
    .menu-logo-img {
        height: 35px;
        max-width: 35px;
    }
    
    .logo-main {
        font-size: 1.1rem;
    }
    
    .logo-tagline {
        font-size: 0.6rem;
    }
    
    .menu-items {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0.5rem 0;
        gap: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .menu-items::-webkit-scrollbar {
        height: 4px;
    }
    
    .menu-items::-webkit-scrollbar-thumb {
        background: #ff6600;
        border-radius: 2px;
    }
    
    .menu-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .menu-actions {
        gap: 0.5rem;
    }
    
    .menu-signin span:last-child {
        display: none;
    }
    
    .menu-signin {
        padding: 0.5rem;
    }
    
    .btn-add-reviews {
        padding: 0.55rem 1rem;
        font-size: 0.8rem;
    }
    
    .plus-icon {
        font-size: 1.1rem;
    }
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

header {
    background: #fff;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 1000;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1976d2;
}

.search-controls {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100%;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.search-box label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.4;
}

#searchInput,
#locationNameInput,
#categoryNameInput {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    color: #333;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#searchInput::placeholder,
#locationNameInput::placeholder,
#categoryNameInput::placeholder {
    color: #999;
    font-size: 0.95rem;
}

#searchInput:focus,
#locationNameInput:focus,
#categoryNameInput:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.btn-clear {
    position: absolute;
    right: 8px;
    top: calc(1.26rem + 0.5rem + 0.75rem + 0.6rem);
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #999;
    padding: 0;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.btn-clear:hover {
    background: #f5f5f5;
    color: #666;
}

#categoryFilter {
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.radius-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radius-control label {
    font-size: 0.9rem;
    color: #666;
}

#radiusInput {
    width: 100px;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.btn-location {
    padding: 0.75rem 1.5rem;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-location:hover {
    background: #1565c0;
}

.btn-add {
    padding: 0.75rem 1.5rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

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

.btn-search {
    padding: 0.75rem 1.75rem;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.2);
    margin-top: 1.75rem;
    height: fit-content;
}

.btn-search .search-icon {
    font-size: 1.1rem;
    display: inline-block;
    line-height: 1;
}

.btn-search:hover {
    background: #e55a00;
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
    transform: translateY(-1px);
}

.btn-search:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.2);
}

.map-container {
    flex: 1;
    position: relative;
    min-height: 400px;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background-color: #e0e0e0;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    z-index: 1000;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1976d2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.error {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #f44336;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-width: 90%;
}

.error.hidden {
    display: none;
}

.info-and-details {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    padding: 0 2rem 1rem 2rem;
}

.info-panel {
    background: white;
    padding: 1rem 1.5rem;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    max-height: 220px;
    overflow-y: auto;
    flex: 1;
}

.info-panel h3 {
    margin-bottom: 0.5rem;
    color: #1976d2;
}

#locationList {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.location-item {
    background: #f5f5f5;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, border-color 0.2s;
    border: 2px solid transparent;
    font-size: 0.9rem;
}

.location-item:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    transform: translateY(-1px);
}

.location-item.active {
    background: #1976d2;
    color: white;
}

/* Hide bottom results + side details panel (user wants only map popup) */
.info-and-details {
    display: none;
}

/* Details panel (right side) */
.details-panel {
    background: white;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
    padding: 1rem;
    border-radius: 12px;
    max-width: 360px;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    position: relative;
}

.details-panel.hidden {
    display: none;
}

.details-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #666;
}

.details-content h2 {
    margin: 0 0 0.5rem 0;
    color: #1976d2;
    font-size: 1.1rem;
}

.details-meta {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.details-address {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.details-rating {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.5rem;
}

.details-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    object-fit: cover;
    max-height: 160px;
}

.details-links a {
    color: #1976d2;
    font-size: 0.85rem;
    text-decoration: none;
}

.details-links a:hover {
    text-decoration: underline;
}

/* Custom Modal Styles - for non-Bootstrap modals only */
.custom-modal {
    display: flex;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.custom-modal.hidden {
    display: none;
}

.custom-modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.custom-modal-content h2 {
    margin-bottom: 1.5rem;
    color: #1976d2;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1976d2;
}

.btn-small {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-small:hover {
    background: #e0e0e0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-submit {
    flex: 1;
    padding: 0.75rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

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

.btn-cancel {
    flex: 1;
    padding: 0.75rem;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }
    
    .search-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .btn-search {
        margin-top: 0;
        width: 100%;
        justify-content: center;
    }
    
    .search-box,
    #categoryFilter,
    .radius-control,
    .btn-location,
    .btn-add {
        width: 100%;
    }
    
    header {
        padding: 1rem;
    }
    
    .info-and-details {
        flex-direction: column;
        padding: 0 1rem 1rem 1rem;
    }
    
    .info-panel {
        max-height: 150px;
    }

    .details-panel {
        max-height: none;
        max-width: 100%;
    }
    
    .custom-modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

