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

:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --background-color: #f5f5f5;
    --chat-bg: #ffffff;
    --user-msg-bg: #4285f4;
    --assistant-msg-bg: #e8eaed;
    --text-dark: #202124;
    --text-light: #5f6368;
    --border-color: #dadce0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--chat-bg);
}

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    z-index: 10;
}

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

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
}

.clear-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.clear-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

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

.history-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.recommend-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.recommend-btn:hover {
    background-color: #3367d6;
}

.recommend-btn svg {
    flex-shrink: 0;
}

/* Image Upload Button */
.image-upload-btn {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.image-upload-btn:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.image-upload-btn.has-image {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.image-upload-btn svg {
    flex-shrink: 0;
}

/* Image Preview */
.image-preview-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--background-color);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    position: relative;
}

.image-preview-container.hidden {
    display: none;
}

.image-preview-container img {
    max-height: 120px;
    max-width: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.image-remove-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Message with image */
.message-image {
    max-width: 300px;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.message.user .message-image {
    margin-left: auto;
}

/* History Panel */
.history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

/* Restaurant Configuration Panel */
.config-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.config-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 201;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.config-panel.active {
    right: 0;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--primary-color);
    color: white;
}

.config-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.config-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.config-close-btn:hover {
    opacity: 1;
}

.config-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.config-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1.5rem 0;
}

