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

body {
    font-family: cursive, "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* 头部 */
.header {
    background-color: #333;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 20px;
}

.logo-text {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

/* 导航 */
.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: #ccc;
    font-size: 15px;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ff6b35;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ff6b35;
}

/* APP下载 */
.app-download {
    position: relative;
}

.qrcode-dropdown {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 5px;
    display: none;
    z-index: 1001;
}

.app-download:hover .qrcode-dropdown {
    display: block;
}

.qrcode-dropdown img {
    width: 100%;
    border-radius: 4px;
}

.qrcode-dropdown p {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 280px;
    height: 36px;
    border: none;
    border-radius: 18px 0 0 18px;
    padding: 0 15px 0 35px;
    font-family: cursive, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    background-color: #fff;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

.search-btn {
    height: 36px;
    padding: 0 20px;
    border: none;
    border-radius: 0 18px 18px 0;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    font-family: cursive, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    cursor: pointer;
}

/* 搜索下拉 */
.search-dropdown {
    position: absolute;
    top: 45px;
    left: 0;
    width: 380px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 15px;
    display: none;
    z-index: 1001;
}

.search-dropdown.show {
    display: block;
}

.search-dropdown-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.hot-search-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hot-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.hot-search-item:hover {
    background-color: #f5f5f5;
}

.hot-search-rank {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.hot-search-rank.top {
    background-color: #ff6b35;
    color: #fff;
}

.hot-search-rank.normal {
    background-color: #e0e0e0;
    color: #666;
}

.hot-search-info {
    flex: 1;
}

.hot-search-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.hot-search-author {
    font-size: 12px;
    color: #999;
}

/* 右侧功能区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-item {
    position: relative;
    cursor: pointer;
    text-align: center;
}

.action-item i {
    font-size: 18px;
    color: #ccc;
    display: block;
}

.action-item span {
    display: block;
    font-size: 12px;
    color: #ccc;
    margin-top: 2px;
}

.action-item:hover i,
.action-item:hover span {
    color: #ff6b35;
}

/* 历史/收藏下拉 */
.history-dropdown,
.favorite-dropdown {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 15px;
    display: none;
    z-index: 1001;
}

.action-item:hover .history-dropdown,
.action-item:hover .favorite-dropdown {
    display: block;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dropdown-title {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.dropdown-more {
    font-size: 12px;
    color: #ff6b35;
}

.dropdown-empty {
    text-align: center;
    padding: 30px 0;
}

.dropdown-empty p {
    font-size: 14px;
    color: #999;
}

.dropdown-empty {
    text-align: center;
    padding: 40px 20px;
}

.dropdown-empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    opacity: 0.3;
}

.dropdown-empty-icon img {
    width: 100%;
    height: 100%;
}

.dropdown-empty-text {
    font-size: 13px;
    color: #999;
}

.dropdown-empty-text a {
    color: #ff6b35;
    text-decoration: none;
}

.dropdown-empty-text a:hover {
    text-decoration: underline;
}

/* 下拉菜单列表 */
.dropdown-content {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
    text-decoration: none;
    color: inherit;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item-img {
    width: 50px;
    height: 65px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.dropdown-item-info {
    /* flex: 1; */
    min-width: 0;
    text-align: left;
}

.dropdown-item-title {
    font-size: 13px;
    color: #333;
    font-weight: bold;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item-desc {
    font-size: 11px;
    color: #999;
}

/* 用户头像 */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ddd;
    overflow: hidden;
    cursor: pointer;
}

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

/* 底部 */
.footer {
    background-color: #333;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #f1f1f1;
    font-size: 15px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ff6b35;
}

.footer-info {
    text-align: center;
    color: #f1f1f1;
    font-size: 15px;
    line-height: 2;
}

.footer-info p {
    margin-bottom: 5px;
}

/* 主内容 */
.main-content {
    padding-top: 60px;
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 通用标题 */
.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-more {
    margin-left: auto;
    font-size: 14px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.section-more:hover {
    color: #ff6b35;
}

/* 漫画卡片 */
.comic-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.comic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.comic-cover {
    position: relative;
    padding-top: 133%;
    overflow: hidden;
    background-color: transparent;
}

.comic-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.comic-card:hover .comic-cover img {
    transform: scale(1.05);
}

.comic-hot {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.comic-update {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: rgba(255,107,53,0.9);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.comic-title {
    padding: 10px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    font-family: cursive, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #fff;
    color: #ff6b35;
    border: 1px solid #ff6b35;
}

.btn-secondary:hover {
    background-color: #ff6b35;
    color: #fff;
}

.btn-large {
    padding: 12px 40px;
    font-size: 16px;
    border-radius: 25px;
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 999;
    display: none;
    font-style: normal !important;
}

.back-to-top:hover {
    background-color: #ff6b35;
    color: #fff;
}

.back-to-top i {
    font-size: 20px;
}
