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

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #1a237e;
    --primary-light: #283593;
    --accent-color: #f4b960;
    --accent-dark: #d4a050;
    --text-dark: #1a237e;
    --text-light: #546e7a;
    --text-lighter: #90a4ae;
    --bg-light: #f5f5f5;
    --border-color: rgba(26, 35, 126, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    overflow-x: hidden;
    padding-top: 0;
}

/* ==================== HEADER ==================== */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.site-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

.logo-placeholder {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, white 0%, #f0f0f0 100%);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

.header-title h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.header-title p {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

#auth-buttons {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.nav-btn-primary:hover {
    background-color: var(--accent-dark);
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.profile-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
    display: none;
    overflow: hidden;
    margin-top: 8px;
}

.profile-menu.show {
    display: block;
    animation: slideDown 0.2s ease;
}

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

.profile-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.profile-menu a:last-child {
    border-bottom: none;
}

.profile-menu a:hover {
    background-color: var(--bg-light);
    color: var(--accent-color);
}

/* ==================== SEARCH BAR ==================== */
.search-container {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.search-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

#search_bar {
    flex: 1;
    min-width: 200px;
    height: 42px;
    padding: 0 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    font-size: 15px;
    transition: all 0.2s ease;
}

#search_bar::placeholder {
    color: var(--text-lighter);
}

#search_bar:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

#search_button {
    padding: 0 20px;
    height: 42px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

#search_button:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

#nearby_button {
    padding: 0 16px;
    height: 42px;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

#nearby_button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

#nearby_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#search_button:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#search_button:active {
    transform: translateY(0);
}