.config-restaurant-list {
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.config-restaurant-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.config-empty-message {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 2rem 1rem;
}

.config-restaurant-item {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background-color: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.config-restaurant-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.config-restaurant-cuisine {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}

.config-restaurant-travel {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.full-width {
    width: 100%;
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
}

.recommend-location-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.recommend-location-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.history-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 101;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.history-panel.active {
    right: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--primary-color);
    color: white;
}

.history-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.history-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.history-close-btn:hover {
    opacity: 1;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.history-empty {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 1rem;
}

.history-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.history-item:hover {
    background-color: var(--background-color);
}

.history-item-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.history-item-model {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.history-item-count {
    font-size: 0.75rem;
    color: var(--text-light);
}

.history-notice {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.history-notice p {
    margin: 0;
    color: #1565c0;
    font-size: 0.875rem;
}

.history-notice-hint {
    margin-top: 0.25rem !important;
    font-size: 0.75rem !important;
    opacity: 0.8;
}

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

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

.user-selector label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.user-selector select {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
}

.user-selector select:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.user-selector select option {
    background-color: var(--primary-color);
    color: white;
}

.add-user-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.add-user-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

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

.language-toggle {
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.lang-btn.active {
    background-color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 0.25rem;
}

.nav-tab {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-tab:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-tab.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.header-right-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Views */
.view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.view.hidden {
    display: none;
}

.model-selector label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.model-selector select {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
}

.model-selector select:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.model-selector select option {
    background-color: var(--primary-color);
    color: white;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
}

.welcome-message {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-light);
}

.welcome-message h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.welcome-message p {
    margin-bottom: 0.5rem;
}

.welcome-message .example {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 8px;
    font-style: italic;
    color: var(--text-dark);
}

.message {
    display: flex;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-in;
}

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

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message.user .message-content {
    background-color: var(--user-msg-bg);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background-color: #d3d7dc;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #d3d7dc;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 75px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: var(--text-light);
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.input-container {
    padding: 1rem 1.5rem;
    background-color: var(--chat-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.input-row {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    flex: 1;
    background-color: var(--background-color);
    border-radius: 24px;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
}

#messageInput {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    min-height: 24px;
    max-height: 120px;
    padding: 0.25rem 0;
    line-height: 1.5;
}

.send-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.send-btn:hover:not(:disabled) {
    background-color: #3367d6;
}

.send-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

.error-message {
    background-color: #fce8e6;
    color: #d93025;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #d93025;
}

/* Restaurants View */
.restaurants-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.restaurants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.restaurants-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.add-restaurant-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.add-restaurant-btn:hover {
    background-color: #3367d6;
}

/* Restaurant Form */
.restaurant-form-container {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.restaurant-form-container.hidden {
    display: none;
}

.restaurant-form h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.form-group.flex-2 {
    flex: 2;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.btn-primary:hover {
    background-color: #3367d6;
}

.btn-secondary {
    background-color: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

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

.btn-fast-fill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.2);
    font-weight: 500;
    white-space: nowrap;
}

.btn-fast-fill:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4091 100%);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.btn-fast-fill:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(102, 126, 234, 0.2);
}

.btn-fast-fill:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-fast-fill .octopus-icon {
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
    animation: octopus-wave 2s ease-in-out infinite;
}

.btn-fast-fill .btn-text {
    line-height: 1;
}

@keyframes octopus-wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* Fast Fill Confirmation Dialog */
.fast-fill-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.fast-fill-dialog-content {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.fast-fill-dialog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.fast-fill-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fast-fill-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.fast-fill-option:hover {
    border-color: #ff6b9d;
    background-color: #fff5f8;
}

.fast-fill-option.selected {
    border-color: #ff6b9d;
    background-color: #fff5f8;
}

.fast-fill-option-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.fast-fill-option-address {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.fast-fill-option-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.fast-fill-dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Fast Fill Autocomplete */
.fast-fill-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
}

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

.fast-fill-autocomplete-item:last-child {
    border-bottom: none;
}

.fast-fill-autocomplete-item:hover {
    background-color: #fff5f8;
}

.fast-fill-autocomplete-item-name {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.fast-fill-autocomplete-item-address {
    font-size: 0.75rem;
    color: var(--text-light);
}

.fast-fill-recognized {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    min-height: 1.25rem;
}

.fast-fill-recognized.recognized {
    color: var(--secondary-color);
}

.fast-fill-recognized.resolving {
    color: var(--text-light);
    font-style: italic;
}

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

.restaurants-empty {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
}

.restaurant-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: box-shadow 0.2s;
}

.restaurant-card:hover {
    box-shadow: var(--shadow);
}

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

.restaurant-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.restaurant-name-alt {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.restaurant-cuisine {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

.restaurant-summary {
    font-size: 0.875rem;
    color: var(--text-dark);
    line-height: 1.5;
    white-space: pre-wrap;
}

.restaurant-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.edit-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.edit-btn:hover {
    background-color: #e3f2fd;
}

.delete-btn {
    background: none;
    border: none;
    color: #d93025;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.delete-btn:hover {
    background-color: #fce8e6;
}

/* Travel Time Controls */
.travel-time-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--background-color);
    border-radius: 8px;
    flex-wrap: wrap;
}

.maps-notice {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(217, 48, 37, 0.25);
    background: rgba(217, 48, 37, 0.06);
    border-radius: 10px;
}

.maps-notice-title {
    font-weight: 600;
    color: #a50e0e;
    margin-bottom: 0.25rem;
}

.maps-notice-body {
    font-size: 0.875rem;
    color: var(--text-dark);
    line-height: 1.35;
}

.maps-notice-reason {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.35rem;
}

.maps-notice-dismiss {
    flex-shrink: 0;
    background: white;
    border: 1px solid rgba(217, 48, 37, 0.25);
    color: #a50e0e;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.maps-notice-dismiss:hover {
    background: rgba(217, 48, 37, 0.08);
}

.travel-mode-selector {
    display: flex;
    gap: 0.25rem;
}

.travel-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    color: var(--text-light);
}

.travel-mode-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.travel-mode-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.travel-mode-btn svg {
    flex-shrink: 0;
}

.starting-location {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 180px;
}

.starting-location-input {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.starting-location-provider {
    flex-shrink: 0;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-light);
    user-select: none;
}

.starting-location-provider.google,
.starting-location-provider.backend {
    border-color: rgba(52, 168, 83, 0.35);
    background: rgba(52, 168, 83, 0.08);
    color: #137333;
}

.starting-location-provider.manual {
    border-color: rgba(217, 48, 37, 0.25);
    background: rgba(217, 48, 37, 0.06);
    color: #a50e0e;
}

.starting-location-resolved {
    font-size: 0.75rem;
    color: var(--text-light);
    min-height: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.starting-location input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 0;
}

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

/* Google Places Autocomplete styling */
.starting-location gmp-place-autocomplete {
    flex: 1;
    min-width: 0;
    --gmpx-color-surface: white;
    --gmpx-color-on-surface: var(--text-color);
    --gmpx-color-on-surface-variant: var(--text-light);
    --gmpx-color-primary: var(--primary-color);
}

.starting-location gmp-place-autocomplete input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    box-sizing: border-box;
}

.starting-location gmp-place-autocomplete input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.geolocation-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    flex-shrink: 0;
}

.geolocation-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.geolocation-btn.active {
    background-color: #e8f5e9;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.travel-time-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.travel-time-btn:hover:not(:disabled) {
    background-color: #2e7d32;
}

.travel-time-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Travel Time Badge on Cards */
.travel-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.travel-time-badge.hidden {
    display: none;
}

.travel-time-badge.loading {
    background-color: #e3f2fd;
    color: #1565c0;
}

.travel-time-badge.error {
    background-color: #fce8e6;
    color: #d93025;
}

.travel-time-badge.no-coords {
    background-color: #fff3e0;
    color: #e65100;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .config-panel {
        width: 100%;
        right: -100%;
    }

    .config-panel.active {
        right: 0;
    }

    .config-body {
        padding: 1rem;
    }

    .header {
        padding: 0.75rem 1rem;
    }

    .header-top {
        margin-bottom: 0.5rem;
    }

    .header-title h1 {
        font-size: 1.25rem;
    }

    .clear-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }

    .history-btn {
        padding: 0.375rem;
    }

    .history-panel {
        width: 280px;
        right: -280px;
    }

    .history-panel.active {
        right: 0;
    }

    .model-selector {
        flex-wrap: wrap;
    }

    .model-selector select {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .chat-container {
        padding: 1rem;
    }

    .message-content {
        max-width: 85%;
        font-size: 0.95rem;
    }

    .input-container {
        padding: 0.75rem 1rem;
    }

    .welcome-message {
        padding: 2rem 1rem;
    }

    .welcome-message h2 {
        font-size: 1.5rem;
    }

    .header-controls {
        flex-direction: column;
        gap: 0.75rem;
    }

    .header-right-controls {
        width: 100%;
        justify-content: space-between;
    }

    .nav-tabs {
        width: 100%;
    }

    .nav-tab {
        flex: 1;
        text-align: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .restaurants-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .add-restaurant-btn {
        width: 100%;
    }

    .travel-time-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .travel-mode-selector {
        width: 100%;
        justify-content: space-between;
    }

    .travel-mode-btn {
        flex: 1;
        justify-content: center;
    }

    .travel-mode-btn span {
        display: none;
    }

    .starting-location {
        width: 100%;
    }

    .travel-time-btn {
        width: 100%;
    }
}

/* Scrollbar styling */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}
