* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: url('Photo/随机点名场景.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 237, 234, 0.3) 0%, rgba(254, 214, 227, 0.3) 100%);
    z-index: 0;
}

/* 流星画布 */
#starCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header h1 img {
    width: 1em;
    height: 1em;
    object-fit: contain;
    vertical-align: middle;
}

.header h2 {
    color: #764ba2;
    font-size: 1.5em;
    font-weight: normal;
    margin-bottom: 15px;
}

.date-time {
    color: #666;
    font-size: 1em;
}

/* 上传区域 */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.upload-box {
    max-width: 500px;
    margin: 0 auto;
}

.upload-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.upload-box h3 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.upload-box p {
    color: #666;
    margin-bottom: 30px;
}

.file-info {
    margin-top: 20px;
    color: #28a745;
    font-weight: bold;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.2em;
    margin: 10px;
}

.btn-attendance {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
}

.btn-question {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.btn-stats {
    background: linear-gradient(135deg, #4776e6 0%, #8e54e9 100%);
    color: white;
}

.btn-reset {
    background: linear-gradient(135deg, #757f9a 0%, #d7dde8 100%);
    color: #333;
}

/* 主要内容区 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* 统计栏 */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-value {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
}

/* 功能按钮区 */
.action-buttons {
    text-align: center;
    margin: 30px 0;
}

/* 点名显示区 */
.pick-display {
    text-align: center;
    padding: 40px;
}

.pick-animation {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.student-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px;
    border-radius: 20px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.student-avatar {
    font-size: 6em;
    margin-bottom: 20px;
}

.student-name {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 15px;
}

.student-info {
    font-size: 1.2em;
    opacity: 0.9;
}

.encouragement {
    background: #ffc107;
    color: #333;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pick-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 考勤模式 */
.attendance-mode {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.attendance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.attendance-header h3 {
    font-size: 1.8em;
    color: #333;
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.student-item {
    background: white;
    border: 2px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.student-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.student-item.checked-in {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
    border-color: #56ab2f;
}

.student-item.makeup {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: white;
    border-color: #f39c12;
}

.student-item-avatar {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.student-item-name {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.student-item-status {
    font-size: 0.9em;
    opacity: 0.8;
}

/* 统计页面 */
.statistics-page {
    animation: fadeIn 0.3s;
}

.statistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.statistics-header h3 {
    font-size: 1.8em;
    color: #333;
}

.statistics-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.chart-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.chart-section h4 {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 20px;
}

.chart {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-bar {
    flex: 1;
    min-width: 150px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-bar-label {
    font-size: 1em;
    color: #666;
    margin-bottom: 10px;
}

.chart-bar-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

table th, table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #667eea;
    color: white;
    font-weight: bold;
}

table tr:hover {
    background: #f8f9fa;
}

.student-list {
    margin-top: 20px;
}

.student-detail {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.student-detail-name {
    font-weight: bold;
    font-size: 1.1em;
}

.student-detail-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
}

/* 浮动提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .header h2 {
        font-size: 1.2em;
    }
    
    .btn-large {
        padding: 15px 25px;
        font-size: 1em;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    .student-name {
        font-size: 2em;
    }
    
    .attendance-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .student-item:active {
        transform: scale(0.98);
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 1.6em;
    }
    
    .header h2 {
        font-size: 1.1em;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: 0.95em;
        margin: 8px;
    }
    
    .student-card {
        padding: 35px 20px;
    }
    
    .student-name {
        font-size: 1.8em;
    }
    
    .student-avatar {
        font-size: 5em;
    }
    
    .attendance-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 2em;
    }
}

@media (max-width: 360px) {
    .header h1 {
        font-size: 1.4em;
    }
    
    .header h2 {
        font-size: 1em;
    }
    
    .btn-large {
        padding: 10px 15px;
        font-size: 0.9em;
        margin: 6px;
    }
    
    .student-name {
        font-size: 1.6em;
    }
    
    .student-avatar {
        font-size: 4em;
    }
    
    .stat-value {
        font-size: 1.8em;
    }
    
    .stat-label {
        font-size: 0.85em;
    }
    
    .attendance-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}


