/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 登录页面样式 ==================== */
.login-page {
    background: url('../images/login-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}
.system-title {
    text-align: center;
    color: #3a70b0;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    background-clip: text;
    padding-bottom: 40px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    margin: 20px;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px); /* 毛玻璃效果 */
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background: white;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.error {
    color: #e74c3c;
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(255, 230, 230, 0.9);
    border: 1px solid #ffcccc;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    display: none;
    min-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

/* 当有错误内容时显示 */
.error:not(:empty) {
    display: block;
    opacity: 1;
}

/* 确保空错误消息完全隐藏 */
.error:empty {
    display: none !important;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
}

/* 错误消息显示时的动画 */
.error.show {
    display: block;
    opacity: 1;
}

/* ==================== Dashboard页面样式 ==================== */
/* 头部样式 */
.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* 导航样式 */
.navigation {
    background: white;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-tab {
    padding: 15px 30px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-tab:hover {
    background: #f8f9fa;
    color: #3498db;
}

.nav-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #f8f9fa;
}

/* 主内容区域 */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

.content-area {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* 搜索区域 */
.search-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-btn {
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #2980b9;
}

/* 列表区域 */
.list-section {
    max-height: 500px;
    overflow-y: auto;
}

.entry-list {
    padding: 0;
}

.entry-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.entry-item:last-child {
    border-bottom: none;
}

.entry-main {
    flex: 1;
}


.entry-title {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.entry-latin {
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

.entry-arrow {
    color: #bdc3c7;
    font-size: 18px;
    font-weight: bold;
}

/* 详情区域 */
.detail-section {
    padding: 30px;
    border-top: 2px solid #3498db;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
}

.detail-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
}

.detail-header h2 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.headline-content {
    text-align: center;
    font-weight: bold;
    font-family: "宋体", SimSun, serif;
    font-size: 28px;
    line-height: 11.5px;
    margin: 0 0 15px 0;
    padding: 0;
    display: none;
    background: transparent;
    border: none;
    padding-bottom: 20px;
    padding-top: 10px;
}

.latin-name {
    color: #7f8c8d;
    font-style: italic;
    font-size: 16px;
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 15px;
}

/* 图谱图片样式 */
.picture-content {
    text-align: center;
    margin: 0 0 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.picture-content img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

/* 文字内容区域 */
.text-content {
    line-height: 1.8;
    overflow: hidden;
}

.text-content p {
    margin-bottom: 0px;
}

/* 特殊处理：确保没有图片时文字能填满整行 */
.no-images .content-text {
    width: 100%;
    float: none;
}

.text-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* 具体内容样式 */
.detail-content {
    margin-bottom: 0px;
    background: white;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    position: relative;
    overflow: hidden;
}

/* 右侧浮动图片样式 */
.image-float-right {
    float: right;
    margin: 0 0 0 15px;
    max-width: 25%;
    page-break-inside: avoid;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* 内联图片样式 */
.inline-image-container {
    display: inline-block;
    max-width: 100%;
    background: white;
    padding: 0px;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin: 0;
    text-align: center;
}

.inline-image {
    display: inline-block;
    max-width: 100%;
    background: white;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0;
    text-align: center;
}

.inline-image img {
    max-width: 100%;
    max-height: 200px;
    height: auto;
    border-radius: 3px;
    display: block;
    margin: 0 auto;
    padding: 0;
    border: none;
}

.inline-image-caption {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
    padding: 0px;
    border-top: 1px solid black;

}

.caption-line1 {
    font-weight: bold;
    margin-top: 4px;
    margin-bottom: 4px;
    font-size: 14px;
}

.caption-line2 {
    font-size: 13px;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 内容文本样式 */
.content-text {
    line-height: 1.8;
    color: #555;
    white-space: pre-line;
    font-size: 18px;
    margin: 0;
    text-align: justify;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    padding: 0;

}

/* 清除浮动 */
.clear-float {
    clear: both;
    height: 0;
    margin: 0;
    padding: 0;
}

.close-btn {
    padding: 10px 20px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
}

.close-btn:hover {
    background: #7f8c8d;
}

/* 错误和空状态 */
.error-message, .no-data {
    padding: 40px 20px;
    text-align: center;
    color: #7f8c8d;
    font-size: 16px;
}

.error-message {
    color: #e74c3c;
}

/* 底部样式 */
.footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .nav-tab {
        text-align: center;
        border-bottom: 1px solid #eee;
        border-left: 3px solid transparent;
    }
    
    .nav-tab.active {
        border-left-color: #3498db;
        border-bottom-color: #eee;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .entry-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .login-container {
        margin: 20px;
        padding: 30px 25px;
    }

    .image-float-right {
        float: none;
        margin: 8px auto;
        max-width: 80%;
    }

    .inline-image {
        max-width: 100%;
        padding: 0px;
    }
    
    .inline-image img {
        max-height: 10px;
    }

    .content-text {
        margin-right: 0;
    }
}