/* 51漫画样式文件 */

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 伪原创干扰样式 */
.seo-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.seo-invisible {
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

.seo-content {
    position: absolute !important;
    left: -10000px !important;
    top: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 自定义动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(237, 81, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 30px rgba(237, 81, 255, 0.6);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 动画类 */
.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 1s ease-out forwards;
}

.animate-bounce-in {
    animation: bounceIn 1.2s ease-out forwards;
}

.animate-gradient {
    background-size: 400% 400%;
    animation: gradient 4s ease infinite;
}

/* 导航栏样式 */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #ed51ff, #14b8a6);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(237, 81, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #ed51ff;
    padding: 12px 24px;
    border: 2px solid #ed51ff;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #ed51ff;
    color: white;
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

/* 漫画卡片样式 */
.manga-card {
    transition: all 0.3s ease;
}

.manga-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* 筛选按钮样式 */
.manga-filter, .ranking-tab {
    transition: all 0.3s ease;
    cursor: pointer;
}

.manga-filter:hover, .ranking-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.manga-filter.active, .ranking-tab.active {
    background: #ed51ff !important;
    color: white !important;
    border-color: #ed51ff !important;
}

/* 排行榜样式 */
.ranking-item {
    transition: all 0.3s ease;
}

.ranking-item:hover {
    transform: translateX(6px);
    background: rgba(237, 81, 255, 0.05);
}

/* 返回顶部按钮 */
#back-to-top {
    transition: all 0.3s ease;
}

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

/* 搜索建议 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.suggestion-item:hover {
    background-color: #f9fafb;
}

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

/* 通知样式 */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

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

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-warning {
    background: #f59e0b;
}

.notification-info {
    background: #3b82f6;
}

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

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

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

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

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

.reader-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
}

.page-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ed51ff;
    transition: width 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card {
        padding: 20px;
        margin: 12px;
    }
    
    .notification {
        right: 12px;
        left: 12px;
        max-width: none;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ed51ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页面加载完成后的样式 */
body.loaded {
    animation: fadeIn 0.5s ease;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ed51ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d62df7;
}

/* 选中文本样式 */
::selection {
    background: #ed51ff;
    color: white;
}

::-moz-selection {
    background: #ed51ff;
    color: white;
}

/* 焦点样式 */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #ed51ff;
    outline-offset: 2px;
}

/* 禁用状态 */
button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 链接样式 */
a {
    color: #ed51ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #d62df7;
}

/* 表单样式 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #ed51ff;
    box-shadow: 0 0 0 3px rgba(237, 81, 255, 0.1);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(237, 81, 255, 0.1);
    color: #ed51ff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ed51ff;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* 分割线样式 */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 30px 0;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-6px);
}

/* 阴影工具类 */
.shadow-soft {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.shadow-hard {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* 渐变背景工具类 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #ed51ff, #14b8a6);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #14b8a6, #ed51ff);
}

.bg-gradient-accent {
    background: linear-gradient(135deg, #f59e0b, #ed51ff);
}

/* 文本渐变工具类 */
.text-gradient-primary {
    background: linear-gradient(135deg, #ed51ff, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: linear-gradient(135deg, #14b8a6, #ed51ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 动画延迟工具类 */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 2px solid #ccc !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #333;
    }
    
    button {
        border: 2px solid currentColor;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e5e5e5;
    }
    
    .card {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        background: #2a2a2a;
        border-color: #404040;
        color: #e5e5e5;
    }
}