:root {
    --black: #000000;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #999999;
    --lighter-gray: #cccccc;
    --lightest-gray: #e6e6e6;
    --white: #ffffff;
    --accent-color: #3498db;
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--white);
    color: var(--dark-gray);
    line-height: 1.6;
}

.navbar {
    background-color: var(--black);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 主语言选择器样式 - 使用下拉框 */
.main-language-selector {
    background-color: var(--lightest-gray);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--accent-color);
}

.language-selector-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark-gray);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.language-selector-title i {
    color: var(--accent-color);
    margin-right: 10px;
    font-size: 1.4rem;
}

.language-dropdown-container {
    position: relative;
    max-width: 300px;
}

.language-dropdown {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid var(--lighter-gray);
    border-radius: 8px;
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px 12px;
    padding-right: 45px;
}

.language-dropdown:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.language-dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.language-flag {
    display: inline-block;
    width: 20px;
    height: 15px;
    margin-right: 10px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    vertical-align: middle;
}

.flag-zh {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 24"><rect width="36" height="24" fill="#de2910"/><polygon fill="#ffde00" points="6,6 9,9 6,12 9,15 6,18 9,21 12,18 15,21 18,18 15,15 18,12 15,9 12,12 9,9 12,6 9,3 6,6"/></svg>');
}

.flag-en {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><rect width="60" height="30" fill="#012169"/><rect width="60" height="2" y="10" fill="white"/><rect width="60" height="2" y="20" fill="white"/><rect width="2" height="30" x="20" fill="white"/><rect width="2" height="30" x="40" fill="white"/><rect width="60" height="4" y="9" fill="#C8102E"/><rect width="60" height="4" y="19" fill="#C8102E"/><rect width="4" height="30" x="19" fill="#C8102E"/><rect width="4" height="30" x="39" fill="#C8102E"/></svg>');
}

.flag-ja {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 24"><rect width="36" height="24" fill="white"/><circle cx="18" cy="12" r="6" fill="#bc002d"/></svg>');
}

.flag-ko {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 24"><rect width="36" height="24" fill="white"/><circle cx="18" cy="12" r="6" fill="#C60C30"/><path d="M18,6a6,6,0,1,0,6,6,6,6,0,0,0-6-6Zm0,9a3,3,0,1,1,3-3A3,3,0,0,1,18,15Z" fill="#003478"/></svg>');
}

.flag-fr {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 24"><rect width="12" height="24" fill="#0055A4"/><rect width="12" height="24" x="12" fill="white"/><rect width="12" height="24" x="24" fill="#EF4135"/></svg>');
}

.flag-es {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 24"><rect width="36" height="8" fill="#AA151B"/><rect width="36" height="8" y="8" fill="#F1BF00"/><rect width="36" height="8" y="16" fill="#AA151B"/></svg>');
}

/* 系列区块：平铺展示，系列之间以横条分隔 */
.series-block {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--lighter-gray);
}

.series-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.series-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--accent-color);
    line-height: 1.2;
}

.novel-card {
    border: 1px solid var(--lighter-gray);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    background-color: var(--white);
}

.novel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.novel-cover {
    width: 100%;
    height: 250px;
    background-color: var(--lightest-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.novel-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.novel-info {
    padding: 1rem;
}

.novel-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--black);
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
    display: block;
}

.novel-author {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin-bottom: 0.5rem;
}

.novel-memo {
  font-size: 0.7rem;
  color: var(--medium-gray);
  margin-bottom: 0.5rem;
  display: -webkit-box;           /* 必须：将元素变成弹性盒模型（旧版 Webkit） */
  -webkit-line-clamp: 4;          /* 最多显示 4 行 */
  -webkit-box-orient: vertical;   /* 必须：设置子元素垂直排列 */
  overflow: hidden;               /* 隐藏溢出内容 */
  text-overflow: ellipsis;        /* 溢出时显示省略号（配合单行使用，但多行也建议保留） */
  line-height: 1.4;               /* 控制行高，影响总高度 */
  /* 可选：增强兼容性或防止意外撑开 */
  max-height: calc(1.4em * 4);    /* 与 line-height 一致，确保高度精确 */
  word-break: break-word;         /* 长单词/URL 自动换行，避免溢出容器 */
}

.novel-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.novel-version {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
    border-radius: 12px;
    color: var(--accent-color);
    background-color: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.35);
}

.status-completed {
    background-color: var(--medium-gray);
    color: var(--white);
}

.status-ongoing {
    background-color: var(--light-gray);
    color: var(--white);
}

.footer {
    background-color: var(--black);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 语言切换通知 */
.language-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    display: none;
    animation: slideIn 0.5s ease;
}

#novelsGrid img {

}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 手机端优化 */
@media (max-width: 768px) {
    .language-dropdown-container {
        max-width: 100%;
    }

    .series-title {
        font-size: 1rem;
    }

    .novel-cover {
        height: 200px;
    }

    .novel-info {
        padding: 0.8rem;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    .language-notification {
        top: 70px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* 平板优化 */
@media (max-width: 992px) and (min-width: 769px) {
    .novel-cover {
        height: 220px;
    }
}

/* 关于我们页面样式 */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--black));
    margin: 0 auto;
    border-radius: 2px;
}

.about-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.section-icon i {
    font-size: 3rem;
    color: var(--accent-color);
}

.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-gray);
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--medium-gray);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-card {
    padding: 1.5rem;
    background-color: var(--lightest-gray);
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.value-icon {
    margin-bottom: 1rem;
}

.value-icon i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.value-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--dark-gray);
    margin-bottom: 0.8rem;
}

.value-desc {
    font-size: 1rem;
    color: var(--medium-gray);
    line-height: 1.6;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto 0;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-color), var(--black));
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 15px;
    height: 15px;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-content {
    background-color: var(--lightest-gray);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 1rem;
    color: var(--medium-gray);
    line-height: 1.6;
}

.contact-section {
    background: linear-gradient(135deg, var(--lightest-gray) 0%, var(--white) 100%);
}

.contact-info {
    max-width: 600px;
    margin: 2rem auto 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--dark-gray);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-right: 1rem;
    width: 30px;
}

/* 关于我们页面响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .about-section {
        padding: 1.5rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }

    .contact-item {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-item i {
        margin-bottom: 0.5rem;
    }
}
