/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 移动端优化的CSS样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #FF9A8B 0%, #FF6A88 50%, #FF99AC 100%);
    min-height: 100vh;
    color: #2c3e50;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 4px solid #FFD166;
}

.header h1 {
    color: #EF476F;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.class-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 1rem;
    color: #718096;
}

.class-name {
    font-weight: 700;
    color: #118AB2;
}

.date-display {
    font-weight: 600;
}

/* 点名区域 */
.roll-call-section {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.roll-call-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    border: 4px solid #FFD166;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.selected-student {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.student-placeholder {
    color: #ADB5BD;
}

.student-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #CED4DA;
}

.student-placeholder p {
    font-size: 1.1rem;
}

.student-name {
    font-size: 3rem;
    font-weight: 800;
    color: #073B4C;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.student-date {
    font-size: 1.2rem;
    color: #6C757D;
}

.rolling {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #118AB2;
}

.rolling i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.rolling p {
    font-size: 1.2rem;
    font-weight: 600;
}

.roll-call-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.btn {
    padding: 1.2rem;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

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

.btn-success {
    background: linear-gradient(135deg, #20bf6b 0%, #00b894 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #4361EE 0%, #3A0CA3 100%);
    color: white;
}

.points-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    margin-top: 1rem;
}

.points-dropdown {
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid #dee2e6;
    min-width: 100px;
}

.points-buttons {
    display: flex;
    gap: 10px;
}

/* 右侧最近记录区域 */
.right-sidebar {
    padding: 0 1rem 1rem;
}

.recent-records-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid #FFD166;
}

.recent-records-card h2 {
    color: #073B4C;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
}

.record-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.record-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.record-points {
    min-width: 60px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.record-points.positive {
    color: #28a745;
}

.record-points.negative {
    color: #e74c3c;
}

.record-info {
    flex: 1;
    padding: 0 0.8rem;
}

.record-student {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.record-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.record-notes {
    font-size: 0.8rem;
    color: #495057;
    margin-top: 0.2rem;
}

.no-records {
    text-align: center;
    color: #6c757d;
    padding: 1rem;
    font-style: italic;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 3px solid #FFD166;
    display: flex;
    justify-content: space-around;
    padding: 0.7rem 0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem;
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-btn.active {
    color: #118AB2;
    transform: scale(1.1);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
}

.notification.success {
    background: linear-gradient(135deg, #06D6A0, #08a075);
    color: white;
}

.notification.error {
    background: linear-gradient(135deg, #FF6B6B, #d15757);
    color: white;
}

.notification.show {
    transform: translateX(0);
}

/* 全屏按钮 */
.btn-fullscreen {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 2px solid #FFD166;
    color: #073B4C;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #073B4C;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .roll-call-card {
        padding: 1.5rem;
    }
    
    .student-name {
        font-size: 2rem;
    }
    
    .student-date {
        font-size: 1rem;
    }
    
    .btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .points-selector {
        flex-direction: column;
    }
    
    .points-dropdown {
        width: 100%;
    }
    
    .nav-btn {
        padding: 0.5rem;
        font-size: 0.7rem;
    }
    
    .recent-records-card {
        padding: 1rem;
    }
    
    .record-item {
        padding: 0.6rem;
    }
    
    .record-student {
        font-size: 0.9rem;
    }
    
    .record-date {
        font-size: 0.7rem;
    }
    
    .record-points {
        font-size: 0.9rem;
        min-width: 50px;
    }
}
