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

:root {
    --primary-color: #2C1810;
    --secondary-color: #5D4037;
    --accent-color: #D4A574;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #e8e4df;
    --border-color: #ddd;
    --success-color: #4CAF50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

#authNav {
    display: flex;
    gap: 1rem;
}

#authNav a {
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

#authNav a:hover {
    color: var(--accent-color);
}

/* Views */
.view {
    display: none;
    min-height: calc(100vh - 60px);
    animation: fadeIn 0.3s;
}

.view.active {
    display: block;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
}

.container-full {
    width: 100%;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Sections */
.section {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* Town Select */
.town-select {
    position: relative;
}

.town-select input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s;
}

.town-select input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.town-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.town-results.active {
    display: block;
}

.town-result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.town-result-item:last-child {
    border-bottom: none;
}

.town-result-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    font-weight: 500;
}

/* Restaurant List */
.restaurant-list {
    display: grid;
    gap: 1rem;
}

.restaurant-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.restaurant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.restaurant-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.restaurant-address {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

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

.rating-stars {
    color: var(--accent-color);
    font-size: 1rem;
}

.rating-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Town List */
.town-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.town-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.town-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.town-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.town-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.town-stars {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.town-rating-value {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.town-stats {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* Review Form Section */
.review-form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.review-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.rating-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.rating-option:hover {
    background-color: var(--bg-light);
}

.rating-option input[type="radio"] {
    margin-right: 0.75rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reviews-list-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.reviews-list-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.review-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.review-card-author {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1rem;
}

.review-card-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.review-card-rating {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: bold;
}

.review-card-text {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 0.95rem;
}

.detail-header {
    margin-bottom: 1.5rem;
}

.detail-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.detail-info {
    margin-bottom: 1rem;
}

.detail-info p {
    margin-bottom: 0.25rem;
    color: var(--text-light);
}

.detail-label {
    font-weight: bold;
    color: var(--primary-color);
}

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

.reviews-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.review-item {
    background: var(--bg-light);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-left: 3px solid var(--secondary-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.review-author {
    font-weight: bold;
}

.review-date {
    color: var(--text-light);
}

.review-rating {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.review-text {
    color: var(--text-dark);
    line-height: 1.5;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-back {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: scale(1.02);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
}

.btn-back {
    background-color: transparent;
    color: var(--primary-color);
    padding: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.btn-back:hover {
    background-color: var(--bg-light);
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.btn-pagination {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--secondary-color);
    color: white;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-pagination:hover:not(:disabled) {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #f9f7f4 0%, #f0ebe4 100%);
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(139, 69, 19, 0.4), inset 0 1px 0 rgba(255,255,255,0.5);
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid var(--secondary-color);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.75rem;
    font-size: 1.8rem;
}

.close {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--primary-color);
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea, select {
    padding: 0.75rem;
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, background-color 0.3s;
    background-color: #fefdfb;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
}

.rating-input {
    margin: 1rem 0;
}

.rating-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

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

.stars input {
    display: none;
}

.stars label {
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.2s;
}

/* Map */
.map-container {
    flex: 1;
    width: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

.map-info {
    background: white;
    padding: 1rem;
    border-top: 2px solid var(--border-color);
}

.map-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.map-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Utility Classes */
.placeholder {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .town-list {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .container {
        padding: 1rem;
    }

    .section {
        padding: 1rem;
    }

    .restaurant-card {
        padding: 0.8rem;
    }

    .restaurant-name {
        font-size: 1rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0.75rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-menu {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.3rem;
    }

    .modal-content {
        width: 100%;
        border-radius: 0;
    }
}

/* Notifications */
.notification {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.notification-message {
    flex: 1;
    word-break: break-word;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
}

.notification-close:active {
    transform: scale(1.1);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* CAPTCHA Grid */
.captcha-grid-item {
    transition: all 0.2s !important;
}

.captcha-grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

.captcha-grid-item.selected {
    border-color: #8B4513 !important;
    background-color: #f0ebe4 !important;
}

/* Google Ads Sidebars */
.main-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 10px;
}

.sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-left,
.sidebar-right {
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#app {
    flex: 1;
}

@media (max-width: 1200px) {
    .sidebar {
        flex: 0 0 250px;
    }
}

@media (max-width: 1024px) {
    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        flex: 1;
        position: static;
        width: 100%;
    }
}
