/* 学生仪表盘优化样式 */

/* 仪表盘主容器 */
.dashboard-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 欢迎区域 —— 轻盈 hero（无卡片边框） */
.welcome-section-improved {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    padding: 10px 0 30px;
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--theme-border);
}

.welcome-content-improved {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-content-improved h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--theme-accent), #48bb78);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--theme-text-muted);
}

.welcome-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-text-muted);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--theme-accent);
}

.daily-goal {
    background: var(--theme-surface-hover);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border-left: 3px solid var(--theme-accent);
}

.daily-goal h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--theme-accent);
}

/* 快速统计网格 —— 单容器内分列，竖线分隔（去卡片感） */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-bottom: 40px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    overflow: hidden;
}

.quick-stat-card {
    background: transparent;
    border-radius: 0;
    padding: 26px 24px;
    border: none;
    border-right: 1px solid var(--theme-border);
    transition: background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quick-stat-card:last-child {
    border-right: none;
}

.quick-stat-card:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
    background: var(--theme-surface-hover);
}

.quick-stat-card::before {
    display: none;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.stat-icon-container {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-surface-hover);
}

.stat-icon-container i {
    font-size: 1.2rem;
    color: var(--theme-accent);
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.trend-up {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.trend-down {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--theme-text);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--theme-text-muted);
    font-size: 0.88rem;
}

.stat-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
    font-size: 0.82rem;
}

/* 最近完成知识点列表 */
.recent-topic-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.recent-topic-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}
.rt-code {
    background: var(--theme-accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.72rem;
    flex-shrink: 0;
}
.rt-title {
    color: var(--theme-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 学习进度部分 */
.learning-progress-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--theme-text);
}

.view-all-link {
    color: var(--theme-accent);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    gap: 10px;
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.paper-progress-card {
    background: linear-gradient(135deg, var(--theme-surface), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.paper-progress-card:hover {
    transform: translateY(-5px);
    border-color: var(--theme-accent);
}

.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.paper-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.paper-title h3 {
    font-size: 1.3rem;
    color: var(--theme-text);
}

.paper-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-p1 { background: rgba(52, 152, 219, 0.1); color: #3498db; }
.badge-p2 { background: rgba(155, 89, 182, 0.1); color: #9b59b6; }
.badge-p3 { background: rgba(241, 196, 15, 0.1); color: #f1c40f; }
.badge-p4 { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }

.progress-bar-container {
    margin-bottom: 15px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.progress-label {
    color: var(--theme-text-muted);
}

.progress-percentage {
    color: var(--theme-text);
    font-weight: 500;
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.fill-p1 { background: linear-gradient(90deg, #3498db, #2980b9); }
.fill-p2 { background: linear-gradient(90deg, #9b59b6, #8e44ad); }
.fill-p3 { background: linear-gradient(90deg, #f1c40f, #f39c12); }
.fill-p4 { background: linear-gradient(90deg, #2ecc71, #27ae60); }

.paper-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-mini {
    text-align: center;
}

.mini-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--theme-text);
}

.mini-label {
    font-size: 0.85rem;
    color: var(--theme-text-muted);
    margin-top: 5px;
}

/* 快速入口 —— 紧凑横排条目（去卡片感） */
.quick-actions-grid {
    margin-bottom: 40px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.action-card {
    background: transparent;
    border-radius: 10px;
    padding: 14px 16px;
    border: none;
    text-align: left;
    text-decoration: none;
    color: var(--theme-text);
    transition: background 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.action-card:hover {
    transform: none;
    border-color: transparent;
    background: var(--theme-surface-hover);
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-surface-hover);
    font-size: 1.2rem;
    color: var(--theme-accent);
    flex-shrink: 0;
}

.action-card h3 {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.action-description {
    display: none;
}

/* 最近活动时间线 */
.recent-activity-timeline {
    position: relative;
    padding-left: 30px;
}

.recent-activity-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--theme-accent), transparent);
}

.timeline-item {
    position: relative;
    padding: 20px 0;
    border-bottom: 1px solid var(--theme-border);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 25px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--theme-accent);
    border: 3px solid var(--theme-bg);
}

.timeline-time {
    color: var(--theme-text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.timeline-content {
    background: var(--theme-surface-hover);
    border-radius: 10px;
    padding: 15px;
}

.timeline-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--theme-text);
}

.timeline-description {
    color: var(--theme-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--theme-text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--theme-accent);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--theme-text);
}

.empty-state p {
    max-width: 400px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .welcome-section-improved {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .welcome-content-improved h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 15px;
    }
    
    .quick-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .welcome-section-improved {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .paper-stats {
        grid-template-columns: 1fr;
    }
    
    .welcome-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

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

.dashboard-main > * {
    animation: fadeInUp 0.5s ease forwards;
}

.dashboard-main > *:nth-child(1) { animation-delay: 0.1s; }
.dashboard-main > *:nth-child(2) { animation-delay: 0.2s; }
.dashboard-main > *:nth-child(3) { animation-delay: 0.3s; }
.dashboard-main > *:nth-child(4) { animation-delay: 0.4s; }
.dashboard-main > *:nth-child(5) { animation-delay: 0.5s; }

/* 进度条动画 */
.progress-fill {
    animation: progressFill 1s ease-out;
}

@keyframes progressFill {
    from { width: 0; }
    to { width: var(--progress-width); }
}

/* 今日学习目标 */
.daily-goal-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.daily-goal-section .goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.daily-goal-section .goal-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.daily-goal-section .goal-date {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.daily-goal-section .goal-content {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 20px;
    align-items: center;
}

.daily-goal-section .goal-topics h3,
.daily-goal-section .goal-exercises h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.daily-goal-section .topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.daily-goal-section .topic-tag {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.daily-goal-section .goal-progress {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
}

.daily-goal-section .progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.daily-goal-section .progress-bar-large {
    height: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    overflow: hidden;
}

.daily-goal-section .progress-bar-large .progress-fill {
    height: 100%;
    background: #2ecc71;
    border-radius: 5px;
    transition: width 0.5s ease;
}
/* 学习进度图表 */
.chart-section {
    margin-bottom: 30px;
}
.chart-section .chart-card h3 {
    color: var(--theme-text);
}
