/* 左侧抽屉菜单 - drawer.css */

.side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0;
}

.side-drawer.open {
    pointer-events: all;
    opacity: 1;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-drawer.open .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 25vw; /* 改为视口宽度的25%，自适应 */
    min-width: 360px; /* 设置最小宽度保持可用性 */
    height: 100%;
    background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F7 100%);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

.side-drawer.open .drawer-content {
    transform: translateX(0);
}

.drawer-content::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* 用户信息区域 */
.drawer-user-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    cursor: default;
}

.drawer-user-section:active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 252, 0.95) 100%);
}

.user-avatar {
    width: calc(var(--app-font-size) * 3.125);
    height: calc(var(--app-font-size) * 3.125);
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #E8E5F0 0%, #F0EEF7 100%);
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.15);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: calc(var(--app-font-size) * 1.1); /* 响应式字体 */
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0;
    letter-spacing: 0.2px;
}

.user-actions {
    display: none;
}

.user-actions:hover {
    color: #7B6BD6;
}

.user-actions span {
    transition: color 0.2s;
}

.user-actions .divider {
    color: #D0D0D0;
    margin: 0 -2px;
}

.user-actions svg {
    width: calc(var(--app-font-size) * 0.75);
    height: calc(var(--app-font-size) * 0.75);
    color: #999;
    transition: transform 0.2s;
}

.user-actions:hover svg {
    transform: translateX(2px);
}

.user-right-icons {
    display: flex;
    gap: 16px;
    padding-top: 2px;
}

.drawer-icon-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px;
    border-radius: 10px;
    transition: all 0.2s;
}

.drawer-icon-btn:hover {
    background: rgba(59, 130, 246, 0.06);
}

.drawer-icon-btn:active {
    transform: scale(0.95);
}

.drawer-icon-btn svg {
    width: calc(var(--app-font-size) * 1.375);
    height: calc(var(--app-font-size) * 1.375);
    color: #666;
    transition: color 0.2s;
}

.drawer-icon-btn:hover svg {
    color: #7B6BD6;
}

.icon-label {
    font-size: calc(var(--app-font-size) * 0.75); /* 响应式字体 */
    color: #666;
    font-weight: 500;
}

/* 功能卡片区域 */
.drawer-cards {
    padding: 12px 18px;
    display: flex;
    gap: 10px;
    background: transparent;
}

.drawer-card {
    flex: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 252, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05),
                0 1px 3px rgba(0, 0, 0, 0.03);
}

.drawer-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12),
                0 2px 6px rgba(0, 0, 0, 0.06);
}

.drawer-card:active {
    transform: translateY(0) scale(0.98);
}

.card-icon {
    width: calc(var(--app-font-size) * 2.625);
    height: calc(var(--app-font-size) * 2.625);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.card-icon svg {
    width: calc(var(--app-font-size) * 1.375);
    height: calc(var(--app-font-size) * 1.375);
}

.card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.card-title {
    font-size: calc(var(--app-font-size) * 0.95); /* 响应式字体 */
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.1px;
}

.card-desc {
    font-size: calc(var(--app-font-size) * 0.75); /* 响应式字体 */
    color: #999;
    letter-spacing: 0.1px;
}

/* 抽屉区块 */
.drawer-section {
    margin-top: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 252, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-title {
    font-size: calc(var(--app-font-size) * 1.15); /* 响应式字体 */
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.2px;
}

.section-more {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: calc(var(--app-font-size) * 0.85); /* 响应式字体 */
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.section-more:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #7B6BD6;
}

.section-more svg {
    transition: transform 0.2s;
}

.section-more:hover svg {
    transform: translateX(2px);
}

/* 最近使用 - 已移除 */

/* 对话记录 */
.chat-history {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.history-date {
    font-size: calc(var(--app-font-size) * 0.8); /* 响应式字体 */
    color: #999;
    padding: 10px 0 8px;
    font-weight: 500;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
}

.history-item:hover {
    background: rgba(59, 130, 246, 0.04);
    padding: 16px 12px;
    margin: 0 -12px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:active {
    transform: scale(0.98);
}

.history-text {
    font-size: var(--app-font-size); /* 响应式字体 */
    color: #333;
    font-weight: 500;
    letter-spacing: 0.1px;
}

.history-item:hover .history-text {
    color: #7B6BD6;
}

.history-time {
    font-size: calc(var(--app-font-size) * 0.8); /* 响应式字体 */
    color: #999;
    font-weight: 400;
}

/* 历史记录增强样式 - 仿豆包 */
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-icon {
    font-size: calc(var(--app-font-size) * 1.25);
    width: calc(var(--app-font-size) * 2.0);
    height: calc(var(--app-font-size) * 2.0);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 8px;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
    min-width: 0;
}

.history-text {
    font-size: calc(var(--app-font-size) * 0.95); /* 响应式字体 */
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    font-size: calc(var(--app-font-size) * 0.8); /* 响应式字体 */
    color: #999;
    margin-top: 2px;
}

.history-star {
    font-size: 14px;
    flex-shrink: 0;
}

.history-loading,
.history-empty,
.history-error {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 最近使用 - 一列模式 - 已移除 */

/* 55寸触摸屏适配 - 支持竖屏1080px */
@media screen and (min-width: 1024px) {
    .drawer-content {
        max-width: 30vw; /* 改为视口宽度的30%，自适应 */
        min-width: 450px;
    }
    
    .drawer-user-section {
        padding: 24px 22px 20px;
    }
    
    .user-avatar {
        width: 58px;
        height: 58px;
    }
    
    .drawer-cards {
        padding: 22px;
        gap: 14px;
    }
    
    .drawer-card {
        padding: 16px;
    }
    
    .card-icon {
        width: 52px;
        height: 52px;
    }
    
    .drawer-section {
        padding: 22px;
    }
}

/* 横屏大屏幕 */
@media screen and (min-width: 1920px) {
    .drawer-content {
        max-width: 28vw; /* 改为视口宽度的28%，自适应 */
        min-width: 480px;
    }
    
    .drawer-user-section {
        padding: 28px 24px 22px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
    }
    
    .card-icon {
        width: 56px;
        height: 56px;
    }
}
