/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容区域 */
main {
    margin-top: 80px;
}

/* 欢迎区域样式 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 励志名言样式 */
.motivational-quote {
    margin: 2rem auto 3rem;
    max-width: 600px;
    text-align: center;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.5s both;
}

.motivational-quote:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.motivational-quote i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0.5rem;
}

.motivational-quote #quoteText {
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    line-height: 1.6;
    display: inline-block;
    margin: 0 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.quote-author {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.quote-author span {
    font-weight: 600;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 科目区域样式 */
.subjects-section {
    padding: 4rem 0;
    background-color: white;
}

.subjects-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.subject-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.subject-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.subject-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.subject-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.subject-card p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 进度区域样式 */
.progress-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.progress-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.progress-overview {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.overall-progress {
    text-align: center;
}

.overall-progress h3 {
    margin-bottom: 2rem;
    color: #333;
}

.circular-progress {
    position: relative;
    display: inline-block;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.3s ease;
}

.progress-ring-circle-fill {
    transition: stroke-dashoffset 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percentage {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.progress-label {
    font-size: 0.9rem;
    color: #666;
}

.subject-progress-list h3 {
    margin-bottom: 2rem;
    color: #333;
}

.subject-progress-items {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 个人中心样式 */
.profile-section {
    padding: 4rem 0;
    background-color: white;
}

.profile-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.stat-card h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.recent-activities h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.activity-list {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 200px;
}

.no-activity {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* 实时学习记录样式 */
.activity-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.start-study-btn,
.stop-study-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stop-study-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.start-study-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.stop-study-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

.current-session {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.3);
}

.session-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.session-time {
    margin-left: auto;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

.activity-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #4CAF50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.activity-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.activity-title {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.activity-details {
    color: #666;
    font-size: 0.85rem;
    display: flex;
    gap: 1rem;
}

.activity-time {
    color: #888;
    font-size: 0.8rem;
    white-space: nowrap;
}

.activity-duration {
    background: #4CAF50;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-body {
    padding: 2rem;
}

.subject-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.knowledge-tree h3,
.study-plan h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.3rem;
}

.tree-container,
.plan-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    min-height: 200px;
}

.add-plan-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.add-plan-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* 日程表样式 */
.schedule-section {
    padding: 4rem 0;
    background-color: white;
}

.schedule-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.schedule-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.add-course-btn,
.save-schedule-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-course-btn:hover,
.save-schedule-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.schedule-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.weekdays-header {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
}

.weekdays-header > div {
    padding: 1rem;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.weekdays-header > div:last-child {
    border-right: none;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
}

.time-slot {
    display: contents;
}

.time-label {
    background: #f8f9fa;
    padding: 1rem;
    text-align: center;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    font-weight: 500;
    color: #666;
}

.schedule-cell {
    padding: 0.5rem;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    min-height: 80px;
    position: relative;
    background: white;
}

.schedule-cell:hover {
    background: #f8f9fa;
}

.course-item {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.course-item:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.course-item .course-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.course-item .course-subject {
    font-size: 0.7rem;
    opacity: 0.9;
}

.course-item .course-note {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    font-style: italic;
}

.course-item .delete-course {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.6rem;
    display: none;
}

.course-item:hover .delete-course {
    display: block;
}

/* 课程表单样式 */
.course-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.save-course-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-course-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 主题自定义样式 */
.theme-customizer {
    display: grid;
    gap: 2rem;
}

.theme-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.theme-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-options {
    display: grid;
    gap: 2rem;
}

.color-group h4 {
    margin-bottom: 1rem;
    color: #555;
}

.preset-colors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
}

.color-preset {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: #333;
}

.color-preset.active {
    border-color: #667eea;
    border-width: 4px;
    transform: scale(1.1);
}

.color-preset::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #666;
    white-space: nowrap;
}

.custom-colors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.color-picker-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-picker-group label {
    font-weight: 500;
    color: #333;
}

.color-picker-group input[type="color"] {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.apply-custom-btn {
    grid-column: 1 / -1;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.apply-custom-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.theme-preview {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.preview-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.preview-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

.preview-content {
    padding: 1rem;
    text-align: center;
    color: #666;
}

.theme-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.reset-theme-btn,
.save-theme-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.reset-theme-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.save-theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 护眼模式样式 */
.eye-care-modes {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mode-option {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mode-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.mode-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
}

.mode-label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.mode-label i {
    font-size: 1.2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.mode-label span {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.mode-label small {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.mode-description {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.mode-description p {
    margin: 0.5rem 0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.mode-description strong {
    color: #333;
}

/* 黑夜模式样式 */
body.night-mode {
    background-color: #1a1a1a !important;
    color: #f0f0f0 !important;
}

body.night-mode .subjects-section,
body.night-mode .progress-section,
body.night-mode .profile-section,
body.night-mode .schedule-section {
    background-color: #2d2d2d !important;
    color: #f0f0f0 !important;
}

body.night-mode .subject-card,
body.night-mode .stat-card,
body.night-mode .activity-list,
body.night-mode .subject-progress-items,
body.night-mode .tree-container,
body.night-mode .plan-container {
    background-color: #3a3a3a !important;
    color: #f0f0f0 !important;
    border-color: #555 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3) !important;
}

body.night-mode .subject-card h3,
body.night-mode .stat-card h4,
body.night-mode .topic-name,
body.night-mode .plan-info h4,
body.night-mode .subjects-section h2,
body.night-mode .progress-section h2,
body.night-mode .profile-section h2,
body.night-mode .schedule-section h2 {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body.night-mode .subject-card p,
body.night-mode .stat-value,
body.night-mode .topic-progress,
body.night-mode .plan-info p,
body.night-mode .subtopic-item,
body.night-mode .subject-progress,
body.night-mode .subject-name {
    color: #d0d0d0 !important;
    font-weight: 500 !important;
}

body.night-mode .progress-bar {
    background-color: #555 !important;
}

body.night-mode .progress-fill {
    background: linear-gradient(90deg, #4CAF50, #45a049) !important;
}

body.night-mode .schedule-cell {
    background-color: #3a3a3a !important;
    border-color: #555 !important;
    color: #f0f0f0 !important;
}

body.night-mode .weekdays-header {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6741 100%) !important;
    color: #ffffff !important;
}

body.night-mode .time-label {
    background-color: #2d2d2d !important;
    color: #d0d0d0 !important;
    border-color: #555 !important;
    font-weight: 500 !important;
}

body.night-mode .progress-text {
    color: #d0d0d0 !important;
}

body.night-mode .start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

body.night-mode .hero-content h1 {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

body.night-mode .hero-content p {
    color: #e0e0e0 !important;
}

body.night-mode .stat-number {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.night-mode .stat-label {
    color: #d0d0d0 !important;
}

body.night-mode .modal-content {
    background-color: #3a3a3a !important;
    color: #f0f0f0 !important;
    border: 1px solid #555 !important;
}

body.night-mode .modal-body {
    color: #f0f0f0 !important;
}

body.night-mode .form-group label {
    color: #ffffff !important;
    font-weight: 500 !important;
}

body.night-mode .form-group input,
body.night-mode .form-group select,
body.night-mode .form-group textarea {
    background-color: #2d2d2d !important;
    color: #f0f0f0 !important;
    border-color: #555 !important;
}

body.night-mode .theme-section {
    background-color: #2d2d2d !important;
    border: 1px solid #555 !important;
}

body.night-mode .theme-section h3 {
    color: #ffffff !important;
}

/* 黑夜模式知识点区域优化 */
body.night-mode .knowledge-tree h3,
body.night-mode .study-plan h3 {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7) !important;
    font-size: 1.4rem !important;
}

body.night-mode .tree-container,
body.night-mode .plan-container {
    background-color: #2d2d2d !important;
    border: 2px solid #555 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4) !important;
}

body.night-mode .topic-item {
    background-color: #3a3a3a !important;
    border: 1px solid #555 !important;
    box-shadow: 0 3px 15px rgba(0,0,0,0.3) !important;
}

body.night-mode .topic-header {
    border-bottom: 2px solid #555 !important;
}

body.night-mode .topic-name {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7) !important;
}

body.night-mode .topic-progress {
    color: #4CAF50 !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

body.night-mode .subtopic-item {
    background-color: #2d2d2d !important;
    border: 1px solid #555 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

body.night-mode .subtopic-item:hover {
    background-color: #444 !important;
    border-color: #667eea !important;
    transform: translateX(5px) !important;
}

body.night-mode .subtopic-item.completed {
    background-color: rgba(76, 175, 80, 0.2) !important;
    border-color: #4CAF50 !important;
}

body.night-mode .subtopic-item.completed i {
    color: #4CAF50 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

body.night-mode .subtopic-item.completed span {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .subtopic-item:not(.completed) i {
    color: #888 !important;
}

body.night-mode .subtopic-item:not(.completed) span {
    color: #d0d0d0 !important;
    font-weight: 500 !important;
}

/* 黑夜模式导航栏优化 */
body.night-mode .navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

body.night-mode .nav-logo {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
    font-weight: 700 !important;
}

body.night-mode .nav-link {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .nav-link:hover {
    background-color: rgba(255,255,255,0.3) !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

body.night-mode .nav-menu {
    background-color: #2c3e50 !important;
}

body.night-mode .hamburger .bar {
    background-color: #ffffff !important;
}

/* 黑夜模式页脚优化 */
body.night-mode .footer {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-top: 1px solid #444 !important;
}

/* 黑夜模式按钮优化 */
body.night-mode .add-course-btn,
body.night-mode .save-schedule-btn,
body.night-mode .save-theme-btn,
body.night-mode .apply-custom-btn {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

/* 黑夜模式课程项优化 */
body.night-mode .course-item {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .course-name {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body.night-mode .course-subject {
    color: #e8f5e8 !important;
    font-weight: 500 !important;
}

/* 黑夜模式无活动文字优化 */
body.night-mode .no-activity {
    color: #d0d0d0 !important;
    font-weight: 500 !important;
}

/* 黑夜模式进度圆环优化 */
body.night-mode .progress-ring-circle-fill {
    stroke: #4CAF50 !important;
    stroke-width: 10 !important;
}

body.night-mode .progress-ring-circle {
    stroke: #555 !important;
    stroke-width: 10 !important;
}

body.night-mode .circular-progress .progress-text {
    color: #ffffff !important;
}

body.night-mode .progress-percentage {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.8rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

body.night-mode .progress-label {
    color: #f0f0f0 !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .overall-progress h3 {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .subject-progress-list h3 {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

/* 黑夜模式科目进度项优化 */
body.night-mode .subject-progress-item {
    background-color: #3a3a3a !important;
    border: 1px solid #555 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3) !important;
}

body.night-mode .subject-progress-item .subject-name {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .subject-progress-item .subject-progress {
    color: #4CAF50 !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

/* 黑夜模式最近活动区域优化 */
body.night-mode .recent-activities h3 {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.3rem !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7) !important;
    letter-spacing: 0.05rem !important;
}

body.night-mode .activity-list {
    background-color: #3a3a3a !important;
    border: 2px solid #555 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4) !important;
}

body.night-mode .no-activity {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
    letter-spacing: 0.03rem !important;
}

/* 黑夜模式实时记录优化 */
body.night-mode .start-study-btn,
body.night-mode .stop-study-btn {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

body.night-mode .current-session {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

body.night-mode .activity-item {
    background-color: #3a3a3a !important;
    border-left: 4px solid #4CAF50 !important;
    border: 1px solid #555 !important;
    box-shadow: 0 3px 15px rgba(0,0,0,0.3) !important;
}

body.night-mode .activity-item:hover {
    background-color: #444 !important;
    border-color: #667eea !important;
}

body.night-mode .activity-title {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .activity-details {
    color: #d0d0d0 !important;
}

body.night-mode .activity-time {
    color: #b0b0b0 !important;
}

body.night-mode .activity-duration {
    background: #4CAF50 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

/* 黑夜模式个人中心标题优化 */
body.night-mode .profile-section h2 {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7) !important;
    letter-spacing: 0.05rem !important;
}

body.night-mode .profile-stats .stat-card {
    background-color: #3a3a3a !important;
    border: 2px solid #555 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4) !important;
}

body.night-mode .profile-stats .stat-card:hover {
    border-color: #667eea !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
}

body.night-mode .profile-stats .stat-card i {
    color: #667eea !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .profile-stats .stat-card h4 {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

body.night-mode .profile-stats .stat-card .stat-value {
    color: #667eea !important;
    font-weight: 700 !important;
    font-size: 1.6rem !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

/* 黑夜模式励志名言优化 */
body.night-mode .motivational-quote {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(15px) !important;
}

body.night-mode .motivational-quote #quoteText {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7) !important;
}

body.night-mode .motivational-quote i {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.night-mode .quote-author {
    color: rgba(255, 255, 255, 0.8) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

/* 护眼模式样式 */
body.eye-care-mode {
    background-color: #faf8f0 !important;
    color: #4a4a4a !important;
}

body.eye-care-mode .subjects-section,
body.eye-care-mode .progress-section,
body.eye-care-mode .profile-section,
body.eye-care-mode .schedule-section {
    background-color: #f5f2e9 !important;
    color: #4a4a4a !important;
}

body.eye-care-mode .subject-card,
body.eye-care-mode .stat-card,
body.eye-care-mode .activity-list,
body.eye-care-mode .subject-progress-items,
body.eye-care-mode .tree-container,
body.eye-care-mode .plan-container {
    background-color: #fefcf7 !important;
    color: #4a4a4a !important;
    border-color: #e8dcc0 !important;
}

body.eye-care-mode .subject-card h3,
body.eye-care-mode .stat-card h4,
body.eye-care-mode .topic-name,
body.eye-care-mode .plan-info h4 {
    color: #3d3d3d !important;
}

body.eye-care-mode .subject-card p,
body.eye-care-mode .stat-value,
body.eye-care-mode .topic-progress,
body.eye-care-mode .plan-info p {
    color: #5a5a5a !important;
}

body.eye-care-mode .progress-bar {
    background-color: #e8dcc0 !important;
}

body.eye-care-mode .schedule-cell {
    background-color: #fefcf7 !important;
    border-color: #e8dcc0 !important;
}

body.eye-care-mode .weekdays-header {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%) !important;
}

body.eye-care-mode .time-label {
    background-color: #f5f2e9 !important;
    color: #5a5a5a !important;
    border-color: #e8dcc0 !important;
}

/* 护眼模式励志名言优化 */
body.eye-care-mode .motivational-quote {
    background: rgba(218, 200, 160, 0.3) !important;
    border: 1px solid rgba(184, 134, 11, 0.3) !important;
}

body.eye-care-mode .motivational-quote #quoteText {
    color: #3d3d3d !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5) !important;
}

body.eye-care-mode .motivational-quote i {
    color: rgba(61, 61, 61, 0.8) !important;
}

body.eye-care-mode .quote-author {
    color: rgba(61, 61, 61, 0.9) !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.3) !important;
}

/* 页脚样式 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #667eea;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-overview {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .subject-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    /* 移动端模态框优化 */
    .modal-body {
        padding: 1.5rem;
    }
    
    .knowledge-tree h3,
    .study-plan h3 {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }
    
    .tree-container,
    .plan-container {
        padding: 2rem 1rem;
        line-height: 1.8;
    }
    
    /* 移动端知识点优化 */
    .topic-item {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    .topic-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .topic-name {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .topic-progress {
        font-size: 1rem;
        margin-top: 0.5rem;
    }
    
    .subtopics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .subtopic-item {
        padding: 1rem;
        margin-bottom: 0.5rem;
        line-height: 1.6;
        font-size: 0.95rem;
    }
    
    .subtopic-item i {
        margin-right: 1rem;
        font-size: 1.1rem;
    }
    
    /* 移动端复习计划优化 */
    .plan-item {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .plan-info h4 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
        line-height: 1.4;
    }
    
    .plan-info p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .plan-actions {
        width: 100%;
        justify-content: center;
    }
    
    .add-plan-btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* 移动端励志名言优化 */
    .motivational-quote {
        margin: 1.5rem auto 2rem !important;
        padding: 1rem 1.5rem !important;
        max-width: 90% !important;
    }
    
    .motivational-quote #quoteText {
        font-size: 1rem !important;
    }
    
    .quote-author {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .subjects-section h2,
    .progress-section h2,
    .profile-section h2 {
        font-size: 2rem;
    }
    
    .subject-card {
        padding: 1.5rem;
    }
    
    .stat-item {
        gap: 1rem;
    }
    
    /* 小屏幕模态框进一步优化 */
    .modal-content {
        width: 98%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* 知识点区域优化 */
    .topic-item {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .topic-header {
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }
    
    .topic-name {
        font-size: 1rem;
        line-height: 1.8;
        word-spacing: 0.2rem;
    }
    
    .topic-progress {
        font-size: 0.9rem;
        margin-top: 0.8rem;
    }
    
    .subtopics {
        gap: 0.8rem;
    }
    
    .subtopic-item {
        padding: 0.8rem;
        margin-bottom: 0.3rem;
        line-height: 2;
        font-size: 0.9rem;
        word-spacing: 0.1rem;
        letter-spacing: 0.05rem;
    }
    
    .subtopic-item i {
        margin-right: 0.8rem;
        font-size: 1rem;
    }
    
    /* 复习计划区域优化 */
    .tree-container,
    .plan-container {
        padding: 1.5rem 0.8rem;
        line-height: 2;
    }
    
    .plan-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .plan-info h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
        line-height: 1.6;
        letter-spacing: 0.05rem;
    }
    
    .plan-info p {
        font-size: 0.85rem;
        line-height: 1.8;
        letter-spacing: 0.03rem;
    }
    
    .add-plan-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

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

.subject-card {
    animation: fadeInUp 0.6s ease forwards;
}

.subject-card:nth-child(1) { animation-delay: 0.1s; }
.subject-card:nth-child(2) { animation-delay: 0.2s; }
.subject-card:nth-child(3) { animation-delay: 0.3s; }
.subject-card:nth-child(4) { animation-delay: 0.4s; }
.subject-card:nth-child(5) { animation-delay: 0.5s; }
.subject-card:nth-child(6) { animation-delay: 0.6s; }
.subject-card:nth-child(7) { animation-delay: 0.7s; }
.subject-card:nth-child(8) { animation-delay: 0.8s; }
.subject-card:nth-child(9) { animation-delay: 0.9s; }

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
} 