/* =============================================
   首页样式 - Index Page Styles
   引入公共样式，仅包含首页特有的样式
   ============================================= */

/* --- 头部区域 --- */
.header {
    padding: 20px 20px 0 20px;
    display: flex;
    align-items: center;
}

.avatar-wrapper {
    width: 100px;
    height: 120px;
    margin-right: 15px;
    position: relative;
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 22px !important;
    color: #1a2a44;
    margin-bottom: 16px;
    font-weight: 700;
}

.header-text p {
    font-size: 13px !important;
    margin-left: 8px !important;
    color: #3e3f41;
}

/* --- 主要内容区域 (可滚动) --- */
.content {
    flex: 1;
    padding: 0 15px 10px 15px;
    overflow-y: auto;
    scrollbar-width: none; 
}

.content::-webkit-scrollbar { 
    display: none; 
}

/* --- 通用卡片样式 --- */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(230, 235, 245, 0.6);
}

/* 标题行：图标+文字 */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.section-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* --- 服务网格 (3列) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* 单个服务项 */
.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: 12px;
    background: #f8f9fc;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-item:hover::before {
    opacity: 1;
}

.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-item:active {
    transform: translateY(-2px);
}

/* 服务图标圆形 */
.service-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

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

.service-icon svg {
    stroke: white;
    fill: white;
}

/* 服务标题和描述 */
.service-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.service-desc {
    font-size: 11px;
    color: #7f8c8d;
    text-align: center;
    line-height: 1.4;
}

/* --- 问答区域 --- */
.qa-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #4a90ff;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #f0f7ff;
}

/* 单个问答项 */
.qa-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #f8f9fc;
    transition: all 0.2s;
}

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

.qa-item:hover {
    background: #eef3ff;
    box-shadow: 0 2px 8px rgba(74, 144, 255, 0.1);
}

.qa-text {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.6;
}

/* "去试试"按钮 */
.try-btn {
    background: linear-gradient(135deg, #4a9fff, #2d7be5);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(74, 159, 255, 0.3);
    transition: all 0.2s;
}

.try-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 159, 255, 0.4);
}

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

/* --- 麦克风图标 --- */
.mic-icon {
    width: 24px;
    height: 24px;
    fill: #4a90ff;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mic-icon:hover {
    fill: #2d7be5;
    transform: scale(1.1);
}

/* --- 响应式适配 --- */
@media screen and (max-width: 768px) {
    .header-text h1 {
        font-size: 18px !important;
    }
    
    .header-text p {
        font-size: 12px !important;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .service-title {
        font-size: 13px;
    }
    
    .service-desc {
        font-size: 10px;
    }
}

@media screen and (max-width: 480px) {
    .avatar-wrapper {
        width: 80px;
        height: 100px;
    }
    
    .header-text h1 {
        font-size: 16px !important;
    }
}
