/* Modern Social App Styles - Douyin/TikTok inspired */
:root {
    --primary: #FE2C55;
    --primary-dark: #E61E45;
    --secondary: #25F4EE;
    --accent: #FF6B8A;
    --bg-primary: #0A0A0A;
    --bg-secondary: #121212;
    --bg-card: #1E1E1E;
    --bg-hover: #252525;
    --text-primary: #FFFFFF;
    --text-secondary: #8A8A8A;
    --text-muted: #5A5A5A;
    --border: #2A2A2A;
    --gradient: linear-gradient(135deg, #FE2C55 0%, #FF6B8A 100%);
    --shadow: 0 8px 32px rgba(254, 44, 85, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header / Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language Switcher */
.lang-switcher {
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

.lang-switcher .btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(254, 44, 85, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-text {
    background: transparent;
    color: var(--primary);
    padding: 10px 16px;
}

.btn-text:hover {
    background: rgba(254, 44, 85, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* Main Content */
main {
    padding-top: 80px;  /* Accounts for fixed navbar height (64px) */
    min-height: 100vh;
}

.main {
    padding-top: 80px;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(254, 44, 85, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    text-align: center;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-badge span {
    color: var(--primary);
    font-weight: 600;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* Features Grid */
.features-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: rgba(254, 44, 85, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 0 40px;  /* 80px for navbar, 40px bottom */
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 28px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    cursor: pointer;
}

.auth-tab.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.15);
}

.form-input:hover:not(:focus) {
    border-color: var(--text-muted);
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-group .form-input {
    flex: 1;
}

.code-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Send Code Button */
.send-code-btn {
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.send-code-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

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

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

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

.alert-error {
    background: rgba(254, 44, 85, 0.15);
    border: 1px solid rgba(254, 44, 85, 0.3);
    color: #FF6B8A;
}

.alert-success {
    background: rgba(37, 244, 238, 0.1);
    border: 1px solid rgba(37, 244, 238, 0.2);
    color: var(--secondary);
}

.alert-icon {
    font-size: 1.1rem;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .features-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 28px;
        margin: 0 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .input-group {
        flex-direction: column;
    }

    .send-code-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-section {
        min-height: auto;
        padding: 30px 0;
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    .hero-section h1 {
        position: relative;
        z-index: 2;
        margin-top: 0;
    }

    .hero-section::before {
        top: 0;
        display: none;
    }

    .navbar .container {
        height: 56px;
    }

    .main {
        padding-top: 80px;
    }

    .self-cook-section {
        padding: 20px 16px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .self-cook-subtitle {
        margin-bottom: 20px;
    }

    .people-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .people-count-display {
        font-size: 0.85rem;
    }

    .menu-results {
        padding: 0 4px;
    }

    .meal-section {
        margin-bottom: 24px;
    }

    .meal-section h3 {
        font-size: 1.1rem;
    }

    .recipe-card {
        padding: 16px;
    }

    .recipe-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

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

    .recipe-category {
        font-size: 0.75rem;
    }

    .recipe-nutrition {
        flex-wrap: wrap;
        gap: 6px;
    }

    .recipe-nutrition span {
        font-size: 0.75rem;
    }

    .mode-switch-tabs {
        width: 100%;
        justify-content: center;
    }

    .mode-tab {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.85rem;
        text-align: center;
    }

    .quick-actions {
        padding: 16px 0;
    }

    .action-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .action-card {
        padding: 16px;
        flex-direction: row;
        gap: 12px;
    }

    .action-icon {
        font-size: 1.5rem;
    }

    .action-title {
        font-size: 0.95rem;
    }

    .action-desc {
        font-size: 0.8rem;
    }
}

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

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

.slide-up {
    animation: slideUp 0.4s ease;
}

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

/* Tofu Block Layout */
.tofu-layout {
    display: flex;
    min-height: calc(100vh - 64px);
    padding-top: 64px;
}

/* Sidebar */
.tofu-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tofu-search {
    position: relative;
}

.tofu-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.tofu-search-input::placeholder {
    color: var(--text-muted);
}

.tofu-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.15);
}

.tofu-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.tofu-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tofu-nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    margin-bottom: 4px;
}

.tofu-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.tofu-nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tofu-nav-item.active {
    background: rgba(254, 44, 85, 0.15);
    color: var(--primary);
}

.tofu-nav-item .nav-icon {
    font-size: 1.1rem;
}

/* Main Content */
.tofu-main {
    flex: 1;
    padding: 32px;
    overflow-x: hidden;
}

.tofu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tofu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tofu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent 0%, var(--primary) 50%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.tofu-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 12px 40px rgba(254, 44, 85, 0.2);
}

.tofu-card:hover::before {
    opacity: 1;
}

.tofu-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.2) 0%, rgba(255, 107, 138, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.tofu-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.tofu-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tofu-card-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(254, 44, 85, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.tofu-card-route-tag {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: #22c55e;
    font-weight: 500;
    margin-left: 6px;
}

.tofu-card.has-route {
    border-color: rgba(34, 197, 94, 0.3);
}

.tofu-card.has-route:hover {
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.2);
}

.tofu-card-author {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tofu-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.tofu-card-actions button {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.tofu-card-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tofu-add-btn {
    width: 100%;
    margin-top: 16px;
    padding: 10px 16px;
    font-size: 0.875rem;
}

.tofu-card.hidden {
    display: none;
}

.tofu-card.highlight .tofu-card-title {
    color: var(--primary);
}

/* No Results */
.tofu-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    display: none;
}

.tofu-no-results.visible {
    display: block;
}

.tofu-no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.tofu-no-results-text {
    font-size: 1rem;
}

/* Mobile Menu Toggle */
.tofu-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--gradient);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(254, 44, 85, 0.4);
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
}

/* Responsive Tofu */
@media (max-width: 1200px) {
    .tofu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .tofu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .tofu-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .tofu-sidebar.open {
        left: 0;
    }

    .tofu-mobile-toggle {
        display: flex;
    }

    .tofu-main {
        padding: 24px 16px;
    }
}

@media (max-width: 600px) {
    .tofu-grid {
        grid-template-columns: 1fr;
    }

    .tofu-main {
        padding: 16px 12px;
    }
}

/* Sidebar Overlay */
.tofu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.tofu-overlay.visible {
    display: block;
}

/* Highlight text style */
.highlight-text {
    background: rgba(254, 44, 85, 0.3);
    color: var(--primary);
    padding: 0 2px;
    border-radius: 2px;
}

/* Home Tabs */
.home-tabs-container {
    padding-top: 64px;
    min-height: 100vh;
}

.home-tabs-nav {
    display: flex;
    gap: 8px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 100;
}

.home-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.home-tab-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.home-tab-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: white;
}

.tab-icon {
    font-size: 1rem;
}

.home-tab-content {
    display: none;
}

.home-tab-content.active {
    display: block;
}

/* Demands Home */
.demands-home-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
}

.demands-home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.demands-home-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demands-home-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demand-home-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.demand-home-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(254, 44, 85, 0.15);
}

.demand-home-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.demand-home-category {
    padding: 4px 10px;
    background: var(--gradient);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.demand-home-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.demand-home-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.demand-home-card-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.demand-home-card-footer {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.demands-home-footer {
    text-align: center;
    margin-top: 24px;
}

.demands-loading,
.demands-empty-home,
.demands-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Location Section */
.location-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
}

.location-status {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.location-status.locating {
    color: var(--secondary);
    border-color: rgba(37, 244, 238, 0.3);
}

.location-status.located {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.location-status.location_denied,
.location-status.location_failed {
    color: var(--primary);
    border-color: rgba(254, 44, 85, 0.3);
}

.nearby-places-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.place-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.2s;
}

.place-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.place-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.place-info {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.place-distance {
    color: var(--primary);
    font-weight: 500;
}

.place-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.place-price {
    color: var(--accent);
    font-weight: 500;
}

.place-address {
    color: var(--text-muted);
}

.place-tel {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.nearby-places-container .loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.nearby-places-container .error {
    text-align: center;
    padding: 20px;
    color: var(--primary);
}

.nearby-places-container .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.location-section .section-title {
    margin-bottom: 16px;
}

/* Mode Switch Tabs */
.mode-switch-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.mode-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-tab:hover {
    color: var(--text-primary);
}

.mode-tab.active {
    background: var(--gradient);
    color: white;
}

/* Self-Cooking Section */
.self-cook-section {
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.self-cook-subtitle {
    color: var(--text-secondary);
    margin-top: 8px;
    margin-bottom: 32px;
    text-align: center;
}

.self-cook-form {
    max-width: 600px;
    margin: 0 auto;
}

.self-cook-form .form-group {
    margin-bottom: 24px;
}

.self-cook-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* People Selector */
.people-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.people-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.people-btn:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

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

.people-count-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Taste Selector */
.taste-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.taste-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.taste-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Food Record Form */
.food-record-form {
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.food-record-form h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.food-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

#food-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
}

#food-input:focus {
    outline: none;
    border-color: var(--primary);
}

.selected-foods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    min-height: 40px;
}

.selected-food-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
}

.selected-food-tag .remove {
    cursor: pointer;
    opacity: 0.8;
    font-size: 1.2rem;
    line-height: 1;
}

.selected-food-tag .remove:hover {
    opacity: 1;
}

.form-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.meal-type-select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 100px;
}

.btn-voice {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
}

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

.btn-voice.recording {
    background: var(--primary);
    color: white;
    animation: pulse 1s infinite;
}

#submit-btn {
    padding: 12px 32px;
    font-size: 1rem;
    margin-left: auto;
}

.voice-hint {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.voice-food-tag {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
}

/* Generate Menu Button */
#generate-menu-btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    margin-top: 16px;
}

/* Menu Results */
.menu-results {
    margin-top: 32px;
    border-top: 1px solid var(--border);
    padding-top: 32px;
}

.meal-section {
    margin-bottom: 32px;
}

.meal-section h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.meal-items {
    display: grid;
    gap: 16px;
}

/* Meal Item (from cooking suggestions) */
.meal-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.meal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.meal-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.meal-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.meal-nutrition {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Recipe Card */
.recipe-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s;
}

.recipe-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.recipe-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.recipe-category {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.recipe-info {
    margin-bottom: 12px;
}

.recipe-nutrition {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.recipe-nutrition span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.recipe-taste {
    font-size: 0.85rem;
    color: var(--accent);
}

.recipe-details {
    margin-bottom: 12px;
}

.recipe-details details {
    margin-bottom: 8px;
}

.recipe-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px 0;
    list-style: none;
}

.recipe-details summary::-webkit-details-marker {
    display: none;
}

.recipe-details summary::before {
    content: "▶ ";
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.recipe-details details[open] summary::before {
    content: "▼ ";
}

.recipe-details p {
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 8px;
}

.recipe-footer {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.recipe-suitable {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Empty State */
.self-cook-section .empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Preferences */
.preference-category {
    margin-bottom: 24px;
}

.preference-category:last-child {
    margin-bottom: 0;
}

.preference-category h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.preference-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preference-option {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.preference-option:hover {
    border-color: var(--primary);
}

.preference-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.preference-option input {
    display: none;
}

/* Nutrition Goal Single Select */
.nutrition-goal-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nutrition-goal-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.nutrition-goal-option:hover {
    border-color: var(--primary);
}

.nutrition-goal-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.nutrition-goal-option input {
    margin-right: 12px;
}

.preference-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Meal History Grouped Display */
.meal-day-group {
    margin-bottom: 12px;
}

.meal-date-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    padding-left: 4px;
}

.meal-type-group {
    margin-bottom: 4px;
}

.meal-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 4px;
}

.meal-foods-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.meal-food-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 13px;
}

.meal-food-delete {
    display: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
}

.meal-food-tag:hover .meal-food-delete {
    display: inline;
}

.meal-food-delete:hover {
    opacity: 1;
    color: #ff6b6b;
}

/* Voice Button Recording State */
.btn-voice.recording {
    background: #ff6b6b !important;
    color: white !important;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* WeChat-style Input Row */
.food-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.food-input-field {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.food-input-field:focus {
    border-color: var(--primary);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Voice Input Panel */
.voice-input-panel {
    flex: 1;
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.voice-hint-text {
    font-size: 14px;
    color: var(--text-muted);
}

.voice-input-panel.recording {
    background: var(--primary);
}

.voice-input-panel.recording .voice-hint-text {
    color: white;
}

/* Voice Wave Animation */
.voice-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.voice-input-panel.recording::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: var(--primary);
    animation: voice-pulse 1s infinite;
    opacity: 0.3;
}

@keyframes voice-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.02); opacity: 0.1; }
}

/* Recommendation Section */
.recommendation-section {
    padding: 20px 0;
}

.recommendation-section .section-title {
    margin-bottom: 16px;
}

.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommendation-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recommendation-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.recommendation-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.recommendation-nutrition {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.recommendation-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.recommendation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.preference-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
}

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

/* Quick Record Section */
.quick-record-section {
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.quick-record-form {
    display: flex;
    gap: 8px;
}

.quick-record-form .food-input-field {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
}

.quick-record-form .food-input-field:focus {
    border-color: var(--primary);
    outline: none;
}

/* Navbar Icon Button */
.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    text-decoration: none;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-icon-btn:hover {
    opacity: 1;
}

.nav-icon-btn.has-dot::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

/* Mode Selection Section */
.mode-selection-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    min-height: 60vh;
}

.mode-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    text-align: center;
}

.mode-cards {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 600px;
}

.mode-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.mode-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.mode-card:active {
    transform: translateY(0);
}

.mode-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.mode-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.mode-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Recommendations Section */
.recommendations-section {
    padding: 20px 0;
}

.recommendations-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.recommendations-header .back-btn {
    font-size: 1.2rem;
    padding: 8px 16px;
}

.recommendations-header .section-title {
    flex: 1;
    margin-bottom: 0;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommendation-item.hidden {
    display: none;
}

.recommendation-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recommendation-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.recommendation-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.recommendation-nutrition {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.recommendation-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.recommendation-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

/* Quick Record Section */
.quick-record-section {
    padding: 16px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.quick-record-form {
    display: flex;
    gap: 8px;
}

.quick-record-form .food-input-field {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
}

.quick-record-form .food-input-field:focus {
    border-color: var(--primary);
    outline: none;
}

/* Navbar Icon Button */
.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    text-decoration: none;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-icon-btn:hover {
    opacity: 1;
}

.nav-icon-btn.has-dot::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.quick-links {
    margin-top: 12px;
    text-align: center;
}

.quick-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
}

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

/* Recent Records */
.recent-records {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.recent-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.recent-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.recent-item:last-of-type {
    border-bottom: none;
}

.recent-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 80px;
}

.recent-meal {
    font-size: 0.75rem;
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.recent-food {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.meal-foods-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.quick-link {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 12px;
}

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

/* History Item Delete Button */
.history-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

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

.history-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 70px;
}

.history-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-delete-btn {
    opacity: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--bg-card);
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s;
}

.history-item:hover .history-delete-btn {
    opacity: 1;
}

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

/* Filter dropdowns in recommendations header */
.recommendations-filters {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: var(--primary);
}

.filter-select:hover {
    background: var(--bg-secondary);
}

/* Recommendations separator */
.recommendations-separator {
    text-align: center;
    padding: 16px 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.recommendations-separator hr {
    border: none;
    border-top: 1px dashed var(--border);
    margin-bottom: 8px;
}

/* Location Picker */
.location-picker {
    position: sticky;
    top: 64px;
    z-index: 99;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
}

.location-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.location-btn:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.location-icon {
    font-size: 1rem;
}

.location-display {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.location-btn.active .location-arrow {
    transform: rotate(180deg);
}

/* Location Drawer (Dropdown) */
.location-drawer {
    position: absolute;
    top: 100%;
    left: 24px;
    right: 24px;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: none;
}

.location-drawer.visible {
    display: block;
    animation: slideUp 0.2s ease;
}

.location-drawer-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.saved-location-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.saved-location-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.saved-location-item.selected {
    border: 1px solid var(--primary);
    background: rgba(254, 44, 85, 0.1);
}

.saved-location-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.saved-location-name {
    font-weight: 600;
    color: var(--text-primary);
}

.saved-location-addr {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.saved-location-delete {
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.saved-location-item:hover .saved-location-delete {
    opacity: 1;
}

.saved-location-delete:hover {
    color: var(--primary);
}

.add-location-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* Add Location Modal */
.add-location-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.add-location-modal .modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.add-location-modal h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.add-location-modal .form-group {
    margin-bottom: 16px;
}

.add-location-modal .form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

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

.add-location-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Location Denied Guide */
.location-denied-guide {
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 16px 24px;
}

.location-denied-guide .denied-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.location-denied-guide h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.location-denied-guide p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.location-denied-guide .denied-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.location-denied-guide .denied-actions .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Swipe Back Indicator */
#swipe-back-indicator {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    color: #fff;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#swipe-back-indicator .swipe-back-arrow {
    width: 24px;
    height: 24px;
}

#swipe-back-indicator svg {
    fill: currentColor;
}


/* Restaurant recommendation price display */
.recommendation-price {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

