/* 抖音漫画网站样式 */

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

body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
    overflow-x: hidden;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(236, 72, 153, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

/* 选择文本样式 */
::selection {
    background: rgba(236, 72, 153, 0.2);
    color: #1f2937;
}

/* 动画效果 */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-left {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in-right {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-up {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-left {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce-slow {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

@keyframes count-up {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 动画类 */
.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fade-in-left 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fade-in-right 0.8s ease-out;
}

.animate-slide-up {
    animation: slide-up 0.8s ease-out;
}

.animate-slide-in {
    animation: slide-in 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out;
}

.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-count-up {
    animation: count-up 0.8s ease-out;
}

.animate-hover-lift {
    transition: all 0.3s ease;
}

.animate-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3);
    text-decoration: none;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #ec4899;
    padding: 12px 24px;
    border: 2px solid #ec4899;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline:hover {
    background: #ec4899;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* 导航栏样式 */
nav {
    min-height: 60px !important;
    background-color: #ffffff !important;
    display: block !important;
    visibility: visible !important;
}

nav .flex {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

nav .flex > div {
    display: flex !important;
    align-items: center !important;
}

.nav-link {
    position: relative;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block !important;
    white-space: nowrap;
    visibility: visible !important;
}

.nav-link:hover {
    color: #ec4899;
    background: rgba(236, 72, 153, 0.05);
    text-decoration: none;
}

.nav-link.active {
    color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* 确保导航栏在所有设备上都显示 */
/* 移动端导航优化 */
@media (max-width: 768px) {
    nav {
        min-height: 50px !important;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 14px;
        display: inline-block !important;
    }
    
    nav input {
        width: 200px !important;
    }
}

@media (max-width: 640px) {
    nav {
        min-height: 45px !important;
    }
    
    nav .flex > div:first-child .flex {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .nav-link {
        padding: 4px 8px;
        font-size: 13px;
        display: inline-block !important;
    }
    
    nav input {
        width: 150px !important;
        font-size: 14px;
    }
}

/* 统计数据样式 */
.stat-item {
    text-align: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.counter {
    font-variant-numeric: tabular-nums;
}

/* 漫画卡片样式 */
.manga-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.manga-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(236, 72, 153, 0.2);
}

.manga-card img {
    transition: all 0.3s ease;
}

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

.manga-card a {
    text-decoration: none;
    color: inherit;
}

.manga-card a:hover {
    text-decoration: none;
    color: inherit;
}

/* 分类卡片样式 */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* 评价卡片样式 */
.review-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(236, 72, 153, 0.2);
}

/* 分类按钮样式 */
.category-btn {
    background: white;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-btn:hover,
.category-btn.active {
    background: #ec4899;
    color: white;
    border-color: #ec4899;
    transform: translateY(-2px);
}

/* 联系卡片样式 */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

/* FAQ样式 */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f3f4f6;
}

.faq-answer {
    transition: all 0.3s ease;
}

/* 返回顶部按钮 */
#back-to-top {
    transition: all 0.3s ease;
    transform: translateY(100px);
}

#back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(236, 72, 153, 0.3);
    border-radius: 50%;
    border-top-color: #ec4899;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 输入框样式 */
.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #1f2937;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.input-field::placeholder {
    color: #9ca3af;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin: 4px;
    transition: all 0.3s ease;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(236, 72, 153, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* 社交媒体图标 */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* 评分星星 */
.rating-stars {
    display: inline-flex;
    gap: 2px;
}

.rating-stars i {
    color: #fbbf24;
    transition: all 0.3s ease;
}

.rating-stars:hover i {
    transform: scale(1.1);
}

/* 漫画封面效果 */
.manga-cover {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.manga-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.manga-cover:hover::after {
    transform: translateX(100%);
}

/* 搜索框样式 */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 40px;
}

.search-box .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    transition: all 0.3s ease;
}

.search-box:hover .search-icon {
    color: #ec4899;
}

/* 加载状态 */
.loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 漫画分类标签 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: #ec4899;
    color: white;
    transform: translateY(-1px);
}

/* 评分显示 */
.rating-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    font-weight: 600;
    color: #d97706;
}

/* 阅读进度条 */
.reading-progress {
    height: 4px;
    background: rgba(236, 72, 153, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.reading-progress .progress {
    height: 100%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 悬浮卡片效果 */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.15);
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #06b6d4 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 玻璃拟态效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 阴影效果 */
.shadow-glow {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.15);
}

.shadow-glow:hover {
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.25);
}

/* 漫画阅读器样式 */
.manga-reader {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.manga-reader img {
    width: 100%;
    height: auto;
    display: block;
}

/* 章节导航 */
.chapter-nav {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

.chapter-nav button {
    background: #ec4899;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chapter-nav button:hover {
    background: #be185d;
    transform: translateY(-2px);
}

.chapter-nav button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .manga-card {
        margin-bottom: 1rem;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .btn-primary,
    .btn-outline {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .review-card {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .btn-primary,
    .btn-outline {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .manga-card {
        margin-bottom: 1rem;
    }
}

/* 特殊效果 */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #ec4899, #8b5cf6) border-box;
}

/* 品牌主题色彩 */
.brand-primary {
    color: #ec4899;
}

.brand-secondary {
    color: #8b5cf6;
}

.brand-accent {
    color: #06b6d4;
}

.bg-brand-primary {
    background-color: #ec4899;
}

.bg-brand-secondary {
    background-color: #8b5cf6;
}

.bg-brand-accent {
    background-color: #06b6d4;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 可见性动画 */
.fade-in {
    opacity: 0;
    animation: fade-in-up 0.6s ease-out forwards;
}

/* 延迟动画 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* 漫画特有样式 */
.manga-thumbnail {
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 8px;
}

.manga-info {
    background: linear-gradient(135deg, #fdf2f8, #f3e8ff);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(236, 72, 153, 0.1);
}

.chapter-list {
    max-height: 400px;
    overflow-y: auto;
}

.chapter-item {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chapter-item:hover {
    background: rgba(236, 72, 153, 0.05);
    transform: translateX(4px);
}

.chapter-item:last-child {
    border-bottom: none;
}

/* 漫画标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.tag-cloud .tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.tag-cloud .tag:hover {
    transform: scale(1.1);
}

/* 用户头像 */
.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

/* 评论区样式 */
.comment-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.comment-item:last-child {
    border-bottom: none;
}

/* 漫画阅读模式 */
.reading-mode {
    background: #000;
    color: #fff;
}

.reading-mode .manga-page {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 夜间模式 */
.dark-mode {
    background: #1f2937;
    color: #f9fafb;
}

.dark-mode .bg-white {
    background: #374151 !important;
}

.dark-mode .text-gray-900 {
    color: #f9fafb !important;
}

.dark-mode .text-gray-600 {
    color: #d1d5db !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .nav-link {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .manga-card {
        margin-bottom: 16px;
    }
    
    .chapter-nav {
        padding: 12px;
    }
    
    .comment-section {
        padding: 16px;
    }
}

/* 平板端优化 */
@media (min-width: 768px) and (max-width: 1024px) {
    .manga-card {
        margin-bottom: 20px;
    }
    
    .review-card {
        padding: 20px;
    }
}

/* 桌面端优化 */
@media (min-width: 1024px) {
    .manga-card:hover {
        transform: translateY(-12px);
    }
    
    .category-card:hover {
        transform: translateY(-12px) scale(1.05);
    }
}