/* 额外的样式增强 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', Arial, sans-serif;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card, .feature-item {
    animation: fadeInUp 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* 选择文字样式 */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #333;
}

/* 悬浮提示 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.tooltip:hover::after {
    opacity: 1;
}

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

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

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* 按钮点击效果 */
.btn:active {
    transform: scale(0.95);
}

/* 卡片阴影效果增强 */
.category-card:hover, .feature-item:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 焦点样式 */
.btn:focus, .category-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 漫画内容区域样式 */
.manga-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.manga-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2em;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.manga-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.manga-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.manga-cover {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.manga-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.manga-badge.new {
    background: linear-gradient(45deg, #4ecdc4, #44a3aa);
}

.manga-badge.hot {
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f);
}

.manga-badge.complete {
    background: linear-gradient(45deg, #95e1d3, #3fc1c9);
}

.manga-info {
    padding: 20px;
}

.manga-info h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 1.2em;
    font-weight: bold;
}

.manga-author {
    color: #667eea;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-weight: 500;
}

.manga-desc {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.manga-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.manga-stats span {
    font-size: 0.85em;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating {
    color: #ffa500;
    font-weight: bold;
}

.views {
    color: #667eea;
}

.chapters {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 评论区域样式 */
.comments-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.comments-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2em;
}

.comments-container {
    margin-bottom: 30px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.comment-item:hover {
    background-color: rgba(102, 126, 234, 0.02);
    border-radius: 10px;
}

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

.comment-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

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

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.username {
    font-weight: bold;
    color: #333;
    font-size: 1em;
}

.comment-time {
    color: #888;
    font-size: 0.85em;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 0.95em;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.9em;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 15px;
}

.comment-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 评论表单样式 */
.comment-form {
    background: rgba(102, 126, 234, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.comment-form h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3em;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nickname-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.95em;
    transition: border-color 0.3s ease;
}

.nickname-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-comment {
    white-space: nowrap;
}

/* 网站数据增强样式 */
.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    transition: color 0.3s ease;
}

.stat-item:hover .stat-number {
    color: #764ba2;
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .manga-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .manga-cover {
        height: 220px;
    }
    
    .comment-item {
        padding: 15px;
        gap: 12px;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .nickname-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .manga-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .comment-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .comment-btn {
        text-align: center;
        padding: 8px;
    }
}