/* 哔咔漫画样式文件 */

/* 基础样式 */
* {
    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;
}

/* 伪原创干扰样式 */
.hidden-content {
    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;
}

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

.pseudo-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(-25px);
    }
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    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%;
    }
}

@keyframes wiggle {
    0%, 7% {
        transform: rotateZ(0);
    }
    15% {
        transform: rotateZ(-15deg);
    }
    20% {
        transform: rotateZ(10deg);
    }
    25% {
        transform: rotateZ(-10deg);
    }
    30% {
        transform: rotateZ(6deg);
    }
    35% {
        transform: rotateZ(-4deg);
    }
    40%, 100% {
        transform: rotateZ(0);
    }
}

/* 动画类 */
.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.4s ease;
}

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

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #ef4444);
    color: white;
    padding: 14px 28px;
    border-radius: 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #0ea5e9;
    padding: 14px 28px;
    border: 3px solid #0ea5e9;
    border-radius: 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #0ea5e9;
    color: white;
    transform: translateY(-3px);
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.18);
}

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

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

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

.manga-filter:hover, .ranking-tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

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

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

.ranking-item:hover {
    transform: translateX(8px);
    background: rgba(14, 165, 233, 0.08);
}

/* 返回顶部按钮 */
#back-to-top {
    transition: all 0.4s 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: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

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

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

/* 通知样式 */
.notification {
    position: fixed;
    top: 120px;
    right: 25px;
    padding: 20px 30px;
    border-radius: 15px;
    color: white;
    font-weight: 700;
    z-index: 9999;
    animation: slideInRight 0.4s ease;
    max-width: 350px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

@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.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

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

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

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

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

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

.progress-fill {
    height: 100%;
    background: #0ea5e9;
    transition: width 0.4s ease;
}

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

/* 加载动画 */
.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.6s ease;
}

.loader::after {
    content: '';
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #0ea5e9;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: #0ea5e9;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

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

::-moz-selection {
    background: #0ea5e9;
    color: white;
}

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

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

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

a:hover {
    color: #0284c7;
}

/* 表单样式 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 15px 20px;
    border: 3px solid #e5e7eb;
    border-radius: 15px;
    font-size: 16px;
    transition: border-color 0.3s 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: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    margin: 3px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 3px 10px;
    background: #0ea5e9;
    color: white;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

/* 分割线样式 */
.divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 40px 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: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1000;
}

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

/* 阴影工具类 */
.shadow-soft {
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.1);
}

.shadow-medium {
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.18);
}

.shadow-hard {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

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

.bg-gradient-secondary {
    background: linear-gradient(135deg, #ef4444, #0ea5e9);
}

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

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

.text-gradient-secondary {
    background: linear-gradient(135deg, #ef4444, #0ea5e9);
    -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: 3px solid #333;
    }
    
    button {
        border: 3px 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.12);
        border-color: rgba(255, 255, 255, 0.25);
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        background: #2a2a2a;
        border-color: #404040;
        color: #e5e5e5;
    }
}