/* ==================== FILTER SECTION ==================== */
.filter-section {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    position: relative;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.filter-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.tag-filter-container {
    background-color: white;
}

.tag-filter-container h3 {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-filter-container {
    background-color: white;
    margin-top: 15px;
}

.rating-filter-container h3 {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-button {
    padding: 6px 14px;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-button:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tag-button.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
}

.tag-button.active:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.rating-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.rating-button {
    padding: 6px 14px;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.rating-button:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.rating-button.active {
    background-color: #ffd700;
    border-color: #ffd700;
    color: var(--primary-color);
    font-weight: 600;
}

.rating-button.active:hover {
    background-color: #ffed4e;
    border-color: #ffed4e;
}
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.category {
    margin: 50px 0;
}

.category:first-of-type {
    margin-top: 80px;
}

.section-header {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}

.section-description {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.results-info {
    font-size: 13px;
    color: var(--text-lighter);
}

.featured-section .section-header h2 {
    font-size: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== ROWS & CARDS ==================== */
.row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.row::-webkit-scrollbar {
    height: 6px;
}

.row::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.row::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.row::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 35, 126, 0.3);
}

.row.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    overflow: visible;
    padding-bottom: 0;
}

.card {
    position: relative;
    flex: 0 0 auto;
    width: 200px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.row.search-grid .card {
    width: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.card:hover .poster {
    transform: scale(1.08);
}

.poster {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: block;
    transition: transform 0.3s ease;
}

.info {
    padding: 14px;
    background: white;
}

.company-name {
    font-size: 14px;
    margin: 0 0 8px 0;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.stars {
    color: var(--accent-color);
    font-size: 12px;
    margin-bottom: 8px;
    letter-spacing: 2px;
    line-height: 1;
}

.meta {
    font-size: 12px;
    color: var(--text-light);
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta:before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.meta:first-of-type:before {
    display: none;
}

/* Favorite Button */
.card-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(4px);
}

.card-favorite:hover {
    background: white;
    transform: scale(1.15);
    box-shadow: var(--shadow-lg);
}

.card-favorite:active {
    transform: scale(0.95);
}

.card.favorited {
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.2);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.close {
    color: var(--text-dark);
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 2001;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--accent-color);
    background-color: var(--bg-light);
    transform: scale(1.1);
}

#modalContent {
    padding: 40px;
}

.business-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.business-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.business-info-header {
    flex: 1;
}

.modal-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    flex-shrink: 0;
}

.modal-favorite-btn,
.modal-delete-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.modal-favorite-btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.modal-favorite-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-delete-btn {
    background-color: #c62828;
    color: white;
}

.modal-delete-btn:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.business-title {
    font-size: 32px;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    font-weight: 700;
    line-height: 1.2;
}

.business-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.business-rating .stars {
    font-size: 18px;
    color: var(--accent-color);
    letter-spacing: 3px;
    margin: 0;
}

.business-rating .review-count {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
}

.business-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text-light);
    font-size: 15px;
    word-break: break-word;
    line-height: 1.5;
}

.detail-value a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.detail-value a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.business-description {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    color: var(--text-light);
    line-height: 1.7;
    font-size: 15px;
}

.discounts-section {
    margin-bottom: 30px;
}

.discount-item {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.discount-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.discount-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 16px;
    margin-bottom: 8px;
}

.discount-description {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.discount-code {
    color: #2e7d32;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    font-family: 'Courier New', monospace;
}

.discount-expiry {
    color: var(--text-lighter);
    font-size: 12px;
    margin-top: 6px;
}

.reviews-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.reviews-title {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 700;
}

.review-item {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.2s ease;
}

.review-item:hover {
    box-shadow: var(--shadow-sm);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.reviewer-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 15px;
}

.review-stars {
    color: var(--accent-color);
    font-size: 14px;
    letter-spacing: 2px;
}

.review-comment {
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 10px;
    font-size: 14px;
}

.review-date {
    color: var(--text-lighter);
    font-size: 12px;
    margin-top: 8px;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: var(--text-lighter);
    font-style: italic;
    font-size: 15px;
}

/* Review Form */
.review-form-section {
    margin-top: 40px;
    padding: 25px;
    background-color: var(--bg-light);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.star-rating-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.star-rating-input label {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
}

.star-input-container {
    display: flex;
    gap: 8px;
    font-size: 28px;
}

.star-input {
    cursor: pointer;
    color: #ccc;
    transition: all 0.2s ease;
    user-select: none;
    padding: 4px;
    border-radius: 4px;
}

.star-input:hover {
    transform: scale(1.2);
    color: var(--accent-color);
}

.star-input.active {
    color: var(--accent-color);
}

.comment-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input label {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
}

.comment-input textarea {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.comment-input textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.submit-review-btn {
    padding: 12px 28px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.submit-review-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.review-form-message {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    min-height: 20px;
}

.login-prompt {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--accent-color);
}

.login-prompt p {
    color: var(--text-dark);
    margin: 0;
    font-size: 15px;
}

.login-prompt a {
    color: var(--primary-light);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.login-prompt a:hover {
    color: var(--accent-color);
}

/* ==================== FOOTER ==================== */
.main-footer {
    background-color: var(--primary-color);
    color: white;
    margin-top: 80px;
    padding: 50px 20px 20px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-content,
.footer-contact,
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-content h3,
.footer-contact h3,
.footer-links h3 {
    color: var(--accent-color);
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.footer-content p,
.footer-contact p,
.footer-links p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.footer-contact a,
.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-contact a:hover,
.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin: 6px 0;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }

    .header-container {
        flex-wrap: wrap;
        padding: 12px 15px;
        gap: 12px;
    }

    .header-title h1 {
        font-size: 18px;
    }

    .header-title p {
        font-size: 11px;
    }

    .nav-buttons {
        gap: 8px;
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }

    #auth-buttons {
        gap: 6px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .search-wrapper {
        padding: 0 10px;
    }

    #search_bar {
        font-size: 14px;
        padding: 0 12px;
        height: 38px;
    }

    #search_button {
        padding: 0 15px;
        height: 38px;
        font-size: 12px;
    }

    .filter-section {
        top: 90px;
        padding: 12px 15px;
    }

    .tag-button {
        padding: 5px 12px;
        font-size: 12px;
    }

    .main-content {
        padding: 0 15px;
    }

    .category {
        margin: 35px 0;
    }

    .section-header h2 {
        font-size: 22px;
    }

    .card {
        width: 160px;
    }

    .row.search-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .poster {
        height: 160px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 95vh;
    }

    #modalContent {
        padding: 25px 20px;
    }

    .business-header {
        flex-direction: column;
        gap: 15px;
    }

    .business-image {
        width: 100%;
        height: 250px;
    }

    .business-title {
        font-size: 24px;
    }

    .business-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal-action-buttons {
        align-items: flex-start;
        width: 100%;
    }

    .row {
        gap: 12px;
    }

    .main-footer {
        padding: 35px 15px 15px;
    }

    .footer-container {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 13px;
    }

    body {
        font-size: 13px;
    }

    .header-container {
        flex-direction: column;
        padding: 10px 12px;
        gap: 10px;
    }

    .logo-link {
        margin-right: 0;
    }

    .header-title {
        width: 100%;
    }

    .header-title h1 {
        font-size: 16px;
    }

    .header-title p {
        font-size: 10px;
    }

    .nav-buttons {
        width: 100%;
        order: 3;
        gap: 6px;
    }

    #auth-buttons {
        flex: 1;
        gap: 4px;
    }

    .nav-btn {
        padding: 5px 10px;
        font-size: 11px;
        flex: 1;
        text-align: center;
    }

    .nav-btn-primary {
        flex: 0 1 auto;
    }

    .search-container {
        padding: 12px 10px;
    }

    .search-wrapper {
        gap: 6px;
        padding: 0;
    }

    #search_bar {
        font-size: 13px;
        padding: 0 10px;
        height: 36px;
        min-width: 150px;
    }

    #search_button {
        padding: 0 12px;
        height: 36px;
        font-size: 11px;
    }

    .filter-section {
        padding: 10px 10px;
    }

    .tag-filter-container h3 {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .tag-buttons {
        gap: 6px;
    }

    .tag-button {
        padding: 4px 10px;
        font-size: 11px;
    }

    .rating-buttons {
        gap: 6px;
    }

    .rating-button {
        padding: 4px 10px;
        font-size: 11px;
    }

    .main-content {
        padding: 0 10px;
        padding-top: 100px;
    }

    .category {
        margin: 25px 0;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .section-description {
        font-size: 12px;
    }

    .card {
        width: 140px;
    }

    .row.search-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }

    .poster {
        height: 140px;
    }

    .info {
        padding: 10px;
    }

    .company-name {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .stars {
        font-size: 11px;
    }

    .meta {
        font-size: 11px;
    }

    .card-favorite {
        width: 34px;
        height: 34px;
        font-size: 16px;
        top: 8px;
        right: 8px;
    }

    .modal-content {
        width: 98%;
        margin: 2% auto;
        max-height: 98vh;
        border-radius: 12px;
    }

    #modalContent {
        padding: 20px 15px;
    }

    .business-title {
        font-size: 20px;
    }

    .business-image {
        height: 200px;
    }

    .close {
        font-size: 28px;
        right: 10px;
        top: 8px;
        width: 36px;
        height: 36px;
    }

    .business-details {
        gap: 12px;
    }

    .review-form-section {
        padding: 15px;
    }

    .star-input-container {
        font-size: 24px;
        gap: 4px;
    }

    .main-footer {
        padding: 25px 10px 10px;
        margin-top: 50px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        font-size: 11px;
    }
}