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

/* 前置弹窗样式 */
.pre-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pre-popup.show {
    opacity: 1;
    visibility: visible;
}

.pre-popup-content {
    background-color: #f7f0e6;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
    border: 2px solid #a86c4c;
}

.pre-popup.show .pre-popup-content {
    transform: scale(1);
}

.pre-popup-content h3 {
    color: #8c543a;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #d1b78e;
    padding-bottom: 15px;
}

.pre-popup-content p {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: center;
}

.pre-popup-content .btn {
    display: block;
    margin: 0 auto;
    background-color: #a86c4c;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pre-popup-content .btn:hover {
    background-color: #8c543a;
}

/* 全局样式 */
body {
    background-color: #f7f0e6;
    color: #333;
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 50 C60 40, 70 40, 80 50 C90 60, 90 70, 80 80 C70 90, 60 90, 50 80 C40 90, 30 90, 20 80 C10 70, 10 60, 20 50 C30 40, 40 40, 50 50' fill='none' stroke='%23d1b78e' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
    background-attachment: fixed;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 复选框样式 - 浅色模式 */
input[type="checkbox"] {
    accent-color: #a86c4c;
    background-color: #f7f0e6;
    border: 1px solid #d1b78e;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

input[type="checkbox"]:checked {
    background-color: #a86c4c;
}

/* 特定复选框样式 - 浅色模式 */
#show-completed,
.task-checkbox {
    accent-color: #a86c4c;
    transform: scale(1.2);
    cursor: pointer;
}

/* 回到顶部按钮 */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #a86c4c;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

/* 登录状态显示样式 */
.auth-status-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-status-text {
    color: #8c543a;
    font-weight: bold;
    margin-right: 10px;
}

/* 登录/注册弹窗样式 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
}

.auth-modal-content {
    background-color: #f7f0e6;
    max-width: 500px;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #8c543a;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-modal .close:hover {
    color: #a86c4c;
}

/* 选项卡样式 */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #d1b78e;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #8c543a;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    background-color: rgba(216, 187, 142, 0.2);
}

.auth-tab.active {
    background-color: #e9d9c5;
    border-bottom: 3px solid #a86c4c;
}

/* 表单样式 */
.auth-form {
    padding: 30px;
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h3 {
    color: #8c543a;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.auth-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #d1b78e;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    font-size: 16px;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #a86c4c;
    box-shadow: 0 0 0 3px rgba(168, 108, 76, 0.1);
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    font-size: 16px;
    background-color: #a86c4c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-submit-btn:hover {
    background-color: #8c543a;
}

/* 提示消息样式 */
.auth-note {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.auth-message {
    padding: 0 30px 30px 30px;
    text-align: center;
    color: #8c543a;
    font-weight: bold;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background-color: #8c543a;
}

/* 容器 */
.container {
    max-width: 80%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 图案背景 */
.pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0 L10 0 L10 10 L0 10 Z' fill='none' stroke='%23d1b78e' stroke-width='0.5' opacity='0.2'/%3E%3Cpath d='M10 10 L20 10 L20 20 L10 20 Z' fill='none' stroke='%23d1b78e' stroke-width='0.5' opacity='0.2'/%3E%3C/svg%3E");
    z-index: -1;
}

/* 标题区域 */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.decoration-left,
.decoration-right {
    width: 80px;
    height: 3px;
    background-color: #a86c4c;
    position: relative;
    margin: 0 20px;
}

.decoration-left::before,
.decoration-right::before,
.decoration-left::after,
.decoration-right::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 3px solid #a86c4c;
    border-radius: 50%;
    background-color: #f7f0e6;
}

.decoration-left::before,
.decoration-right::before {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
}

.decoration-left::after,
.decoration-right::after {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
}

.header h1 {
    font-size: 2.5rem;
    color: #8c543a;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

/* 主要内容区域 */
.content {
    position: relative;
}

/* 注意事项区域 */
.notice-section {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 25px;
    margin-bottom: 40px;
    border-radius: 8px;
    border: 1px solid #d1b78e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.notice-section h2 {
    color: #8c543a;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem;
    border-bottom: 2px solid #d1b78e;
    padding-bottom: 10px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.notice-box {
    background-color: rgba(247, 240, 230, 0.8);
    border-radius: 6px;
    padding: 20px;
    transition: background-color 0.3s ease;
}

.notice-list {
    list-style-type: none;
}

.notice-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    line-height: 1.8;
}

.notice-list li::before {
    content: '•';
    color: #a86c4c;
    font-size: 1.5em;
    position: absolute;
    left: 0;
    top: -5px;
}

/* 过滤和搜索区域 */
.filter-section {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 1px solid #d1b78e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    color: #8c543a;
    font-weight: bold;
    transition: color 0.3s ease;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #d1b78e;
    border-radius: 4px;
    background-color: #f7f0e6;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn {
    padding: 8px 16px;
    background-color: #a86c4c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
    line-height: 1.5;
    text-align: center;
    user-select: none;
    font-size: 14px;
}

.btn:hover {
    background-color: #8c543a;
}

/* 表格区域 */
.table-section {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 25px;
    margin-bottom: 40px;
    border-radius: 8px;
    border: 1px solid #d1b78e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.table-section h2 {
    color: #8c543a;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem;
    border-bottom: 2px solid #d1b78e;
    padding-bottom: 10px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.table-container {
    overflow-x: auto;
}

.character-table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease;
}

.character-table th,
.character-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #d1b78e;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.character-table th {
    background-color: #e9d9c5;
    color: #8c543a;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.character-table tr:nth-child(even) {
    background-color: rgba(247, 240, 230, 0.7);
}

.character-table tr:hover {
    background-color: rgba(233, 217, 197, 0.4);
}

.character-table small {
    font-size: 0.8rem;
    color: #666;
}

/* 隐藏的游逸旅闻斜体样式 */
.hidden-travel {
    font-style: italic;
    color: #8c543a;
    transition: color 0.3s ease;
}

/* 区域高亮 */
.region-mondstadt td:nth-child(5) {
    background-color: rgba(144, 238, 144, 0.2);
}

.region-liyue td:nth-child(5) {
    background-color: rgba(251, 191, 36, 0.2);
}

.region-inazuma td:nth-child(5) {
    background-color: rgba(167, 139, 250, 0.2);
}

.region-sumeru td:nth-child(5) {
    background-color: rgba(34, 197, 94, 0.2);
}

.region-fontaine td:nth-child(5) {
    background-color: rgba(147, 197, 253, 0.2);
}

.region-natlan td:nth-child(5) {
    background-color: rgba(239, 68, 68, 0.2);
}

.region-nordkala td:nth-child(5) {
    background-color: rgba(156, 163, 175, 0.2);
}

/* 完成任务样式 */
.completed-task {
    background-color: rgba(167, 243, 208, 0.3);
}

.completed-task td {
    text-decoration: line-through;
    color: #6b7280;
}

.task-checkbox {
    transform: scale(1.2);
    cursor: pointer;
}

/* 完成列样式 */
.character-table th:first-child,
.character-table td:first-child {
    width: 60px;
    text-align: center;
}

/* 卡片视图复选框样式 */
.card-checkbox-container {
    display: flex;
    align-items: center;
    margin-left: auto;
}

input#auth-email {
    padding: 8px 12px;
    border: 1px solid #d1b78e;
    border-radius: 4px;
    background-color: #f7f0e6;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

input#auth-password {
    padding: 8px 12px;
    border: 1px solid #d1b78e;
    border-radius: 4px;
    background-color: #f7f0e6;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #8c543a;
    border-top: 1px solid #d1b78e;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-content p {
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
    max-width: 95%;
    }

    .header h1 {
        font-size: 2rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }

    .filter-group input {
        max-width: 150px;
    }
    
    .table-section {
        padding: 15px;
    }
    
    /* 表格在移动端隐藏 */
    .character-table {
        display: none;
    }
    
    /* 移动端卡片容器 */
    .card-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    /* 卡片样式 */
    .character-card {
        background-color: rgba(255, 255, 255, 0.8);
        border: 1px solid #d1b78e;
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        position: relative;
        overflow: hidden;
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }
    
    /* 卡片装饰 */
    .character-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background-color: #a86c4c;
    }
    
    /* 地区装饰条 */
    .card-mondstadt::before { background-color: #90EE90; }
    .card-liyue::before { background-color: #fbbf24; }
    .card-inazuma::before { background-color: #a78bfa; }
    .card-sumeru::before { background-color: #22c55e; }
    .card-fontaine::before { background-color: #93c5fd; }
    .card-natlan::before { background-color: #ef4444; }
    .card-nordkala::before { background-color: #9ca3af; }
    
    /* 卡片标题 */
    .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .card-character {
        font-size: 1.2rem;
        font-weight: bold;
        color: #8c543a;
        transition: color 0.3s ease;
    }
    
    .card-version {
        background-color: #e9d9c5;
        color: #8c543a;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.8rem;
        transition: background-color 0.3s ease, color 0.3s ease;
    }
    
    /* 卡片内容 */
    .card-content {
        margin-bottom: 10px;
    }
    
    .card-item {
        margin-bottom: 8px;
    }
    
    .card-value {
        font-size: 0.9rem;
        color: #333;
        transition: color 0.3s ease;
    }
    
    /* 隐藏的游逸旅闻 */
    .card-value.hidden-travel {
        font-style: italic;
        color: #8c543a;
    }
    
    /* 游逸旅闻和地点组合样式 */
    .travel-location {
        font-weight: bold;
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    /* 条件性显示的字段样式 */
    .condition-item, .extra-item {
        background-color: rgba(233, 217, 197, 0.2);
        padding: 8px;
        border-radius: 4px;
        font-size: 0.85rem;
        transition: background-color 0.3s ease;
    }
    
    .condition-item strong,
    .extra-item strong {
        color: #8c543a;
        transition: color 0.3s ease;
    }
    
    /* 描述文本样式 */
    .description-item {
        margin-top: 12px;
        border-top: 1px dashed #d1b78e;
        padding-top: 8px;
    }
    
    .description-container {
        position: relative;
        min-height: 20px;
    }
    
    .description-text {
        display: inline-block;
        vertical-align: middle;
        max-width: 90%;
    }
    
    .description-text.truncated {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 显示全部按钮样式 */
    .show-more-btn {
        background-color: #e9d9c5;
        color: #8c543a;
        border: none;
        border-radius: 4px;
        padding: 2px 8px;
        margin-left: 8px;
        font-size: 0.8rem;
        cursor: pointer;
        display: inline-block;
        vertical-align: middle;
        transition: background-color 0.3s ease, color 0.3s ease;
    }
    
    .show-more-btn:hover {
        background-color: #d1b78e;
    }
    
    /* 移动端按钮样式 */
    .btn {
        display: inline-block;
        padding: 8px 16px;
        background-color: #a86c4c;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        line-height: 1.5;
        width: 100%;
        text-align: center;
        user-select: none;
        transition: background-color 0.3s ease;
    }
    
    .btn:hover {
        background-color: #8c543a;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
    animation: fadeIn 0.3s ease;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.fade-out {
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    font-family: 'LXGWNeoZhiSongPlus', serif;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    line-height: 1.6;
    opacity: 1;
    transform: translateY(0);
}

.modal-content.slide-out {
    opacity: 0;
    transform: translateY(-20px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 更新日志内容样式 */
#update-log-content {
    padding: 20px;
    line-height: 1.8;
}

/* 更多选项弹窗内容样式 */
.more-options-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.more-options-content .btn {
    width: 100%;
    padding: 10px;
    font-size: 16px;
}

.more-options-content .auth-status-section {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #d1b78e;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.more-options-content .auth-status-text {
    font-size: 14px;
    color: #8c543a;
    font-weight: bold;
}

#update-log-content h1,
#update-log-content h2,
#update-log-content h3,
#update-log-content h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #8c543a;
}

#update-log-content h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid #d1b78e;
    padding-bottom: 10px;
}

#update-log-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #e9d9c5;
    padding-bottom: 8px;
}

#update-log-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

#update-log-content li {
    margin-bottom: 10px;
}

#update-log-content strong {
    color: #a86c4c;
}

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

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-buttons {
    margin-top: 20px;
    text-align: center;
}

.modal-buttons .btn {
    margin: 0 10px;
}

/* 字体授权弹窗特定样式 */
#font-license-modal .modal-content p {
    margin-bottom: 15px;
    text-align: left;
}

#font-license-modal .modal-content a {
    color: #a86c4c;
    text-decoration: none;
    border-bottom: 1px dotted #a86c4c;
    transition: color 0.3s ease, border-color 0.3s ease;
}

#font-license-modal .modal-content a:hover {
    color: #8c543a;
    border-bottom: 1px solid #8c543a;
}

/* 移动端适配 - 模态框 */
@media (max-width: 768px) {
    .modal {
        padding-top: 40px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-buttons .btn {
        margin: 0;
        width: 100%;
    }
    
    #font-license-modal .modal-content p {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    #font-license-modal .modal-content a {
        word-break: break-all;
    }
}