/* 个人中心样式 */
/* 页脚置底：内容不足一屏时，蓝色页脚也贴在视口底部 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.profile-container {
    max-width: 1200px;
    width: 100%;      /* flex 子项下防止 auto 边距导致收缩为内容宽 */
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex: 1 0 auto;   /* 中间区域撑满剩余空间，把页脚推到底部 */
}

.profile-header {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    border: 1px solid #bfdbfe;
}

.avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.user-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1e3a8a;
}

.user-info p {
    color: #2563eb;
}

.profile-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.profile-tabs .tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: #1e40af;
    transition: all 0.2s;
}

.profile-tabs .tab-btn.active {
    color: #1e3a8a;
    border-bottom: 2px solid #1e3a8a;
}

.panel {
    display: none;
}

.panel.active {
    display: block;
}

/* ===== 观看历史卡片 ===== */
.history-list .history-item {
    background: #fefefe; /* 微微偏灰，与纯白背景区分 */
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    border-left: 5px solid #3b82f6;
    transition: all 0.25s ease;
    cursor: pointer;
}

.history-list .history-item:hover {
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: #bfdbfe;
}

.history-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #1e3a8a;
}

.history-meta {
    font-size: 0.8rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.history-progress {
    margin-top: 0.5rem;
    background: #e2e8f0;
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
}

.history-progress .progress-bar {
    background: #3b82f6;
    height: 100%;
    width: 0%;
    border-radius: 10px;
}

/* ===== 笔记卡片 ===== */
.notes-list .note-item {
    background: #fefefe;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    border-left: 5px solid #8b5cf6;
    transition: all 0.25s ease;
    cursor: pointer;
}

.notes-list .note-item:hover {
    background: #f5f3ff;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: #c4b5fd;
}

.note-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #6d28d9;
}

.note-meta {
    font-size: 0.8rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.note-content {
    color: #1f2937;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    line-height: 1.4;
}

.note-time {
    display: inline-block;
    background: #ede9fe;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #6d28d9;
    margin-top: 0.5rem;
}

/* 公共元素 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #3b82f6;
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: #3b82f6;
    font-style: italic;
}

@media (max-width: 640px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .profile-tabs .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
.history-actions {
    margin-top: 0.5rem;
    text-align: right;
}
.delete-history-btn {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}
.delete-history-btn:hover {
    background: #fecaca;
    color: #b91c1c;
}
/* 垃圾桶图标样式 */
.history-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
}
.delete-history-icon {
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}
.delete-history-icon:hover {
    color: #ef4444;
}
.history-item {
    position: relative;
}