/**
 * 新码少儿编程 - 自定义样式
 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 轮播图样式 */
#mainCarousel {
    margin-top: -1px;
}

.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-overlay {
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

/* 功能入口卡片 */
.hover-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* 课程卡片 */
.course-placeholder {
    border-radius: 8px 8px 0 0;
}

.card {
    border-radius: 8px;
    overflow: hidden;
}

/* 文章卡片 */
.card-title a:hover {
    color: #0d6efd !important;
}

/* 页脚样式 */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff !important;
}

/* 返回顶部按钮 */
#backToTop {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon i {
        font-size: 1.5rem !important;
    }
    
    #mainCarousel .carousel-image {
        height: 300px !important;
    }
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

/* 模态框样式 */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-bottom: 2px solid #f0f0f0;
}

/* 按钮样式增强 */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* 徽章样式 */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* 分隔线 */
hr {
    border-top: 2px solid;
    opacity: 0.1;
}

/* 列表组样式 */
.list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    transition: background-color 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* 卡片头部样式 */
.card-header {
    border-bottom: none;
    border-radius: 8px 8px 0 0 !important;
    padding: 1rem 1.25rem;
}

/* 辅助类 */
.text-purple {
    color: #6f42c1 !important;
}

.bg-purple {
    background-color: #6f42c1 !important;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    100% {
        transform: rotate(360deg);
    }
}

/* 表单样式增强 */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ==================== 出勤功能样式 ==================== */

/* 出勤按钮样式 */
.btn-attendance {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid;
    background: white;
}

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

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

.btn-attendance .student-name {
    font-weight: 600;
}

.btn-attendance .status-badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
}

/* 出勤状态按钮组优化 */
.btn-group .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

/* 快速操作按钮 */
.btn-group.flex-wrap {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-group.flex-wrap .btn {
    margin: 0;
}

/* 出勤统计优化 */
.alert-info .badge {
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
}

/* 响应式表格优化 */
@media (max-width: 768px) {
    /* 出勤表格 */
    #attendanceTableBody td,
    #attendanceTableBody th {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .btn-attendance {
        padding: 0.4rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .btn-attendance .student-name {
        font-size: 0.95rem;
    }
    
    .btn-attendance .status-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }
    
    /* 按钮组优化 */
    .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.4rem;
        white-space: nowrap;
    }
    
    /* 统计徽章优化 */
    .alert-info .badge {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* 表单输入优化 */
    .form-control-sm {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }
}

/* ==================== 课表样式 ==================== */

/* 当天日期列高亮 */
.today-column {
    background-color: #e3f2fd !important; /* 浅蓝色背景 */
}

/* 确保表头的今天列也有高亮 */
thead .today-column {
    background-color: #bbdefb !important; /* 稍深一点的浅蓝色 */
    font-weight: bold;
}

/* 课表单元格 */
.schedule-cell {
    vertical-align: top;
    padding: 0 !important;
}

/* 课程卡片 */
.lesson-card {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

/* 固定排课的课程卡片 */
.lesson-card.schedule {
    background-color: #f8f9fa;
    border-left-color: #0d6efd !important;
}

/* 已完成的课程 */
.lesson-card.completed {
    background-color: #d1e7dd;
    border-left-color: #198754 !important;
}

/* 已取消的课程 */
.lesson-card.cancelled {
    background-color: #f8d7da;
    border-left-color: #dc3545 !important;
    opacity: 0.7;
}

/* 时间列样式 */
.time-slot {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
    border-right: 2px solid #dee2e6;
}
