:root {
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-card: #161d2f;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #6366f1;
    --accent-secondary: #22d3ee;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #f43f5e;
    --accent-pink: #ec4899;
    --accent-purple: #a855f7;
    --border-color: #2d3748;
    --border-light: #374151;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #22d3ee 100%);
    --gradient-card: linear-gradient(145deg, #1a2235 0%, #111827 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-primary) 0%, transparent 50%, var(--accent-purple) 100%);
    opacity: 0.3;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.logo svg {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

.logo span {
    font-size: 22px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    position: relative;
    margin: 2px 12px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.nav-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    border-left-color: var(--accent-primary);
    color: var(--accent-primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.nav-item svg {
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.nav-item:hover svg {
    transform: scale(1.1);
}

.api-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: auto;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-danger);
    position: relative;
}

.status-indicator.online {
    background: var(--accent-success);
    box-shadow: 0 0 12px var(--accent-success);
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.online::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid var(--accent-success);
    opacity: 0.3;
    animation: pulse-ring 2s ease-in-out infinite;
}

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

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

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 36px 40px;
    background: radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
                radial-gradient(ellipse at bottom left, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
}

.page {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.active {
    display: block;
}

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

.page-header {
    margin-bottom: 36px;
    position: relative;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* 对话模式切换 */
.chat-mode-switch {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.chat-mode-switch .mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.chat-mode-switch .mode-btn svg {
    color: var(--text-muted);
}

.chat-mode-switch .mode-btn span {
    font-size: 14px;
    font-weight: 500;
}

.chat-mode-switch .mode-btn small {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.chat-mode-switch .mode-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
}

.chat-mode-switch .mode-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.chat-mode-switch .mode-btn.active svg {
    color: var(--accent-primary);
}

.chat-mode-switch .mode-btn.active small {
    color: var(--accent-secondary);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.message {
    margin-bottom: 20px;
    animation: messageIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.message.user .message-content {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 6px var(--radius-lg);
    box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.2);
}

.message.assistant .message-content {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 6px;
    border: 1px solid var(--border-color);
}

.products-after-chat {
    width: 100%;
    margin: 4px 0 12px 0;
}

.products-after-chat .products-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 12px;
}

.message.system .message-content {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-lg);
}

.message-content {
    max-width: 100%;
    padding: 16px 20px;
}

.message-content p {
    white-space: pre-wrap;
    line-height: 1.7;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.input-wrapper {
    display: flex;
    gap: 14px;
    align-items: flex-end;
}

.input-wrapper textarea {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    color: var(--text-primary);
    font-size: 15px;
    resize: none;
    min-height: 54px;
    max-height: 150px;
    transition: all var(--transition-fast);
}

.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.send-btn {
    width: 54px;
    height: 54px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg), 0 0 24px rgba(99, 102, 241, 0.4);
}

.send-btn:active {
    transform: scale(0.98);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chat-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.action-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition-fast);
}

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

.search-container {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}

.search-bar {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.search-bar input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.primary-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.3);
}

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

.secondary-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.secondary-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.danger-btn {
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(244, 63, 94, 0.3);
}

.search-filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    min-width: 140px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.price-range input {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
}

.price-range span {
    flex-shrink: 0;
    color: var(--text-muted);
}

.filter-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.search-results {
    min-height: 400px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-muted);
}

.empty-state svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

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

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
}

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

.product-image {
    width: 100%;
    height: 180px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

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

.product-price {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-price .original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
    -webkit-text-fill-color: var(--text-muted);
}

.product-brand {
    font-size: 12px;
    color: var(--accent-secondary);
    background: rgba(34, 211, 238, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.product-shop {
    font-size: 12px;
    color: var(--text-muted);
}

.price-container {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}

.price-input {
    display: flex;
    gap: 14px;
    margin-bottom: 28px;
}

.price-input input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.price-input input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.price-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.price-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

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

.price-card .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.price-card .value {
    font-size: 28px;
    font-weight: 700;
}

.price-card.current .value {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-card.lowest .value {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-card.discount .value {
    background: linear-gradient(135deg, var(--accent-warning) 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-card.trend .value {
    font-size: 18px;
}

.price-chart-container {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 28px;
    height: 320px;
    border: 1px solid var(--border-color);
}

.recommendation-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

.recommendation-card h3 {
    font-size: 16px;
    margin-bottom: 14px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-container {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}

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

.status-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    transition: all var(--transition-fast);
}

.status-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.status-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.status-badge {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-metrics {
    display: flex;
    gap: 24px;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-actions {
    display: flex;
    gap: 12px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 26, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.loading-message .message-content {
    background: var(--bg-tertiary);
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.loading-indicator .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.products-container {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.products-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.products-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-item {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.product-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.product-item .product-name {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-item .product-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-danger);
}

.search-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.link-btn:hover {
    background: var(--bg-tertiary);
    color: var(--accent-secondary);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    max-width: 640px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(99, 102, 241, 0.1);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--accent-danger);
}

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

.modal-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    background: var(--bg-secondary);
}

.product-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-detail-image {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.product-detail-image img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-value {
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

.detail-value.price {
    color: var(--accent-danger);
    font-size: 18px;
}

.detail-value .original-price {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-left: 8px;
}

.detail-value.badge {
    background: var(--accent-primary);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.detail-value.promotion {
    color: var(--accent-warning);
    font-size: 13px;
}

.product-detail-actions {
    text-align: center;
    padding-top: 10px;
}

.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.compare-items {
    display: flex;
    gap: 10px;
    flex: 1;
    overflow-x: auto;
}

.compare-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--border-color);
}

.compare-item-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-item-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
    transition: color var(--transition-fast);
}

.compare-item-remove:hover {
    color: var(--accent-danger);
}

.compare-table-container {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.compare-table th,
.compare-table td {
    padding: 14px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.compare-table th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.compare-table th:first-child {
    background: var(--bg-tertiary);
    font-weight: 500;
    text-align: left;
}

.compare-table td:first-child {
    background: var(--bg-secondary);
    font-weight: 500;
    text-align: left;
}

.compare-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.price-cell {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.compare-analysis {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.compare-analysis h3 {
    margin: 0 0 14px 0;
    font-size: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.analysis-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ==================== 对比表格样式 ==================== */

.compare-table-wrapper {
    margin: 12px 0;
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 13px;
}

.compare-table thead {
    background: var(--bg-card);
}

.compare-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--accent-secondary);
    border-bottom: 2px solid var(--accent-primary);
    white-space: nowrap;
}

.compare-table td {
    padding: 10px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.compare-table tbody tr:last-child td {
    border-bottom: none;
}

.compare-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.1);
}

.compare-table td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* ==================== 响应式设计 ==================== */

/* 平板端 (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 60px;
        padding: 10px 0;
    }
    
    .logo span,
    .nav-item span,
    .api-status span {
        display: none;
    }
    
    .api-status .admin-icon {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 14px;
    }
    
    .browse-history {
        display: none;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .price-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .search-filters {
        gap: 12px;
    }
    
    .filter-group input,
    .filter-group select {
        min-width: 120px;
    }

    .example-questions {
        padding: 8px 10px;
    }

    .example-chip {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* 移动端 (< 768px) */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        overflow-x: auto;
        position: relative;
    }

    .sidebar::before {
        display: none;
    }
    
    .logo {
        padding: 12px 16px;
        border-bottom: none;
        margin-bottom: 0;
        border-right: 1px solid var(--border-color);
        flex-shrink: 0;
    }
    
    .logo span {
        display: block;
        font-size: 16px;
    }

    .logo svg {
        width: 24px;
        height: 24px;
    }
    
    .nav-menu {
        display: flex;
        flex-direction: row;
        gap: 0;
        flex: 1;
        overflow-x: auto;
        justify-content: space-around;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-item {
        padding: 12px 8px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        margin: 0;
        border-radius: 0;
        flex: 1;
        min-width: 60px;
        max-width: 100px;
        text-align: center;
        flex-direction: column;
        gap: 4px;
    }
    
    .nav-item.active {
        border-bottom-color: var(--accent-primary);
        background: rgba(99, 102, 241, 0.08);
    }

    .nav-item.active::after {
        display: none;
    }

    .nav-item svg {
        width: 18px;
        height: 18px;
    }
    
    .nav-item span {
        display: block;
        font-size: 12px;
    }
    
    .api-status {
        display: flex;
        padding: 12px 14px;
        border-top: none;
        border-left: 1px solid var(--border-color);
        margin-top: 0;
        flex-shrink: 0;
        cursor: pointer;
        min-height: 48px;
    }

    .api-status .admin-icon {
        display: none;
    }

    .browse-history {
        display: none;
    }
    
    .main-content {
        padding: 12px;
        height: calc(100vh - 56px);
    }
    
    .page-header {
        margin-bottom: 16px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .page-header p {
        font-size: 13px;
    }
    
    /* ===== 聊天容器 ===== */
    .chat-container {
        height: calc(100vh - 160px);
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .message-content {
        max-width: 88%;
        padding: 10px 14px;
        font-size: 14px;
    }

    /* 示例提问 */
    .example-questions {
        padding: 8px 12px;
        gap: 6px;
    }

    .example-chip {
        font-size: 12px;
        padding: 6px 12px;
    }

    /* 停止按钮 */
    .stop-btn {
        width: 44px;
        height: 44px;
    }

    .send-btn {
        width: 44px;
        height: 44px;
    }
    
    .chat-input-area {
        padding: 10px 12px;
    }
    
    .input-wrapper textarea {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 44px;
    }

    /* 追问芯片 */
    .follow-up-chip {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Markdown */
    .markdown-body {
        font-size: 13px;
    }

    .markdown-body h1 { font-size: 16px; }
    .markdown-body h2 { font-size: 15px; }
    .markdown-body h3 { font-size: 14px; }
    
    /* ===== 搜索页面 ===== */
    .search-container {
        padding: 14px;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-bar input {
        padding: 12px 14px;
    }
    
    .primary-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .search-filter-header {
        margin-bottom: 4px;
    }
    
    .search-filters {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group.checkbox {
        width: auto;
        flex-shrink: 0;
    }
    
    .filter-group.checkbox label {
        white-space: nowrap;
    }
    
    .filter-group input,
    .filter-group select {
        width: 100%;
        min-width: auto;
    }
    
    .price-range {
        flex-direction: row;
        gap: 6px;
        width: 100%;
    }
    
    .price-range input {
        flex: 1;
        width: 0;
        min-width: 0;
    }
    
    .price-range span {
        flex-shrink: 0;
    }
    
    .search-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    /* 商品网格 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        border-radius: var(--radius-sm);
    }
    
    .product-image {
        height: 130px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
    
    .product-price {
        font-size: 15px;
    }

    .product-price .original {
        font-size: 11px;
    }

    .product-brand {
        font-size: 11px;
        padding: 2px 6px;
    }

    .product-shop {
        font-size: 11px;
    }

    .product-tags {
        gap: 3px;
        margin-top: 4px;
    }

    .product-tag {
        font-size: 10px;
        padding: 1px 5px;
    }

    /* 对话中商品卡片 - 横滑 */
    .products-list {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
    }

    .chat-product-card {
        min-width: 140px;
        width: 140px;
    }

    .chat-product-image {
        height: 100px;
    }

    .chat-product-name {
        font-size: 11px;
    }

    .chat-product-price {
        font-size: 13px;
    }

    .chat-product-brand,
    .chat-product-shop {
        font-size: 10px;
    }

    /* 图片占位图 */
    .img-placeholder {
        font-size: 18px;
    }

    .img-placeholder.large {
        font-size: 28px;
        max-width: 140px;
        max-height: 140px;
    }
    
    /* ===== 价格分析 ===== */
    .price-container {
        padding: 14px;
    }
    
    .price-input {
        flex-direction: column;
    }
    
    .price-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .price-card {
        padding: 12px;
    }
    
    .price-card .value {
        font-size: 18px;
    }

    .price-card .label {
        font-size: 11px;
    }

    .price-recent-list {
        flex-direction: column;
    }

    .price-recent-item {
        padding: 6px 10px;
    }

    .price-recent-name {
        font-size: 12px;
        max-width: 100%;
    }
    
    .price-chart-container {
        height: 220px;
        padding: 12px;
    }

    .recommendation-card {
        padding: 14px;
    }

    .recommendation-card h3 {
        font-size: 14px;
    }
    
    /* ===== 状态/管理页面 ===== */
    .admin-page-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .admin-page-header .secondary-btn {
        width: auto;
        padding: 8px 16px;
        font-size: 13px;
    }

    .admin-notice {
        font-size: 12px;
        padding: 8px 12px;
        flex-wrap: wrap;
    }

    .admin-notice kbd {
        background: var(--bg-tertiary);
        padding: 1px 6px;
        border-radius: 3px;
        border: 1px solid var(--border-color);
        font-size: 11px;
        font-family: monospace;
    }

    .status-container {
        padding: 14px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .status-card {
        padding: 14px;
    }
    
    .status-header {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .status-metrics {
        justify-content: space-around;
    }
    
    .metric-value {
        font-size: 20px;
    }
    
    .status-actions {
        flex-direction: column;
    }
    
    .status-actions button {
        width: 100%;
    }
    
    /* ===== 模态框 ===== */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-header h2 {
        font-size: 15px;
    }
    
    .modal-body {
        padding: 14px;
    }
    
    .modal-footer {
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer button {
        width: 100%;
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 4px;
        padding: 6px 0;
    }
    
    .detail-value {
        text-align: left;
        max-width: 100%;
    }

    .product-detail-image {
        padding: 12px;
    }

    .product-detail-image img {
        max-width: 150px;
        max-height: 150px;
    }
    
    /* ===== 对比栏 ===== */
    .compare-bar {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .compare-items {
        gap: 4px;
    }
    
    .compare-item {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .compare-item-name {
        max-width: 60px;
    }
    
    .compare-bar .primary-btn,
    .compare-bar .secondary-btn {
        padding: 6px 10px;
        font-size: 12px;
        width: auto;
    }
    
    /* 对比表格 */
    .compare-table {
        font-size: 11px;
    }
    
    .compare-table th,
    .compare-table td {
        padding: 6px 4px;
    }
    
    .compare-img {
        width: 36px;
        height: 36px;
    }

    .compare-analysis {
        padding: 12px;
    }

    .compare-analysis h3 {
        font-size: 14px;
    }

    /* ===== 聊天操作 ===== */
    .chat-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .session-info {
        font-size: 11px;
    }
}

/* 小屏幕手机 (< 480px) */
@media (max-width: 480px) {
    .logo {
        padding: 10px 12px;
    }

    .logo span {
        font-size: 13px;
    }

    .logo svg {
        width: 20px;
        height: 20px;
    }
    
    .nav-item {
        padding: 8px 10px;
    }
    
    .nav-item svg {
        width: 16px;
        height: 16px;
    }
    
    .nav-item span {
        font-size: 11px;
    }
    
    .page-header h1 {
        font-size: 18px;
    }

    .page-header p {
        font-size: 12px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 160px;
    }
    
    .price-summary {
        grid-template-columns: 1fr;
    }

    .status-metrics {
        flex-direction: column;
        gap: 10px;
    }

    .chat-container {
        height: calc(100vh - 140px);
    }

    .message-content {
        max-width: 92%;
    }

    .example-chip {
        font-size: 11px;
        padding: 5px 10px;
    }

    .chat-product-card {
        min-width: 120px;
        width: 120px;
    }

    .chat-product-image {
        height: 80px;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        height: 48px;
    }
    
    .main-content {
        height: calc(100vh - 48px);
    }
    
    .chat-container {
        height: calc(100vh - 120px);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
    }
    
    .nav-item:hover {
        background: transparent;
    }
    
    .primary-btn:hover,
    .secondary-btn:hover {
        transform: none;
    }
    
    /* 增大触摸区域 */
    .nav-item {
        min-height: 44px;
    }
    
    .action-btn {
        min-height: 36px;
        padding: 8px 16px;
    }
}

/* ==================== 新增样式 ==================== */

/* ===== 示例提问 ===== */
.example-questions {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.example-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.example-chip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* ===== 停止生成按钮 ===== */
.stop-btn {
    width: 54px;
    height: 54px;
    background: var(--accent-danger);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.stop-btn:hover {
    background: #e11d48;
    transform: scale(1.05);
}

/* ===== 追问可点击 ===== */
.follow-up-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.follow-up-chip {
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    color: var(--accent-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.follow-up-chip:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
}

/* ===== Markdown渲染 ===== */
.markdown-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

.markdown-body p {
    margin-bottom: 8px;
}

.markdown-body p:last-child {
    margin-bottom: 0;
}

.markdown-body strong {
    color: var(--accent-secondary);
    font-weight: 600;
}

.markdown-body em {
    color: var(--text-secondary);
}

/* Markdown表格样式 */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.markdown-body table thead {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.markdown-body table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
    font-size: 14px;
}

.markdown-body table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.markdown-body table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.markdown-body table tbody tr:last-child {
    border-bottom: none;
}

.markdown-body table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    color: var(--text-primary);
}

.markdown-body table td:first-child {
    font-weight: 500;
    color: var(--accent-secondary);
    background: rgba(99, 102, 241, 0.03);
}

.markdown-body table td strong {
    color: var(--accent-primary);
}

/* 表格中的星级评分样式 */
.markdown-body table td .star {
    color: var(--accent-warning);
}

/* 响应式表格 */
@media (max-width: 768px) {
    .markdown-body table {
        font-size: 12px;
        margin: 12px 0;
    }
    
    .markdown-body table th,
    .markdown-body table td {
        padding: 8px 12px;
    }
    
    /* 小屏幕时表格横向滚动 */
    .markdown-body {
        overflow-x: auto;
    }
    
    .markdown-body table {
        min-width: 600px;
    }
}

.markdown-body ul, .markdown-body ol {
    margin: 8px 0;
    padding-left: 20px;
}

.markdown-body li {
    margin-bottom: 4px;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    margin: 12px 0 6px;
    color: var(--accent-primary);
}

.markdown-body h1 { font-size: 18px; }
.markdown-body h2 { font-size: 16px; }
.markdown-body h3 { font-size: 15px; }

.markdown-body code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--accent-secondary);
}

.markdown-body blockquote {
    border-left: 3px solid var(--accent-primary);
    padding-left: 12px;
    margin: 8px 0;
    color: var(--text-secondary);
}

/* ===== 聊天中富商品卡片 ===== */
.products-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chat-product-card {
    flex-shrink: 0;
    width: 180px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.chat-product-image {
    width: 100%;
    height: 120px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chat-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.chat-product-info {
    padding: 10px;
}

.chat-product-name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-danger);
    margin-bottom: 4px;
}

.chat-product-meta {
    display: flex;
    gap: 6px;
}

.thinking-container {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    margin: 12px 0;
    overflow: hidden;
}

.thinking-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.15);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.thinking-header:hover {
    background: rgba(99, 102, 241, 0.25);
}

.thinking-header svg {
    color: var(--accent-primary);
    animation: pulse 2s infinite;
}

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

.thinking-header span:nth-child(2) {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-primary);
}

.thinking-toggle {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-muted);
}

.thinking-content {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.chat-product-meta {
    flex-wrap: wrap;
}

.chat-product-brand {
    font-size: 11px;
    color: var(--accent-secondary);
    background: rgba(34, 211, 238, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.chat-product-shop {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== 图片占位图 ===== */
.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 700;
}

.img-placeholder.large {
    font-size: 36px;
    max-width: 200px;
    max-height: 200px;
    margin: 0 auto;
    border-radius: var(--radius-md);
}

/* ===== 搜索商品标签 ===== */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.product-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.product-tag.platform-tag {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.product-tag.promo-tag {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.product-tag.free-tag {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.product-tag.sales-tag {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* ===== 筛选折叠 ===== */
.search-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.filter-title {
    font-size: 13px;
    color: var(--text-muted);
}

.search-filters.collapsed {
    display: none;
}

/* ===== 浏览历史 ===== */
.browse-history {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    max-height: 200px;
    overflow-y: auto;
}

.browse-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.browse-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-empty {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.history-item-image {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.history-item-info {
    flex: 1;
    min-width: 0;
}

.history-item-name {
    font-size: 12px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-price {
    font-size: 11px;
    color: var(--accent-danger);
    font-weight: 600;
}

/* ===== 价格页最近浏览 ===== */
.price-recent {
    margin-bottom: 20px;
}

.price-recent-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.price-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.price-recent-item {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.price-recent-item:hover {
    border-color: var(--accent-primary);
}

.price-recent-name {
    font-size: 13px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price-recent-price {
    font-size: 12px;
    color: var(--accent-danger);
    font-weight: 600;
}

/* ===== 管理员提示 ===== */
.admin-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    color: var(--accent-warning);
    font-size: 13px;
    margin-bottom: 20px;
}

.admin-notice kbd {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-family: monospace;
    color: var(--text-secondary);
}

/* ===== 管理页面 header ===== */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.admin-page-header h1 {
    margin-bottom: 4px;
}

.admin-page-header .secondary-btn {
    flex-shrink: 0;
}

/* ===== 侧边栏管理入口 ===== */
.api-status {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.api-status:hover {
    background: rgba(99, 102, 241, 0.08);
}

.api-status .admin-icon {
    margin-left: auto;
    opacity: 0.4;
    transition: opacity var(--transition-fast);
    flex-shrink: 0;
}

.api-status:hover .admin-icon {
    opacity: 0.8;
}

/* ===== 手机端汉堡菜单 ===== */
.hamburger-btn {
    display: none;
    /* position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999; */
    width: 47px;
    height: 47px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.hamburger-btn svg {
    display: block;
}

/* 手机端导航覆盖层 */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 80vw;
    height: 100%;
    background: var(--bg-secondary);
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
    z-index: 1001;
}

.mobile-nav-overlay.active .mobile-nav-panel {
    transform: translateX(0);
}

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

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.mobile-logo svg {
    color: var(--accent-primary);
}

.close-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

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

.mobile-nav-list {
    list-style: none;
    padding: 8px 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.mobile-nav-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
}

.mobile-nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    border-left-color: var(--accent-primary);
    color: var(--accent-primary);
}

.mobile-nav-item svg {
    flex-shrink: 0;
}

.mobile-nav-item span {
    font-size: 15px;
}

/* 手机端用户状态 */
.mobile-user-status {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-user-status .user-not-logged-in,
.mobile-user-status .user-logged-in {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.mobile-user-status .user-logged-in .user-email {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-btn-mobile,
.logout-btn-mobile {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-btn-mobile:hover,
.logout-btn-mobile:hover {
    background: var(--accent-purple);
}

.logout-btn-mobile {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.logout-btn-mobile:hover {
    background: var(--accent-danger);
    color: white;
}

/* 手机端服务状态 */
.mobile-api-status {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.mobile-api-status:hover {
    background: rgba(99, 102, 241, 0.08);
}

.mobile-api-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-warning);
}

.mobile-api-status .status-indicator.online {
    background: var(--accent-success);
}

.mobile-api-status .status-indicator.offline {
    background: var(--accent-danger);
}

.mobile-api-status span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 手机端显示汉堡菜单，隐藏侧边栏 */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }
    
    .sidebar {
        display: none;
    }
    
    .mobile-nav-overlay {
        display: block;
    }
    
    /* 调整主内容区域 */
    .main-content {
        margin-left: 0;
    }
    
    /* 页面顶部留出汉堡菜单按钮空间 */
    .chat-header,
    .search-header,
    .price-header {
        padding-top: 12px;
    }
}

/* ===== 搜索结果加载更多 ===== */
.load-more-container {
    text-align: center;
    padding: 20px 0;
}

.load-more-btn {
    padding: 10px 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.load-more-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ===== Modal底部三个按钮 ===== */
.modal-footer {
    gap: 10px;
}

.modal-footer .primary-btn,
.modal-footer .secondary-btn {
    padding: 10px 20px;
    font-size: 14px;
}

/* ========== 验证码弹窗 ========== */

.captcha-modal-content {
    max-width: 420px;
}

.captcha-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    gap: 16px;
}

.captcha-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 4px;
}

.captcha-message {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.captcha-question {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 16px 32px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    letter-spacing: 4px;
    min-width: 200px;
    user-select: none;
}

.captcha-input-group {
    width: 100%;
    max-width: 280px;
}

.captcha-input-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 18px;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.captcha-input-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.captcha-error {
    color: var(--accent-danger);
    font-size: 13px;
    min-height: 20px;
}

.captcha-submit-btn {
    width: 100%;
    max-width: 280px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

.captcha-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== 商品卡片操作按钮 ========== */

.product-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    padding: 0;
}

.product-action-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.product-action-btn.favorite-btn.favorited {
    color: var(--accent-danger);
    border-color: var(--accent-danger);
    background: rgba(244, 63, 94, 0.1);
}

.product-action-btn.favorite-btn.favorited:hover {
    background: rgba(244, 63, 94, 0.2);
}

.product-action-btn.compare-btn:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    background: rgba(34, 211, 238, 0.1);
}

.chat-product-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.product-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* ========== Toast 提示 ========== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    min-width: 200px;
}

.toast-success {
    border-color: var(--accent-success);
    background: rgba(16, 185, 129, 0.1);
}

.toast-success .toast-icon {
    color: var(--accent-success);
}

.toast-warning {
    border-color: var(--accent-warning);
    background: rgba(245, 158, 11, 0.1);
}

.toast-warning .toast-icon {
    color: var(--accent-warning);
}

.toast-error {
    border-color: var(--accent-danger);
    background: rgba(244, 63, 94, 0.1);
}

.toast-error .toast-icon {
    color: var(--accent-danger);
}

.toast-icon {
    font-size: 18px;
    font-weight: 700;
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
}

.toast.fade-out {
    animation: slideOut 0.3s ease-out forwards;
}

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

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

/* ========== 用户状态区域 ========== */

.user-status {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.user-status-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-not-logged-in,
.user-logged-in {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.user-logged-in .user-email {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-btn-sidebar,
.logout-btn-sidebar {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-btn-sidebar:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.logout-btn-sidebar:hover {
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

/* ========== 登录弹窗 ========== */

.login-modal-content {
    max-width: 420px;
}

.login-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    gap: 16px;
}

.login-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 4px;
}

.login-message {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.login-form {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-input-group label {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: left;
}

.login-input-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    /* color: var(--text-primary); */
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.login-input-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.login-error {
    color: var(--accent-danger);
    font-size: 13px;
    min-height: 20px;
}

.login-submit-btn {
    width: 100%;
    max-width: 320px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-footer-links {
    font-size: 13px;
    color: var(--text-muted);
}

.login-footer-links a {
    color: var(--accent-primary);
    text-decoration: none;
    margin-left: 4px;
}

.login-footer-links a:hover {
    text-decoration: underline;
}

/* ========== 商品详情弹窗 ========== */

.product-detail-modal-content {
    max-width: 900px;
    max-height: 85vh;
}

.product-detail-body-wrapper {
    padding: 0;
    max-height: calc(85vh - 60px);
    overflow-y: auto;
}

.product-detail-content {
    padding: 24px;
}

.product-detail-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.product-detail-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.product-detail-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0 0;
}

.product-detail-body {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.product-detail-images {
    flex: 1;
    min-width: 300px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.product-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.product-thumbnails .thumbnail {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    object-fit: cover;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.product-thumbnails .thumbnail:hover {
    border-color: var(--accent-primary);
}

.product-thumbnails .thumbnail.active {
    border-color: var(--accent-primary);
}

.no-image {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.product-detail-info {
    flex: 1;
    min-width: 300px;
}

.product-price-section {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.1), rgba(99, 102, 241, 0.1));
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-danger);
}

.discount-badge {
    background: var(--accent-danger);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.price-original, .price-promo, .price-roundup {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
}

.original-label, .promo-label, .roundup-label {
    font-size: 12px;
    color: var(--text-muted);
}

.original-value {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.promo-value {
    font-size: 14px;
    color: var(--accent-secondary);
}

.roundup-value {
    font-size: 14px;
    color: var(--accent-success);
}

.product-meta-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    gap: 8px;
}

.meta-label {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 50px;
}

.meta-value {
    font-size: 13px;
    color: var(--text-primary);
}

.meta-item.free-shipping .meta-value {
    color: var(--accent-success);
    font-weight: 600;
}

.product-tags-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.promo-tag {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
}

.product-actions-section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.action-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.action-btn.coupon-btn {
    background: var(--accent-danger);
    border-color: var(--accent-danger);
    color: white;
}

.action-btn.coupon-btn:hover {
    background: #e11d48;
}

.action-btn.buy-btn {
    background: var(--accent-warning);
    border-color: var(--accent-warning);
    color: white;
}

.action-btn.buy-btn:hover {
    background: #d97706;
}

.action-btn.favorite-btn.favorited {
    color: var(--accent-danger);
    border-color: var(--accent-danger);
    background: rgba(244, 63, 94, 0.1);
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    gap: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 思考进度显示 */
.thinking-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin: 12px 0;
    animation: thinkingPulse 2s ease-in-out infinite;
}

.thinking-icon {
    font-size: 24px;
    animation: thinkingBounce 1s ease-in-out infinite;
}

.thinking-text {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

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

@keyframes thinkingBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.error-state {
    padding: 24px;
    text-align: center;
    color: var(--accent-danger);
}
