* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    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;
}

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;
}


#home-page{
    position: relative;
    /* background: rgba(0,0,0,0.1); */
    color: gray;
}

#FamilyRules_IFrame{
	position: relative;
	background-color: rgba(0,0,0,0);
	width: 100%;
	height: 1000px;
}

#ContentContainer{
	position: relative;
	left: 5%;
	width: 90%;
}


:root {
    --navbar-height: 70px;
}

.navbar {
    height: var(--navbar-height);
}

:target {
    scroll-margin-top: var(--navbar-height);
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 120px; /* 移动设备导航栏可能更高 */
    }
}



body {
	font-family: Arial, sans-serif;
	margin: 20px;
	line-height: 1.6;
}
h1 {
	color: #333;
	text-align: center;
}
.controls {
	margin: 20px 0;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
	text-align: center;
	/* border: 1px solid gray; */
}
th, td {
	padding: 8px;
	text-align: center;
}
th {
	background-color: #f2f2f2;
	position: sticky;
	top: 0;
}
tr:nth-child(even) {
	background-color: #f9f9f9;
}
tr:hover {
	background-color: #f1f1f1;
}
.negative {
	color: green;
	font-weight: bold;
}


