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

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #222;
    color: #eee;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #f8f8f8;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

body.dark-mode .navbar {
    background-color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 左侧图片 */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container img {
    height: 40px;
    transition: transform 0.3s;
}

.logo-container img:hover {
    transform: scale(1.05);
}

/* 中间导航 */
.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-links a.active {
    color: #8B0000;
}

body.dark-mode .nav-links a {
    color: #eee;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4a90e2;
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 右侧明暗切换 */
.theme-toggle {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4a90e2;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.toggle-label {
    margin-left: 10px;
    font-size: 14px;
    color: #333;
    transition: color 0.3s;
}

body.dark-mode .toggle-label {
    color: #eee;
}

/* 主要内容区域 */
.main-content {
    padding: 30px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    transition: background-color 0.3s;
}

body.dark-mode .content-section {
    background-color: #333;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

h1, h2, h3, h4 {
    color: #8B0000;
    margin-bottom: 15px;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4 {
    color: #ff6b6b;
}

/* 家规样式 */
.rules-section {
    margin-bottom: 30px;
}

.rules-list {
    padding-left: 20px;
    margin-bottom: 15px;
}

.rules-list li {
    margin-bottom: 10px;
}

.punishment {
    color: #8B0000;
    font-weight: bold;
}

body.dark-mode .punishment {
    color: #ff6b6b;
}


.subject {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    margin: 10px 0;
    font-weight: bold;
}

body.dark-mode .subject {
    background-color: #444;
}

.note {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

body.dark-mode .note {
    color: #aaa;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
    }
    
    .nav-links {
        margin: 15px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .logo-container {
        margin-bottom: 10px;
    }
}


/* #punishmentTable thead td{
	    position: sticky;
	    top: 0;
	    background-color: #f8f9fa;
	    z-index: 10;
	    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
} */