body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #f8f8f8;
    /* 页面背景颜色 */
    color: #333;
    /* 默认文字颜色 */
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 固定标题 */
.fixed-title {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.fixed-title h1 {
    color: #CC6600;
    margin: 0;
    font-size: 40px;
}

/* 固定图片 */
.fixed-img {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

/* 左侧导航栏 */
.side-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 0 10px 10px 0;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav li {
    margin: 10px 0;
    text-align: center;
}

.side-nav img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.side-nav img:hover {
    transform: scale(1.2);
}

/* 深色主题下导航栏样式 */
body.dark-theme .side-nav {
    background-color: #CCCCCC; 
    /* 颜色更适合 */
}

body.dark-theme .side-nav img:hover {
    transform: scale(1.2);
    filter: brightness(1.3);
}

/* 主要内容区域 */
.main-content {
    width: 80%;
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 20px;
    text-align: center;
}

h2 {
    text-align: center;
    color: blue;
    /* 标题文字颜色 */
}

h3 {
    text-align: center;
    color: black;
    /* 标题文字颜色 */

}

h4 {
    text-align: center;
    color: #ff0000;
    /* 标题文字颜色 */
}

label {
    color: #000000;
    /* 标签文字颜色 */
}

input,
button {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 25px;
    /* 按钮圆角过渡 */
    background: #4434;
    color: #ffffff;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: #333;
    /* 复选框相关文字颜色 */
    justify-content: center;
    margin: 10px 0;
}

.checkbox-container label {
    margin-left: 10px;
}

.clearhistory label {
    margin-left: 10px;
}

/* 声明按钮 */
.declaration-btn {
    margin: 10px;
    padding: 8px 16px;
    background-color: #4740de;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.7s ease;
}

.declaration-btn:hover {
    background-color: #009966;
}

.settings-section,
.history-section {
    margin-bottom: 20px;
}

.settings-toggle,
.history-toggle {
    padding: 10px 60px;
    cursor: pointer;
    background-color: #4740de;
    /* 按钮背景颜色 */
    color: #ffffff;
    /* 按钮文字颜色 */
    transition: background-color 0.7s ease;
    /* 按钮颜色过渡效果 */
    margin: 0 10px;

}

.settings-toggle:hover,
.history-toggle:hover {
    background-color: #009966;
}

.settings-panel,
.history-panel {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    margin: 20px 0 0 20px;
    display: none;
    /* 默认隐藏面板 */
}

.general-settings-panel {
    padding: 15px;
    border-radius: 20px;
    margin: 20px 0 0 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-button-group {
    display: flex;
    justify-content: right;
    margin-right: 40px;
    margin-bottom: 15px;
}

.copy-history-btn {
    padding: 10px 60px;
    cursor: pointer;
    background-color: #4740de;
    /* 按钮背景颜色 */
    color: #ffffff;
    /* 按钮文字颜色 */
    transition: background-color 0.7s ease;
    /* 按钮颜色过渡效果 */
    margin: 0 10px;

}

.copy-history-btn:hover {
    background-color: #009966;
}

/* 历史结果容器 */
.history-container {
    width: 1000px;
    margin: 0 auto;
}

/* 历史结果 */
#historyList {
    list-style-type: none;
    /* 移除列表的默认项目符号 */
    padding: 15px;
    /* 内边距 */
    border-radius: 45px;
    max-height: 300px;
    /* 固定高度 */
    overflow-y: auto;
    /* 垂直滚动 */
    width: 100%;
    height: 100%;
    margin: 0;

    border: 1px solid #4740de;

    /* 多列布局 */
    -webkit-column-count: 4;
    /* Chrome, Safari, Opera */
    -moz-column-count: 4;
    /* Firefox */
    column-count: 4;
    /* Standard syntax */
    -webkit-column-gap: 30px;
    /* Chrome, Safari, Opera */
    -moz-column-gap: 30px;
    /* Firefox */
    column-gap: 30px;
    /* Standard syntax */
    column-fill: balance;
    /* 平衡各列高度 */
}

.history-scroll {
    /* 确保内容超出时可以滚动 */
    scrollbar-width: thin;
    scrollbar-color: #4740de;
}

.history-scroll::-webkit-scrollbar {
    width: 8px;
}

.history-scroll::-webkit-scrollbar-track {
    border-radius: 10px;
}

.history-scroll::-webkit-scrollbar-thumb {
    background: #4740de;
    border-radius: 10px;
}

#historyList li {
    margin: 5px 0;
    padding: 5px;
}


/* 按钮组 */
.button-group {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* 本轮结果 */
#results {
    margin: 0 0 40px 0;
    background-color: #79EB95;
    /* 结果和历史列表的背景颜色 */
    padding: 15px;
    /* 高度 */
    border-radius: 45px;
    /* 圆角 */
    font-family: Arial, sans-serif;
    /* 最大宽度 */
    font-size: 24px;
    font-weight: bolder;
    /* 文字加粗 */
    height: auto;
    min-height: 50px;
    text-align: center;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

.results-scroll {
    /* 确保内容超出时可以滚动 */
    scrollbar-width: thin;
    scrollbar-color: #4740de #79EB95;
}

.results-scroll::-webkit-scrollbar {
    height: 8px;
}

.results-scroll::-webkit-scrollbar-track {
    background: #79EB95;
    border-radius: 10px;
}

.results-scroll::-webkit-scrollbar-thumb {
    background: #4740de;
    border-radius: 10px;
}

button {
    padding: 10px 60px;
    cursor: pointer;
    background-color: #4740de;
    /* 按钮背景颜色 */
    color: #ffffff;
    /* 按钮文字颜色 */
    transition: background-color 0.7s ease;
    /* 按钮颜色过渡效果 */
    margin: 0 10px;
}

button:hover {
    background-color: #009966;
    /* 按钮悬停时的背景颜色 */
}

/* 页脚 */
.footer {
    margin-top: 30px;
    text-align: center;
}

/* 音频播放器 */
.audio-player {
    margin-top: 20px;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

video {
    position: fixed;
    /* 固定定位，始终位于页面底层 */
    /* top: 0;
    left: 0; */
    width: auto;
    height: auto;
    /* object-fit: cover; */
    /* 保持视频原有比例，覆盖整个视口 */
    z-index: -100;
    /* 确保视频在所有内容下方 */
    transform: translateZ(0);
    /* 启用硬件加速，提高性能 */
}

.background-img {
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 固定定位，覆盖整个视口 */
    
    z-index: -100;
    /* 确保在所有内容下方 */
    transform: translateZ(0);
    /* 启用硬件加速，提高性能 */
    object-fit: cover;
    /* 确保图片覆盖整个区域 */
    background-repeat: no-repeat;
    background-position: center center;
}



/* 文件选择区域 */
.file-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
}

.file-input-container {
    margin-bottom: 10px;
}

.file-input-container label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.file-input-container input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.current-file {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* 登录页面样式 */
.login-container {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 400px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.login-container h2 {
    color: #CC6600;
    margin-bottom: 30px;
    font-size: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 25px;
    box-sizing: border-box;
    background-color: #4434;
}

.login-btn {
    background-color: #4740de;
    color: #ffffff;
    padding: 12px 40px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.7s ease;
    margin: 10px;
}

.login-btn:hover {
    background-color: #009966;
}

.register-btn {
    background-color: #CC6600;
    color: #fff;
    padding: 12px 40px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.7s ease;
    margin: 10px;
    border: none;
    border-radius: 5px;
}

.register-btn:hover {
    background-color: #994d00;
}

/* 设置页面样式 */
.settings-container {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 600px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.settings-container h2 {
    color: #CC6600;
    margin-bottom: 30px;
    font-size: 30px;
}

.settings-panel {
    text-align: left;
    margin-top: 20px;
}

.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 15px;
}

.settings-section h3 {
    color: #4740de;
    margin-bottom: 15px;
    font-size: 22px;
    border-bottom: 2px solid #4740de;
    padding-bottom: 10px;
}

.settings-section p {
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

#user-info {
    font-size: 16px;
    color: #333;
}

#user-info p {
    margin: 10px 0 10px 0;
}

#login-status {
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 5px;
}

#username-display {
    font-weight: bold;
    color: #4740de;
}

.logout-btn {
    background-color: #CC6600;
    color: #fff;
    padding: 12px 40px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.7s ease;
    margin: 10px;
    border: none;
    border-radius: 5px;
}

.logout-btn:hover {
    background-color: #994d00;
}

/* 深色主题样式 */
body.dark-theme {
    background-color: #ffffff;
    color: #ffffff;
}

body.dark-theme .main-content {
    background-color: rgba(0, 0, 0, 0.3);
}

body.dark-theme .settings-panel,
body.dark-theme .history-panel {
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4 {
    color: #ffffff;
}

body.dark-theme label {
    color: #ffffff;
}

body.dark-theme .checkbox-container {
    color: #ffffff;
}

body.dark-theme .settings-toggle,
body.dark-theme .history-toggle,
body.dark-theme button {
    background-color: #333;
    color: #ffffff;
}

body.dark-theme .settings-toggle:hover,
body.dark-theme .history-toggle:hover,
body.dark-theme button:hover {
    background-color: #009966;
}

/* 设置项样式 */
.setting-item {
    margin: 15px 0;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.setting-item h4 {
    margin: 0 0 10px 0;
    color: #4740de;
    font-size: 18px;
}

.setting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.theme-option {
    padding: 8px 16px;
    border: 2px solid #4740de;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: transparent;
    color: #4740de;
}

.theme-option.active {
    background-color: #4740de;
    color: #ffffff;
}

.theme-option:hover {
    transform: scale(1.05);
}

.animation-option {
    padding: 8px 16px;
    border: 2px solid #4740de;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: transparent;
    color: #4740de;
}

.animation-option.active {
    background-color: #4740de;
    color: #ffffff;
}

.animation-option:hover {
    transform: scale(1.05);
}

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

.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: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #4740de;
}

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

.sound-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-label {
    font-size: 16px;
    color: #333;
}

/* 深色主题详细样式 */
body.dark-theme .setting-item h4 {
    color: #ffffff;
}

body.dark-theme .theme-option,
body.dark-theme .animation-option {
    border-color: #555;
    color: #ffffff;
}

body.dark-theme .theme-option.active,
body.dark-theme .animation-option.active {
    background-color: #555;
    color: #ffffff;
}

body.dark-theme .sound-label {
    color: #ffffff;
}

body.dark-theme .settings-container {
    background-color: rgba(0, 0, 0, 0.5);
}

body.dark-theme .login-container {
    background-color: rgba(0, 0, 0, 0.5);
}

body.dark-theme .file-section {
    background-color: rgba(0, 0, 0, 0.4);
}

body.dark-theme .form-group input {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: #555;
}

body.dark-theme .form-group label {
    color: #ffffff;
}

body.dark-theme .sound-label {
    color: #ffffff;
}

/* 原神启动动画容器 */
.animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: none;
    background-color: #000;
    overflow: hidden;
}

.animation-container.active {
    display: block;
}

.animation-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.animation-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    display: none;
}

.animation-image.active {
    display: block;
}

.animation-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    opacity: 0;
    transition: all 0.8s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 90%;
    padding: 2rem;
}

.animation-result.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.animation-result h2 {
    font-size: 3rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ff6b6b, #ffd700, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    width: 100%;
}

.animation-result .result-numbers {
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 20px;
    border: 2px solid #ffd700;
    text-align: center;
    display: inline-block;
    margin: 0 auto;
}

.animation-close {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    color: #ffffff;
    font-size: 1.2rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid #ffd700;
}

.animation-close.active {
    opacity: 1;
}

.animation-close:hover {
    background-color: rgba(255, 215, 0, 0.3);
    cursor: pointer;
}

/* 按钮组样式 */
.button-group {
    margin: 20px 0;
}

.button-group button {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #ff6b6b, #ffd700);
    border: none;
    border-radius: 30px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.button-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.button-group button:active {
    transform: translateY(0);
}