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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --ai-color: #8b5cf6;
    --ai-light: #ede9fe;
    --background: #fafafa;
    --surface: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

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

.app-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--surface);
    min-height: 100vh;
    position: relative;
    box-shadow: var(--shadow-lg);
}

/* 顶部导航 */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ai-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

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

.ai-chat-btn, .notification-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-chat-btn:hover, .notification-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* AI助手卡片 */
.ai-assistant-card {
    display: flex;
    align-items: center;
    margin: 1rem 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--ai-light), #f3e8ff);
    border: 2px solid var(--ai-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-assistant-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.ai-icon {
    width: 50px;
    height: 50px;
    background: var(--ai-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.ai-info {
    flex: 1;
}

.ai-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--ai-color);
}

.ai-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 主内容区域 */
.main-content {
    padding-bottom: 80px;
}

.page {
    display: none;
    min-height: calc(100vh - 140px);
    background: var(--background); /* 与body背景色保持一致 */
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 72px;
    z-index: 50;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 1rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s ease;
}

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

.page-header h2 {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
}

.ai-edit-btn, .ai-analyze-btn {
    background: var(--ai-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-edit-btn:hover, .ai-analyze-btn:hover {
    background: #7c3aed;
    transform: scale(1.05);
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 快速统计 */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 2rem 1.5rem;
    background: var(--surface);
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

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

/* 最近匹配 */
.recent-matches {
    padding: 2rem 1.5rem;
}

.recent-matches h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.match-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.match-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
}

.match-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-info {
    flex: 1;
}

.match-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.match-info p {
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.match-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: var(--ai-light);
    color: var(--ai-color);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.chat-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* 基础筛选样式 */
.filter-container {
    padding: 1.5rem;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* 性别选择器 */
.gender-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.gender-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

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

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

.gender-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* 范围滑块 */
.range-slider {
    position: relative;
    margin-bottom: 1rem;
}

.range-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 0.5rem;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.range-labels {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

.unlimited-btn {
    background: var(--ai-light);
    color: var(--ai-color);
    border: 2px solid var(--ai-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.unlimited-btn:hover, .unlimited-btn.active {
    background: var(--ai-color);
    color: white;
}

/* 地域选择器 */
.location-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.region-select, .city-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
}

.region-select:focus, .city-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.distance-filter {
    margin-top: 1rem;
}

/* 复选框组 */
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

/* 筛选操作按钮 */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.next-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.next-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.ai-help-btn {
    width: 100%;
    background: var(--ai-light);
    color: var(--ai-color);
    border: 2px solid var(--ai-color);
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ai-help-btn:hover {
    background: var(--ai-color);
    color: white;
}

/* 特征筛选样式 */
.feature-container {
    padding: 1.5rem;
}

.feature-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.section-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ai-features, .my-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.feature-item.ai-suggested {
    border-color: var(--ai-color);
    background: var(--ai-light);
}

.feature-item.user-added {
    border-color: var(--secondary-color);
    background: #fef7f0;
}

.feature-text {
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.remove-feature {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.remove-feature:hover {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.add-feature-btn, .add-trait-btn {
    background: var(--ai-light);
    color: var(--ai-color);
    border: 2px dashed var(--ai-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-feature-btn:hover, .add-trait-btn:hover {
    background: var(--ai-color);
    color: white;
    border-style: solid;
}

/* 特征预览 */
.feature-summary {
    background: var(--background);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 2rem;
}

.feature-summary h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

.match-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.match-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* AI聊天界面样式 */
.ai-header {
    background: linear-gradient(135deg, var(--ai-color), #a855f7);
}

.ai-header .chat-user-info {
    color: white;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
    color: white;
}

.ai-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.ai-messages {
    background: linear-gradient(180deg, #faf5ff, var(--background));
}

.message.ai-message .message-content {
    background: var(--ai-color);
    color: white;
    border-radius: var(--radius);
}

/* AI建议芯片 */
.ai-suggestions {
    padding: 1rem 1.5rem 6rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
}

.suggestion-chips {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.suggestion-chip {
    background: var(--ai-light);
    color: var(--ai-color);
    border: 1px solid var(--ai-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.suggestion-chip:hover {
    background: var(--ai-color);
    color: white;
}

/* AI输入容器 */
.ai-input-container {
    background: linear-gradient(135deg, var(--ai-light), #f3e8ff);
    border-top: 2px solid var(--ai-color);
}

.ai-input {
    background: white;
    border: 2px solid var(--ai-color);
}

.photo-upload-btn {
    background: var(--ai-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-upload-btn:hover {
    background: #7c3aed;
    transform: scale(1.1);
}

/* 聊天界面样式 */
.chat-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 72px;
    z-index: 50;
}

.chat-user-info {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 1rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.chat-user-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.online-status {
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 500;
}

.more-btn, .cancel-pair-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.cancel-pair-btn {
    color: var(--error-color);
}

.cancel-pair-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* 空匹配状态 */
.empty-matches {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-matches i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-matches p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-matches span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 匹配决策按钮 */
.match-decision {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.reject-btn {
    flex: 1;
    background: var(--background);
    color: var(--error-color);
    border: 2px solid var(--error-color);
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.reject-btn:hover {
    background: var(--error-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.accept-btn {
    flex: 1;
    background: var(--success-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.accept-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 配对成功样式 */
.paired-user-card {
    position: relative;
    margin-bottom: 1rem;
}

.pair-success-icon {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    animation: heartbeat 1s ease-in-out infinite alternate;
}

.match-card.paired {
    border: 2px solid var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.view-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* 配对成功动画 */
.success-animation {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    animation: heartbeat 1s ease-in-out infinite alternate;
}

.pair-success {
    text-align: center;
}

.pair-success h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.pair-success p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* 聊天消息 */
.chat-messages {
    padding: 1rem 1.5rem;
    padding-bottom: 2rem; /* 增加底部内边距，防止被输入框遮挡 */
    min-height: calc(100vh - 240px); /* 调整最小高度，为输入框留出空间 */
    max-height: calc(100vh - 240px); /* 设置最大高度，确保不会超出屏幕 */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    background: var(--background); /* 使用统一的背景色 */
}

/* AI聊天页面的特殊样式 */
#ai-chat-page .chat-messages {
    padding-bottom: 2.5rem; /* AI聊天页面需要更多底部空间 */
    min-height: calc(100vh - 260px);
    max-height: calc(100vh - 260px);
    background: var(--background); /* 与主背景色保持一致 */
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.message.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.message.received, .message.ai-message {
    align-self: flex-start;
    align-items: flex-start;
}

.message-content {
    background: var(--background);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.sent .message-content {
    background: var(--primary-color);
    color: white;
}

.message.ai-message .message-content {
    background: var(--ai-color);
    color: white;
    max-width: 90%;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

/* 聊天输入 */
.chat-input-container {
    position: fixed;
    bottom: 80px; /* 紧贴底部导航 */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    padding: 0.75rem 1.5rem; /* 减少内边距 */
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1); /* 添加阴影，增强层次感 */
}

/* AI聊天输入容器的特殊样式 */
.ai-input-container {
    background: linear-gradient(135deg, var(--ai-light), var(--surface));
    border-top: 1px solid var(--ai-color);
}

.chat-input {
    display: flex;
    align-items: center;
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    gap: 0.5rem;
    border: 2px solid var(--border-color);
}

.chat-input input {
    flex: 1;
    border: none;
    background: none;
    padding: 0.5rem;
    font-size: 1rem;
    outline: none;
}

.emoji-btn, .send-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.emoji-btn:hover, .send-btn:hover {
    transform: scale(1.1);
}

/* 我的资料界面样式 */
.profile-container {
    padding: 1.5rem;
}

.profile-photo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-photo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
}

.photo-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.photo-edit-btn:hover {
    transform: scale(1.1);
}

.profile-photo-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.profile-photo-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.ai-analyze-photo-btn {
    background: var(--ai-light);
    color: var(--ai-color);
    border: 2px solid var(--ai-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.ai-analyze-photo-btn:hover {
    background: var(--ai-color);
    color: white;
}

/* 资料信息 */
.profile-info {
    margin-bottom: 2rem;
}

.info-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-help-icon {
    background: var(--ai-light);
    color: var(--ai-color);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.ai-help-icon:hover {
    background: var(--ai-color);
    color: white;
    transform: scale(1.1);
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
}

.tag {
    display: inline-block;
    background: var(--background);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid var(--border-color);
}

/* 我的特征样式 */
.my-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.trait-tag {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.trait-tag.ai-analyzed {
    background: var(--ai-light);
    color: var(--ai-color);
    border: 1px solid var(--ai-color);
}

.trait-tag.user-added {
    background: #fef7f0;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

/* 照片画廊 */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.photo-item:hover .photo-remove-btn {
    opacity: 1;
}

.add-photo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    padding: 1rem;
}

.add-photo-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.add-photo-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.add-photo-btn span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* 资料统计 */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.stat-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.stat-card .stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 100;
    height: 80px; /* 固定高度，确保布局一致性 */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.5rem;
    border-radius: var(--radius);
    min-width: 60px;
}

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

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

.nav-item i {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

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

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

/* 匹配结果样式 */
.match-result {
    text-align: center;
}

.match-animation {
    font-size: 4rem;
    color: var(--ai-color);
    margin-bottom: 1rem;
    animation: sparkle 1s ease-in-out infinite alternate;
}

@keyframes sparkle {
    from {
        transform: scale(1) rotate(0deg);
    }
    to {
        transform: scale(1.1) rotate(5deg);
    }
}

.match-result h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.matched-user {
    margin-bottom: 2rem;
}

.matched-user img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--border-color);
}

.matched-user h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.matched-user p {
    color: var(--success-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.match-reason {
    background: var(--ai-light);
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

.match-reason p {
    font-size: 0.875rem;
    color: var(--ai-color);
    font-weight: 500;
}

.match-actions {
    display: flex;
    gap: 1rem;
}

.skip-btn {
    flex: 1;
    background: var(--background);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.chat-now-btn {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-now-btn:hover {
    background: var(--primary-dark);
}

/* 图片上传样式 */
.upload-container {
    text-align: center;
    min-width: 300px;
}

.upload-header {
    margin-bottom: 2rem;
}

.upload-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-area {
    border: 3px dashed var(--ai-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    background: var(--ai-light);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.upload-area:hover {
    border-color: #7c3aed;
    background: #ede9fe;
    transform: translateY(-2px);
}

.upload-area i {
    font-size: 3rem;
    color: var(--ai-color);
    margin-bottom: 1rem;
    display: block;
}

.upload-area p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ai-color);
    margin-bottom: 0.5rem;
}

.upload-area span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.upload-actions {
    display: flex;
    justify-content: center;
}

.camera-btn {
    background: var(--ai-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.camera-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

/* AI分析结果样式 */
.analysis-result {
    min-width: 320px;
    max-width: 400px;
}

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

.analysis-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.analysis-content {
    background: var(--background);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--ai-color);
}

.analysis-actions {
    display: flex;
    gap: 1rem;
}

.apply-btn {
    flex: 1;
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apply-btn:hover {
    background: #059669;
}

.chat-more-btn {
    flex: 1;
    background: var(--ai-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-more-btn:hover {
    background: #7c3aed;
}

/* 添加聊天页面专用样式，确保内容不被遮挡 */
#ai-chat-page,
#user-chat-page {
    padding-bottom: 160px; /* 为输入框和底部导航预留空间 */
    background: var(--background); /* 使用与body一致的背景色 */
    min-height: 100vh; /* 确保页面高度充满屏幕 */
}

/* 确保聊天输入框层级正确 */
.chat-input-container {
    z-index: 200; /* 高于底部导航 */
}

/* 修复聊天消息滚动时的遮挡问题 */
.chat-messages::after {
    content: '';
    display: block;
    height: 1rem; /* 额外的底部空间 */
    background: var(--background); /* 与聊天区域背景色一致 */
}

/* 响应式修复 */
@media (max-width: 480px) {
    .chat-messages {
        padding-bottom: 1.5rem;
        min-height: calc(100vh - 220px);
        max-height: calc(100vh - 220px);
    }
    
    #ai-chat-page .chat-messages {
        padding-bottom: 2rem;
        min-height: calc(100vh - 240px);
        max-height: calc(100vh - 240px);
    }
    
    .chat-input-container {
        padding: 0.5rem 1rem;
    }
}
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .gender-selector {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .filter-actions {
        gap: 0.75rem;
    }
    
    .match-actions, .analysis-actions {
        flex-direction: column;
    }
    
    .filter-container {
        padding: 1rem;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .bottom-nav {
        padding: 0.5rem 0;
    }
    
    .nav-item {
        min-width: 50px;
    }
    
    .nav-item span {
        font-size: 0.65rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 加载状态 */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AI特有样式增强 */
.ai-glow {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ai-color);
    font-style: italic;
    padding: 0.5rem 0;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--ai-color);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 特殊交互效果 */
.feature-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.suggestion-chip:active {
    transform: scale(0.95);
}

.ai-assistant-card:active {
    transform: scale(0.98);
}

/* 滚动条美化 */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--background);
}

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

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

/* ==================== 标签确认弹窗样式 ==================== */

.tag-confirmation-modal {
    z-index: 9999;
}

.tag-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.tag-modal-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-modal-header i {
    color: var(--ai-color);
}

.tag-modal-body {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    max-height: 50vh;
}

.tag-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.extracted-tags-section,
.suggested-tags-section,
.custom-tag-section {
    margin-bottom: 2rem;
}

.extracted-tags-section h4,
.suggested-tags-section h4,
.custom-tag-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-item-container {
    position: relative;
    display: flex;
    align-items: center;
}

.tag-item-container.suggested {
    opacity: 0.8;
}

.tag-item-container.custom {
    background: var(--ai-light);
    border-radius: var(--radius);
    padding: 0.25rem;
}

.tag-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.tag-checkbox-item:hover {
    border-color: var(--primary-color);
    background: var(--ai-light);
}

.tag-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.tag-checkbox:checked + .tag-text {
    color: var(--primary-color);
    font-weight: 600;
}

.tag-checkbox-item:has(.tag-checkbox:checked) {
    border-color: var(--primary-color);
    background: var(--ai-light);
}

.tag-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.tag-confidence {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--background);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.custom-tag-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

#custom-tag-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

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

.add-custom-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-custom-btn:hover {
    background: var(--primary-dark);
}

.custom-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remove-custom-tag {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease;
}

.remove-custom-tag:hover {
    background: #dc2626;
}

.tag-modal-footer {
    padding: 1rem 2rem 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--background);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#selected-tag-count {
    font-weight: 600;
    color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
}

.cancel-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.apply-btn {
    padding: 0.5rem 1.5rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.apply-btn:hover:not(:disabled) {
    background: #059669;
}

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

/* ==================== 标签应用成功通知 ==================== */

.tag-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    max-width: 350px;
    z-index: 10000;
    border-left: 4px solid var(--success-color);
    animation: slideInRight 0.3s ease;
}

.success-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.success-content > i {
    color: var(--success-color);
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.success-text h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.success-text p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.applied-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

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

/* ==================== 照片分析通知 ==================== */

.photo-analysis-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    z-index: 10000;
    border-left: 4px solid var(--ai-color);
    animation: slideInUp 0.3s ease;
    max-width: 300px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content > i {
    color: var(--ai-color);
    font-size: 1.25rem;
}

.notification-content span {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.notification-content button {
    background: var(--ai-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notification-content button:hover {
    background: #7c3aed;
}

/* ==================== 照片分析徽章 ==================== */

.photo-analysis-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--ai-color);
    color: white;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.photo-analysis-badge:hover {
    background: #7c3aed;
    transform: scale(1.05);
}

.photo-analysis-badge i {
    font-size: 0.8rem;
}

/* ==================== 动画效果 ==================== */

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

@keyframes slideInUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

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

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

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

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

@media (max-width: 480px) {
    .tag-modal-content {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .tag-modal-header,
    .tag-modal-body,
    .tag-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .tag-success-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        transform: none;
    }
    
    .photo-analysis-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        transform: none;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
/* ==================== 直接标签应用通知样式 ==================== */

.direct-tag-success-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    max-width: 400px;
    z-index: 10000;
    border-left: 4px solid var(--success-color);
    animation: slideInDown 0.3s ease;
}

.direct-tag-success-notification .success-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.direct-tag-success-notification .success-content > i {
    color: var(--success-color);
    font-size: 1.5rem;
    margin-top: 0.125rem;
}

.direct-tag-success-notification .success-text h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.direct-tag-success-notification .success-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.direct-tag-success-notification .applied-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.direct-tag-success-notification .applied-tag {
    background: var(--success-color);
    color: white;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==================== 新增动画效果 ==================== */

@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
}

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

@media (max-width: 480px) {
    .direct-tag-success-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        transform: none;
        animation: slideInDown 0.3s ease;
    }
    
    @keyframes slideInDown {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideOutUp {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100%);
            opacity: 0;
        }
    }
}