/* 全局样式 - 统一设计规范 */
:root {
    --primary-color: #28a745;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-bg: linear-gradient(135deg, #28a745 0%, #17a2b8 100%);
    
    /* 统一设计token */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 15px;
    --border-radius-small: 10px;
    --transition: all 0.3s ease;
}

/* 通用头像尺寸限制 */
img[src*="avatar"], 
img[src*="uploads"] {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* 防止头像图片过大影响布局 */
.avatar-container img,
.user-avatar img,
.leaderboard-avatar img,
.podium-avatar img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
}

/* 主要内容区域 */
.main-content {
    padding: 0;
    flex: 1;
    width: 100%;
}

/* PC端为导航栏预留空间 */
@media (min-width: 992px) {
    .main-content {
        padding-top: 80px;
    }
    
    /* 首页英雄区域特殊处理 - 不需要顶部间距 */
    .main-content:has(.hero-section) {
        padding-top: 0;
    }
    
    /* 如果浏览器不支持:has()选择器，使用类名方式 */
    .main-content.home-page {
        padding-top: 0;
    }
    
    /* 非首页的页面头部区域 */
    .page-header {
        margin-top: 2rem;
    }
    
    /* 为主要内容区域的容器添加顶部间距 */
    .main-content > .container:first-child,
    .main-content > div:first-child > .container:first-child {
        padding-top: 2rem;
    }
    
    /* 首页不需要额外的容器间距 */
    .home-page .container,
    .home-page > .container:first-child,
    .home-page > div:first-child > .container:first-child {
        padding-top: 0;
    }
    
    /* 确保alert消息框不被遮挡 */
    .main-content .alert:first-child {
        margin-top: 1rem;
    }
    
    .home-page .alert:first-child {
        margin-top: 5rem; /* 首页需要更多间距因为导航栏是透明的 */
    }
    
    /* 确保页面标题不被遮挡 */
    .main-content h1:first-child,
    .main-content .container h1:first-child {
        margin-top: 2rem;
    }
    
    .home-page h1:first-child,
    .home-page .container h1:first-child {
        margin-top: 0;
    }
    
    /* 表单页面特殊处理 */
    .main-content .row:first-child {
        margin-top: 2rem;
    }
    
    .home-page .row:first-child {
        margin-top: 0;
    }
}

@media (max-width: 991.98px) {
    /* 移除移动端额外的高度 */
    /* .main-content { padding-top: 20px; } */
    
    /* 移动端页面内容不需要额外的顶部间距 */
    .main-content > .container:first-child,
    .main-content > div:first-child > .container:first-child {
        padding-top: 0;
    }
}

/* 现代化移动端导航 - 样式已由 base.html Critical CSS 接管 */
/* 保留部分样式以防万一，但去除动画和可能引起不稳定的属性 */
.modern-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
}

.bottom-nav-item {
    transition: none !important;
    transform: none !important;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    transform: none !important;
}

/* 确保内容不被底部导航栏遮挡 */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 90px !important;
    }
}

