/* 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;
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    white-space: nowrap;
}
.logo-tagline {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 12px;
}
.logo-tagline::before {
    content: '|';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--border);
    font-weight: 300;
}
@media (max-width: 720px) {
    .logo-tagline { display: none; }
}

.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;
}


/* ==========================================================================
   Locked report gate (trade / suitability test reports)
   The detailed part of a report is replaced by a blurred skeleton until an
   admin unlocks it, so the real content never reaches the page source.
   ========================================================================== */
.report-lock {
    position: relative;
    margin-top: 8px;
}

.report-lock-skeleton {
    filter: blur(7px);
    user-select: none;
    pointer-events: none;
    opacity: 0.5;
    padding: 8px 0;
}

.report-lock-skeleton .rls-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.report-lock-skeleton .rls-line {
    height: 14px;
    border-radius: 7px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07));
}

.report-lock-skeleton .rls-line.title { height: 20px; width: 38%; margin-bottom: 20px; }
.report-lock-skeleton .rls-line.w90 { width: 90%; }
.report-lock-skeleton .rls-line.w75 { width: 75%; }
.report-lock-skeleton .rls-line.w60 { width: 60%; }

.report-lock-skeleton .rls-bars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.report-lock-skeleton .rls-bar {
    height: 90px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
}

.report-lock-card {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, 100%);
    background: rgba(20, 20, 22, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

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

.report-lock-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.report-lock-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.report-lock-list {
    text-align: left;
    display: inline-block;
    margin: 4px auto 20px;
    font-size: 0.9375rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.report-lock-qr {
    width: 180px;
    height: 180px;
    margin: 0 auto 8px;
    border-radius: 12px;
    background: #FFFFFF;
    padding: 8px;
    display: block;
    object-fit: contain;
}

.report-lock-qr-hint {
    font-size: 0.8125rem;
    color: var(--text-tertiary, var(--text-secondary));
    margin-bottom: 20px;
}

.report-lock-code-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.report-lock-code-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.report-lock-code {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.report-lock-copy {
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, #4F7FFF 0%, #B14FFF 100%);
    transition: transform 0.2s;
}

.report-lock-copy:hover { transform: scale(1.04); }
.report-lock-copy.copied { background: #2BB673; }

.report-lock-footnote {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .report-lock-card { padding: 24px 18px; }
    .report-lock-qr { width: 150px; height: 150px; }
    .report-lock-code { font-size: 1.5rem; }
    .report-lock-skeleton .rls-bars { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Test report list items — shared by /reports and the home page section
   ========================================================================== */
.report-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 14px;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}
.report-item:hover { transform: translateY(-2px); border-color: rgba(79, 127, 255, 0.6); }
.report-item-icon { font-size: 1.75rem; flex-shrink: 0; }
.report-item-main { flex: 1; min-width: 0; }
.report-item-kind {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.report-item-headline {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.report-item-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.report-item-code {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: 0.08em;
}
.report-item-side { text-align: right; flex-shrink: 0; }
.report-badge-state {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.report-badge-state.open { background: rgba(46, 160, 67, 0.16); color: #4ED17E; }
.report-badge-state.locked { background: rgba(210, 153, 34, 0.16); color: #E0B341; }

@media (max-width: 768px) {
    .report-item { padding: 16px; gap: 12px; }
    .report-item-side { display: none; }
}

/* Empty state for the reports list (used by /reports) */
.reports-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-secondary);
}
.reports-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.reports-empty p { margin-bottom: 24px; line-height: 1.7; }

/* ------------------------------------------------------------------ */
/* 裂变分享 (Invite) — 弹层、横栏、按钮、复制、分享统计                */
/* ------------------------------------------------------------------ */

.invite-trigger-btn {
    background: linear-gradient(135deg, #00C896 0%, #FFD700 100%) !important;
    color: #0A0A0A !important;
    border: none !important;
}

/* 邀请弹层（遮罩 + 内容卡） */
.invite-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.invite-modal.open { display: flex; animation: inviteModalFade .25s ease-out; }
@keyframes inviteModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.invite-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}
.invite-modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: inviteModalSlide .35s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-primary);
}
@keyframes inviteModalSlide {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}
.invite-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s;
}
.invite-modal-close:hover {
    background: var(--bg-secondary, #2A2A2A);
    color: var(--text-primary);
}

.invite-modal-header {
    text-align: center;
    margin-bottom: 16px;
}
.invite-modal-badge {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 14px;
}
.invite-modal-typecode {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 6px;
    background: linear-gradient(135deg, #00C896 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    font-family: 'SF Mono', 'Monaco', monospace;
}
.invite-modal-typename {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.invite-modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}
.invite-modal-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 链接行：只读 input + 复制按钮 */
.invite-link-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.invite-link-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-secondary, #2A2A2A);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Monaco', monospace;
    min-width: 0;
}
.invite-copy-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #00C896 0%, #FFD700 100%);
    color: #0A0A0A;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .2s;
}
.invite-copy-btn:hover { transform: scale(1.03); }
.invite-copy-btn.copied {
    background: linear-gradient(135deg, #2EC4B6 0%, #38B000 100%);
}

/* 分享按钮 */
.invite-share-row { margin-bottom: 16px; }
.invite-share-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary, #2A2A2A);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.invite-share-btn:hover {
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

/* 统计行 */
.invite-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.invite-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.invite-stat-empty {
    color: var(--text-tertiary, var(--text-secondary));
    font-style: italic;
}

/* Toast */
.invite-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 10000;
}
.invite-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 邀请横栏（测试页顶部） */
.invite-banner {
    margin: -80px -24px 24px;
    padding: 56px 24px 16px;
    background: linear-gradient(135deg, rgba(0, 200, 150, 0.18) 0%, rgba(255, 215, 0, 0.14) 100%);
    border-bottom: 1px solid var(--border);
    animation: inviteBannerSlide .4s ease-out;
}
@keyframes inviteBannerSlide {
    from { transform: translateY(-30px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
.invite-banner-content {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.invite-banner-text { flex: 1; min-width: 220px; }
.invite-banner-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.invite-banner-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.invite-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.invite-banner-cta {
    padding: 10px 22px;
    background: linear-gradient(135deg, #00C896 0%, #FFD700 100%);
    color: #0A0A0A;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform .2s;
}
.invite-banner-cta:hover { transform: scale(1.05); }
.invite-banner-dismiss {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.invite-banner-dismiss:hover {
    background: var(--bg-secondary, #2A2A2A);
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .invite-modal-content { padding: 28px 20px 20px; }
    .invite-modal-typecode { font-size: 1.5rem; letter-spacing: 4px; }
    .invite-banner { margin: -80px -16px 16px; padding: 56px 16px 12px; }
    .invite-banner-content { flex-direction: column; align-items: stretch; }
    .invite-banner-cta { width: 100%; }
}

/* ------------------------------------------------------------------ */
/* 裂变分享 v2 — 分层弹层（fits 黑金卡 / concerns 克制卡）            */
/* ------------------------------------------------------------------ */

.invite-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin: 12px 0 6px;
    color: var(--text-primary);
}
.invite-modal-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 18px;
    padding: 0 4px;
}

/* Tier 徽章 */
.invite-tier-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 auto 8px;
    border: 1px solid transparent;
}
.invite-tier-badge.invite-tier-fits {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(255, 215, 0, 0.12));
    border-color: rgba(212, 175, 55, 0.45);
    color: #FFD24D;
}
.invite-tier-badge.invite-tier-concerns {
    background: rgba(120, 180, 255, 0.1);
    border-color: rgba(120, 180, 255, 0.4);
    color: #9CC4FF;
}

/* ---------- FITS：黑金标签卡 ---------- */
.invite-card-gold {
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.18) 0%, transparent 60%),
        linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 100%);
    border: 1.5px solid #D4AF37;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    margin-bottom: 18px;
    box-shadow:
        0 0 30px rgba(212, 175, 55, 0.18),
        inset 0 0 24px rgba(212, 175, 55, 0.06);
    position: relative;
    overflow: hidden;
}
.invite-card-gold::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    opacity: 0.7;
}
.invite-card-gold-inner {
    position: relative;
    z-index: 1;
}
.invite-card-tag {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 999px;
    color: #D4AF37;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 14px;
}
.invite-card-typecode {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 50%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-family: 'SF Mono', 'Monaco', monospace;
}
.invite-card-typename {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}
.invite-card-quote {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.6;
    margin: 12px 8px 16px;
    padding: 12px 8px;
    border-top: 1px dashed rgba(212, 175, 55, 0.4);
    border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
}
.invite-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    letter-spacing: 1px;
}
.invite-card-divider {
    width: 24px;
    height: 1px;
    background: rgba(212, 175, 55, 0.5);
}
.invite-card-brand {
    color: #D4AF37;
}

/* ---------- CONCERNS：克制分享卡 ---------- */
.invite-card-plain {
    background: var(--bg-secondary, #1A1A1A);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 18px;
}
.invite-plain-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.7;
}
.invite-plain-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.invite-plain-typename {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    opacity: 0.85;
}

/* ---------- 底部切换按钮 ---------- */
.invite-switch-tier {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    transition: color .2s, text-decoration .2s;
    opacity: 0.7;
}
.invite-switch-tier:hover {
    color: var(--text-primary);
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .invite-card-gold { padding: 22px 18px; }
    .invite-card-typecode { font-size: 1.7rem; letter-spacing: 5px; }
    .invite-card-typename { font-size: 1.15rem; }
    .invite-card-quote { font-size: 0.85rem; }
}
.reports-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ */
/* 裂变分享 v3 — 报告页底部两个并排按钮 + 隐藏的黑金分享卡            */
/* ------------------------------------------------------------------ */

/* 两个按钮的容器：默认横排，移动端竖排 */
.share-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* 按钮 A：生成分享图（主力按钮，黑金渐变） */
.share-btn-primary {
    flex: 1 1 220px;
    max-width: 320px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #B8860B 100%);
    color: #0A0A0A;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 6px 20px rgba(212, 175, 55, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}
.share-btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 10px 28px rgba(212, 175, 55, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.share-btn-primary:active {
    transform: translateY(0) scale(0.98);
}
.share-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 按钮 B：复制邀请链接（次要按钮，灰底描边） */
.share-btn-secondary {
    flex: 1 1 180px;
    max-width: 280px;
    padding: 14px 24px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.share-btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}
.share-btn-secondary.copied {
    background: rgba(46, 196, 182, 0.15);
    border-color: rgba(46, 196, 182, 0.5);
    color: #38B000;
}

/* 邀请统计（行内，灰字小号） */
.invite-stats-inline {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.invite-stats-inline span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ------------------------------------------------------------------ */
/* 分享卡（hidden off-screen，html2canvas 截图目标）                  */
/* 设计：黑金统一风格；截图前临时移入视口，截完恢复隐藏                  */
/* ------------------------------------------------------------------ */

#inviteShareCardWrap {
    /* 默认放在屏幕外；JS 在截图前临时改成 fixed 居中 */
    position: absolute;
    left: -99999px;
    top: 0;
    width: 360px;
    pointer-events: none;
}

/* 主卡：黑金矩形 */
.share-card {
    width: 360px;
    min-height: 520px;
    padding: 32px 28px 24px;
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.22) 0%, transparent 65%),
        linear-gradient(135deg, #0A0A0A 0%, #161616 100%);
    border: 1.5px solid #D4AF37;
    border-radius: 20px;
    color: #FFFFFF;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
    box-shadow:
        0 0 40px rgba(212, 175, 55, 0.25),
        inset 0 0 30px rgba(212, 175, 55, 0.05);
    position: relative;
    overflow: hidden;
}

/* 顶部金线高光 */
.share-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #D4AF37 50%, transparent 100%);
}

/* 顶部：tag + 品牌名 */
.share-card-top {
    margin-bottom: 18px;
}
.share-card-tag {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 999px;
    color: #D4AF37;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 8px;
}
.share-card-brand {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

/* 5 字母类型代码（仅 trade 显示） */
.share-card-typecode {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 50%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0 6px;
    font-family: 'SF Mono', 'Monaco', monospace;
    line-height: 1;
}

/* 类型名（主标题） */
.share-card-typename {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* 类型副标题（短描述，懂理论但缺钱缺时间 这种） */
.share-card-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin: 0 6px 14px;
    line-height: 1.4;
}

/* 分隔短线 */
.share-card-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    margin: 0 auto 14px;
}

/* 类型详细描述（从报告页带过来的正文段落） */
.share-card-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    line-height: 1.65;
    text-align: left;
    margin: 0 4px 18px;
    padding: 0 2px;
    /* 防止极长描述溢出卡片 */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部区：引导文案 + 二维码 */
.share-card-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.share-card-cta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.share-card-qr {
    width: 160px;
    height: 160px;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.share-card-qr canvas,
.share-card-qr img {
    width: 140px !important;
    height: 140px !important;
    display: block;
}
.share-card-footmark {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    margin-top: 6px;
}

@media (max-width: 640px) {
    .share-actions { flex-direction: column; }
    .share-btn-primary,
    .share-btn-secondary { max-width: 100%; }
    #inviteShareCardWrap { width: 320px; }
    .share-card { width: 320px; padding: 28px 22px 20px; min-height: 500px; }
    .share-card-typecode { font-size: 2rem; letter-spacing: 6px; }
    .share-card-typename { font-size: 1.3rem; }
    .share-card-description { font-size: 0.8rem; -webkit-line-clamp: 4; line-clamp: 4; }
}

/* ------------------------------------------------------------------ */
/* 分享预览弹窗（WeChat 朋友圈沉浸式：全屏黑底 + 中央预览 + 底部保存）  */
/* ------------------------------------------------------------------ */

/* 锁滚动 */
body.share-modal-open { overflow: hidden; }

/* 弹窗容器：纯黑底，轻微 backdrop-filter 增强层次 */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px 32px;
    opacity: 0;
    transition: opacity 0.25s ease-out;
}
.share-modal.show { opacity: 1; }

/* 中央预览图（max 屏宽 90%，高 65vh，留出底部按钮空间） */
.share-modal-img {
    max-width: 90vw;
    max-height: 62vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(212, 175, 55, 0.18);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: default;  /* 允许移动端长按弹出菜单 */
}

/* 底部保存按钮（黑金渐变，大号圆形 pill） */
.share-modal-save {
    margin-top: 28px;
    padding: 16px 56px;
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #B8860B 100%);
    color: #0A0A0A;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow:
        0 10px 30px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.share-modal-save:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 14px 36px rgba(212, 175, 55, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.share-modal-save:active {
    transform: translateY(0) scale(0.98);
}

/* 底部提示（灰字小号） */
.share-modal-hint {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
}

/* 关闭按钮（右上角圆形半透明） */
.share-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(90deg);
}

@media (max-width: 640px) {
    .share-modal { padding: 56px 16px 24px; }
    .share-modal-img { max-height: 56vh; }
    .share-modal-save { padding: 14px 44px; font-size: 1rem; margin-top: 22px; }
    .share-modal-hint { font-size: 0.78rem; }
    .share-modal-close { top: 14px; right: 14px; width: 36px; height: 36px; }
}

/* ============================================================ */
/* Trading Diagnosis Page (交易诊断)                              */
/* ============================================================ */

/* 首页次级按钮 — 在主橙色按钮下方/旁边的灰底姿态 */
.tr-start-btn-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 107, 53, 0.45);
    box-shadow: none !important;
    margin-left: 12px;
    font-size: 1rem !important;
    padding: 14px 36px !important;
}
.tr-start-btn-secondary:hover {
    background: rgba(255, 107, 53, 0.12) !important;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.25) !important;
}
@media (max-width: 720px) {
    .tr-start-btn-secondary { margin-left: 0; margin-top: 12px; }
}

/* 诊断页右下角企微浮窗 */
.diag-wecom-floating {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.diag-wecom-floating-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 10px 18px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7C548 100%);
    color: #0A0A0A;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(255, 107, 53, 0.45);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.18s, box-shadow 0.18s;
    font-family: inherit;
}
.diag-wecom-floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(255, 107, 53, 0.6);
}
.diag-wecom-floating-card {
    width: 240px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 107, 53, 0.35);
    border-radius: var(--radius-lg);
    padding: 16px 16px 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    text-align: center;
    display: none;
    animation: diag-float-pop 0.22s ease-out;
}
.diag-wecom-floating.open .diag-wecom-floating-card { display: block; }
.diag-wecom-floating.open .diag-wecom-floating-btn { display: none; }
@keyframes diag-float-pop {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.diag-wecom-floating-close {
    color: var(--text-secondary);
    font-size: 0.74rem;
    text-align: right;
    cursor: pointer;
    margin-bottom: 6px;
    user-select: none;
}
.diag-wecom-floating-close:hover { color: var(--tr-primary); }
.diag-wecom-floating-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.diag-wecom-floating-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}
.diag-wecom-floating-qr {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-md);
    background: #fff;
    padding: 6px;
    box-sizing: border-box;
}
@media (max-width: 720px) {
    .diag-wecom-floating { right: 14px; bottom: 14px; }
    .diag-wecom-floating-card { width: 220px; }
    .diag-wecom-floating-qr { width: 180px; height: 180px; }
}

/* === Social-proof toast bubble (bottom-left) === */
.signup-bubble {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    background: rgba(30, 30, 30, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(254, 44, 85, 0.35);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: var(--text-primary);
    font-size: 0.84rem;
    line-height: 1.35;
    max-width: 280px;
    min-width: 220px;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.signup-bubble.show {
    opacity: 1;
    transform: translateY(0);
}
.signup-bubble-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FE2C55 0%, #FF6B8A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(254, 44, 85, 0.35);
}
.signup-bubble-text {
    flex: 1 1 auto;
    min-width: 0;
}
.signup-bubble-action {
    color: var(--primary);
    font-weight: 600;
    margin-right: 2px;
}
.signup-bubble-email {
    color: var(--text-primary);
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
}
.signup-bubble-suffix {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-top: 2px;
}
.signup-bubble-close {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}
.signup-bubble-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}
@media (max-width: 720px) {
    .signup-bubble {
        left: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
        min-width: 0;
        font-size: 0.78rem;
        padding: 8px 28px 8px 8px;
    }
    .signup-bubble-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 0.9rem; }
    .signup-bubble-email { font-size: 0.76rem; }
}