/* 卡片样式 - 统一标准 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    background: white;
    overflow: hidden;
}

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

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    background: white;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* 按钮样式 - 统一标准 */
.btn {
    border-radius: var(--border-radius-small);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-white {
    background-color: white;
    color: #333;
    border: 1px solid white;
    transition: all 0.3s ease;
}

.btn-white:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(45deg, #28a745, #1e7e34);
}

/* 修复按钮选中变蓝问题 */
.btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary:active:focus {
    background: linear-gradient(45deg, #218838, #1e7e34) !important;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.5) !important;
    border-color: transparent !important;
    color: white !important;
}

.btn-cta:focus, .btn-cta:active {
    color: #28a745 !important; /* 保持文字绿色 */
    background: #f8f9fa !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.5) !important;
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #1e7e34);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #e0a800);
}

.btn-info {
    background: linear-gradient(45deg, #17a2b8, #138496);
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #bd2130);
}

/* 文件上传区域 - 统一标准 */
.file-upload-area {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 2rem;
    background: #fafafa;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.05);
    transform: scale(1.02);
}

.file-upload-area.dragover {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
    transform: scale(1.02);
}

.file-upload-area.dragover .upload-icon i {
    color: var(--success-color);
}

.upload-icon {
    margin-bottom: 1.5rem;
}

.file-upload-area h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.file-upload-area p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* 识别结果样式 */
.recognition-result {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.trash-category {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

.trash-category.kitchen {
    background: #52C41A;
}

.trash-category.recyclable {
    background: #1890FF;
}

.trash-category.hazardous {
    background: #FF4D4F;
}

.trash-category.other {
    background: #8C8C8C;
}

/* 积分显示 */
.points-display {
    background: var(--gradient-bg);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.points-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

/* 排行榜样式 - 旧的，保留兼容性 */
.leaderboard-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 20px;
    min-width: 40px;
}

.leaderboard-rank.gold {
    color: #FFD700;
}

.leaderboard-rank.silver {
    color: #C0C0C0;
}

.leaderboard-rank.bronze {
    color: #CD7F32;
}

/* 礼品商城专属样式 */
.user-points-card {
    background: var(--gradient-bg);
    color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.2);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.user-points-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: radial-gradient(circle at 90% 10%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.points-display {
    text-align: center;
    margin-top: 10px;
}

.points-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.points-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

.gift-filters {
    background: white;
    padding: 15px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: inline-block;
    max-width: 100%;
}

.gift-categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gift-categories-scroll::-webkit-scrollbar {
    display: none;
}

.gift-filters .btn {
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    border: 1px solid transparent;
    background-color: #f8f9fa;
    color: #666;
}

.gift-filters .btn:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.gift-filters .btn.active {
    background: var(--gradient-bg);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.gift-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.gift-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.gift-image {
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.gift-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gift-card:hover .gift-image img {
    transform: scale(1.1);
}

.gift-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gift-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gift-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex: 1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gift-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #f8f9fa;
}

.gift-price {
    display: flex;
    align-items: baseline;
}

.price-points {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-right: 5px;
    line-height: 1;
}

.price-label {
    font-size: 0.9rem;
    color: #adb5bd;
    font-weight: 600;
}

.gift-stock {
    font-size: 0.9rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 500;
}

.gift-actions {
    margin-top: auto;
}

.exchange-btn {
    width: 100%;
    border-radius: 12px;
    padding: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
    transition: all 0.3s ease;
    background: var(--gradient-bg);
    border: none;
}

.exchange-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.exchange-btn:disabled {
    background: #e9ecef;
    color: #adb5bd;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* 库存不足状态 */
.gift-card.out-of-stock {
    opacity: 0.8;
}

.gift-card.out-of-stock .gift-image::after {
    content: '暂时缺货';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

/* 模态框优化 */
#exchangeModal .modal-content {
    border-radius: 25px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}

#exchangeModal .modal-header {
    background: var(--gradient-bg);
    color: white;
    border: none;
    padding: 25px;
}

#exchangeModal .modal-body {
    padding: 40px 30px;
    text-align: center;
}

#exchangeModal .gift-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
}

#exchangeModal h6 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

#exchangeModal .modal-footer {
    border-top: none;
    padding: 0 30px 30px;
    justify-content: center;
    gap: 15px;
}

#exchangeModal .btn {
    min-width: 120px;
    border-radius: 12px;
}

/* 礼品筛选动画 */
.gift-item {
    transition: all 0.4s ease;
}

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

/* 问答界面样式 */
.chat-container {
    background: white;
    border-radius: 15px;
    height: 60vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.chat-message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.user {
    background: transparent !important;
    color: white;
    margin-left: auto;
    margin-right: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.chat-message.bot {
    background: transparent !important;
    color: #333;
    margin-right: auto;
    margin-left: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.chat-input-container {
    background: white;
    border-radius: 25px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.chat-input {
    border: none;
    outline: none;
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    background: #f8f9fa;
}

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

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

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    .points-number {
        font-size: 2rem;
    }
    
    .leaderboard-item {
        padding: 15px;
    }
    
    .file-upload-area {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .points-number {
        font-size: 1.8rem;
    }
    
    .leaderboard-item {
        padding: 10px;
    }
    
    .leaderboard-rank {
        font-size: 1.2rem;
        margin-right: 10px;
        min-width: 30px;
    }
    
    .gift-info {
        padding: 15px;
    }
    
    .chat-container {
        height: 50vh;
    }
    
    .chat-message {
        max-width: 90%;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #218838;
}

/* 表单样式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

/* 徽章样式 */
.badge {
    border-radius: 20px;
    padding: 8px 12px;
    font-weight: 600;
}

/* 首页特殊样式 */
.hero-section {
    background: var(--gradient-bg);
    color: white;
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 50px 50px;
    margin-bottom: 50px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(at 40% 20%, hsla(145, 80%, 70%, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(145, 80%, 70%, 0.1) 0px, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: pulse-bg 10s infinite alternate;
}

@keyframes pulse-bg {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-actions .btn {
    min-width: 140px;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .hero-section {
        padding: 48px 0 48px 0;
    }
}

/* 增强特性卡片样式 */
.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* 统计区域样式 */
.stats-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 60px 0;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-color), #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 分类卡片增强样式 */
.categories-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    position: relative;
}

/* 装饰背景 */
.categories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, white 0%, transparent 100%);
    pointer-events: none;
}

.category-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 更有弹性的过渡 */
    height: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 分类特定样式 - 添加浅色背景和边框 */
.category-card.kitchen-waste {
    background: linear-gradient(145deg, #ffffff 0%, #f0fff4 100%);
}
.category-card.kitchen-waste:hover {
    border-color: #28a745;
}
.category-card.kitchen-waste .category-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.category-card.recyclable {
    background: linear-gradient(145deg, #ffffff 0%, #f0f7ff 100%);
}
.category-card.recyclable:hover {
    border-color: #17a2b8;
}
.category-card.recyclable .category-icon {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.category-card.hazardous {
    background: linear-gradient(145deg, #ffffff 0%, #fff0f0 100%);
}
.category-card.hazardous:hover {
    border-color: #dc3545;
}
.category-card.hazardous .category-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.category-card.other-waste {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}
.category-card.other-waste:hover {
    border-color: #6c757d;
}
.category-card.other-waste .category-icon {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.category-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    transition: transform 0.4s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-card h4, .category-card h3 {
    margin-bottom: 1rem;
    color: #333;
    font-weight: 700;
    font-size: 1.4rem;
}

.category-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* 用户资料卡片样式 */
.user-profile-card {
    background: var(--gradient-bg);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow-hover);
    margin-bottom: 2rem;
}

.profile-avatar {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    margin-bottom: 1rem;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-card .stat-number {
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.stat-card .stat-label {
    color: #666;
    font-weight: 500;
    font-size: 1rem;
    opacity: 0.9;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 每日任务样式 */
.task-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.task-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

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

.task-info h6 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.task-info small {
    color: #666;
}

.task-progress {
    margin-top: 10px;
}

.task-count {
    font-weight: 600;
    color: #333;
}

.task-status {
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.task-status.completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.task-status.in-progress {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.task-card .progress {
    height: 8px;
    border-radius: 4px;
}

.task-card .progress-bar {
    border-radius: 4px;
    transition: width 0.3s ease;
} 

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, 
        rgba(40, 167, 69, 0.15) 0%, 
        rgba(23, 162, 184, 0.15) 50%, 
        rgba(40, 167, 69, 0.1) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.hero-stats .stat-item {
    text-align: center;
    padding: 0;
    background: none;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

.hero-stats .stat-number {
    font-size: 3rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.5rem !important;
    color: white !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
}

.hero-stats .stat-label {
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    opacity: 0.9 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .hero-stats .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .hero-stats .stat-item:last-child {
        border-bottom: none;
    }
    
    .hero-stats .stat-number {
        font-size: 2.5rem;
        margin-bottom: 0;
    }
    
    .hero-stats .stat-label {
        font-size: 0.9rem;
    }
} 

/* 图片轮播样式 */
.image-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.image-slideshow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    transition: opacity 0.5s ease-in-out;
}

.image-slideshow img.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 确保扫描覆盖层在图片之上 */
.scan-overlay {
    z-index: 10;
}

.scan-corners {
    z-index: 10;
}

.result-panel {
    z-index: 10;
}

/* 排行榜页面专属样式 */
.btn-outline-success {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.dropdown-item {
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f0fff4;
    color: var(--primary-color);
}

.dropdown-item.active, .dropdown-item:active {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--primary-color);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 页面头部背景 - 卡片式设计 */
.page-header {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
    padding: 40px 20px;
    margin-top: 10px;
    margin-bottom: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(150, 201, 61, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(255,255,255,0.15) 0%, transparent 40%);
    pointer-events: none;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.page-header .lead {
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
}

/* 前三名奖台区域 */
.top-three {
    padding: 20px 0 40px 0;
}

.podium-item {
    position: relative;
    padding: 30px 20px;
    border-radius: 20px;
    margin-bottom: 30px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    background: white;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.podium-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

/* 金牌样式 */
.podium-item.gold {
    background: linear-gradient(145deg, #fff9db 0%, #fff 100%);
    border: 2px solid #ffd700;
    transform: scale(1.05);
    z-index: 2;
}
.podium-item.gold:hover {
    transform: scale(1.05) translateY(-10px);
}
.podium-item.gold .podium-rank-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}
.podium-item.gold .podium-points {
    color: #d48806;
}

/* 银牌样式 */
.podium-item.silver {
    background: linear-gradient(145deg, #f8f9fa 0%, #fff 100%);
    border: 2px solid #e9ecef;
    margin-top: 20px; /* 视觉上比第一名低 */
}
.podium-item.silver .podium-rank-badge {
    background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%);
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.3);
}
.podium-item.silver .podium-points {
    color: #6c757d;
}

/* 铜牌样式 */
.podium-item.bronze {
    background: linear-gradient(145deg, #fff5eb 0%, #fff 100%);
    border: 2px solid #f3d9c6;
    margin-top: 40px; /* 视觉上比第二名低 */
}
.podium-item.bronze .podium-rank-badge {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
}
.podium-item.bronze .podium-points {
    color: #d35400;
}

/* 统一头像占位符样式 */
.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e9ecef;
    color: #adb5bd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.avatar-placeholder i {
    font-size: 1.2em;
}

.avatar-placeholder-podium {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #adb5bd;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gold .avatar-placeholder-podium { border-color: #ffc107; background-color: #fff9db; color: #ffc107; }
.silver .avatar-placeholder-podium { border-color: #dee2e6; background-color: #f8f9fa; color: #adb5bd; }
.bronze .avatar-placeholder-podium { border-color: #cd7f32; background-color: #fff5eb; color: #cd7f32; }

/* 皇冠图标 */
.crown-icon {
    font-size: 2.5rem;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

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

/* 排名徽章 */
.podium-rank-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* 头像样式优化 */
.podium-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    overflow: hidden;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}
.podium-avatar i {
    font-size: 3rem;
    color: #ccc;
}

.podium-name {
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
    width: 100%;
}

.podium-points {
    font-weight: 600;
    font-size: 1.1rem;
}

/* 排行榜列表样式 */
.leaderboard-list {
    margin-top: 1rem;
}

.leaderboard-item {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.leaderboard-item.current-user {
    background: #f0fff4;
    border: 1px solid #28a745;
}

.leaderboard-rank-wrapper {
    width: 40px;
    text-align: center;
    margin-right: 15px;
}

.leaderboard-rank {
    font-weight: 700;
    font-size: 1.2rem;
    color: #888;
}

.leaderboard-rank.gold { color: #ffd700; font-size: 1.4rem; }
.leaderboard-rank.silver { color: #adb5bd; font-size: 1.4rem; }
.leaderboard-rank.bronze { color: #e67e22; font-size: 1.4rem; }

.leaderboard-avatar {
    width: 45px;
    height: 45px;
    margin-right: 15px;
    flex-shrink: 0;
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.leaderboard-info {
    flex: 1;
    min-width: 0; /* fix flex text truncation */
}

.leaderboard-name {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.leaderboard-points {
    text-align: right;
    min-width: 80px;
}

.points-value {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    line-height: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .page-header {
        padding: 30px 15px;
        margin-bottom: 1.5rem;
        border-radius: 16px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }

    .podium-item {
        padding: 20px 10px;
        margin-bottom: 15px;
    }
    
    .podium-item.silver, 
    .podium-item.bronze {
        margin-top: 0;
    }
    
    .podium-item.gold {
        transform: none;
        margin-bottom: 20px;
    }
    
    .podium-avatar {
        width: 60px;
        height: 60px;
    }
    
    .leaderboard-item {
        padding: 12px;
    }
    
    .leaderboard-avatar {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .leaderboard-rank-wrapper {
        width: 30px;
        margin-right: 5px;
    }
}

/* 排行榜侧边栏样式 */
.my-rank-display {
    padding: 20px;
    background: var(--gradient-bg);
    color: white;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.my-rank-display .rank-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.rank-stat {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.rank-stat .stat-value {
    font-weight: 700;
    font-size: 1.2rem;
}

.reward-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.reward-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.reward-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.reward-info h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.reward-info small {
    font-size: 0.85rem;
}

.tip-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.tip-item:last-child {
    margin-bottom: 0;
}

.tip-item h6 {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}


/* AI问答页面专属样式 */
.modern-chat-container {
    width: 100%;
    height: 650px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

/* 头部样式 */
.chat-header {
    background: var(--gradient-bg);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(10px);
}

.title-info h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.title-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px #4CAF50;
}

.status-indicator.online {
    background: #4CAF50;
}

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

/* 聊天主体 */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    scroll-behavior: smooth;
    position: relative;
}

/* 消息容器 */
.message-wrapper {
    display: flex;
    margin-bottom: 24px;
    align-items: flex-start;
    animation: messageSlideIn 0.3s ease-out;
}

.message-wrapper.user-message {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.message-wrapper.bot-message {
    justify-content: flex-start;
}

/* 头像样式 */
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.bot-message .message-avatar {
    background: var(--gradient-bg);
    margin-right: 12px;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    margin-left: 12px;
}

.user-message .message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 消息内容 */
.message-content {
    max-width: 75%;
    min-width: 0;
}

.message-bubble {
    padding: 16px 20px;
    border-radius: 20px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 15px;
}

.bot-message .message-bubble {
    background: #ffffff;
    color: #2c3e50;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-top-left-radius: 5px;
}

.user-message .message-bubble {
    background: var(--gradient-bg);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
    border: none;
    border-top-right-radius: 5px;
}

.message-text {
    margin: 0;
}

.message-time {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 8px;
    text-align: left;
}

.user-message .message-time {
    text-align: right;
}

/* 输入区域 */
.chat-input-area {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 20px 24px;
    flex-shrink: 0;
}

/* 快捷问题 */
.quick-questions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.quick-question {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.quick-question:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
}

/* 输入框容器 */
.input-container {
    position: relative;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    padding: 6px 6px 6px 20px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
    background: white;
}

#chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 15px;
    outline: none;
    color: #2c3e50;
}

#chat-input::placeholder {
    color: #adb5bd;
}

.send-button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-bg);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 18px;
    margin-left: 10px;
}

.send-button:not(:disabled):hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.send-button:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 动画 */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 格式化文本样式 */
.message-text strong {
    font-weight: 600;
    color: inherit;
}

.message-text em {
    font-style: italic;
    opacity: 0.9;
}

.bot-message .message-text strong {
    color: var(--primary-color);
}

/* 侧边栏样式 */
.sidebar-questions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.question-item {
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.question-item:hover {
    background: var(--gradient-bg);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
    border-color: transparent;
}

.qa-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
}

.qa-stats .stat-item {
    padding: 0;
}

.qa-stats .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    margin-bottom: 0.2rem;
}

.qa-stats .stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 1;
}

.qa-reward .alert {
    margin: 0;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

/* 积分通知动画 */
.notification-fade-in {
    animation: fadeInSlide 0.5s ease-out;
}

.notification-fade-out {
    animation: fadeOutSlide 0.3s ease-in;
}

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

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

/* 打字指示器动画 */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #adb5bd;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* 认证页面（登录/注册）样式 */
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.auth-header {
    background: transparent;
    color: #333;
    padding: 0 0 30px 0;
    text-align: left;
    position: relative;
    overflow: visible;
}

.auth-header::before {
    display: none;
}

.auth-header h4 {
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    color: #333;
    font-size: 1.8rem;
}

.auth-header p {
    opacity: 0.8;
    margin: 0;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    color: #666;
}

.auth-body {
    padding: 40px;
}

.auth-form .form-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.auth-form .input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    color: #adb5bd;
    border-radius: 10px 0 0 10px;
}

.auth-form .form-control {
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.auth-form .input-group .form-control {
    border-radius: 0 10px 10px 0;
}

.auth-form .input-group .btn {
    cursor: pointer;
    z-index: 10;
    position: relative;
    border: 2px solid #e9ecef;
    border-left: none;
    background: white;
    color: #6c757d;
    transition: all 0.3s ease;
}

.auth-form .input-group .btn:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-form .input-group:focus-within .btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.auth-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.auth-form .input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.auth-btn-submit {
    background: var(--gradient-bg);
    border: none;
    padding: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

.auth-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-footer a:hover {
    color: #218838;
    text-decoration: underline;
}

/* 侧边栏福利列表 */
.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #ffc107;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.benefit-content h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: white;
}

.benefit-content p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 步骤指南样式 */
.guide-steps {
    position: relative;
    padding-left: 20px;
}

.guide-steps::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #e9ecef;
}

.guide-step {
    position: relative;
    margin-bottom: 25px;
    padding-left: 25px;
}

.guide-step:last-child {
    margin-bottom: 0;
}

.step-number {
    position: absolute;
    left: -20px;
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    z-index: 1;
}

.guide-content h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #333;
}

.guide-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* 密码强度条 */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.8rem;
    display: block;
    text-align: right;
}

/* 平台特色列表 */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item-auth {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item-auth:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.feature-icon-auth {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffc107;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1rem;
}

.feature-text-auth {
    font-weight: 500;
    color: white;
}

.feature-text-auth h6 {
    color: white;
}

.feature-text-auth .small {
    color: rgba(255, 255, 255, 0.8);
}

/* 安全保障列表 */
.security-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.security-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
}

.security-item i {
    color: var(--success-color);
    margin-right: 10px;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modern-chat-container {
        height: calc(100vh - 200px);
        min-height: 500px;
        border-radius: 16px;
    }
    
    .chat-header {
        padding: 15px 20px;
    }
    
    .chat-body {
        padding: 15px;
    }
    
    .chat-input-area {
        padding: 15px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .quick-questions {
        overflow-x: auto;
        padding-bottom: 5px;
        flex-wrap: nowrap;
    }
    
    .quick-question {
        flex-shrink: 0;
    }
}

/* 移动端隐藏滚动条，提供类原生体验 */
@media (max-width: 991.98px) {
    /* 隐藏 Chrome, Safari, Opera 的滚动条 */
    ::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        -webkit-appearance: none !important;
        background: transparent !important;
    }
    
    /* 隐藏 IE, Edge, Firefox 的滚动条 */
    html, body, * {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }
}

.opacity-10 {
    opacity: 0.1 !important;
}
