/* 搞笑剧本网站自定义样式 */

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 自定义工具类 */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.line-clamp-4 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

/* 阅读内容样式 */
.reading-content {
    line-height: 1.8;
    color: #374151;
}

.reading-content h1 {
    font-size: 2.25rem;
    font-weight: bold;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
}

.reading-content h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.reading-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.reading-content p {
    margin-bottom: 1.25rem;
}

.reading-content ul, .reading-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.reading-content li {
    margin-bottom: 0.5rem;
}

.reading-content blockquote {
    border-left: 4px solid #fbbf24;
    padding-left: 1rem;
    font-style: italic;
    color: #6b7280;
    margin: 1.5rem 0;
}

.reading-content code {
    background-color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875em;
}

.reading-content pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.reading-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.reading-content a {
    color: #f97316;
    text-decoration: underline;
}

.reading-content a:hover {
    color: #ea580c;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .reading-content h1 {
        font-size: 1.875rem;
    }
    
    .reading-content h2 {
        font-size: 1.5rem;
    }
    
    .reading-content h3 {
        font-size: 1.25rem;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    .reading-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .reading-content a {
        color: #000;
        text-decoration: none;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .reading-content {
        color: #d1d5db;
    }
    
    .reading-content h1,
    .reading-content h2,
    .reading-content h3 {
        color: #f3f4f6;
    }
    
    .reading-content code {
        background-color: #374151;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #f97316;
    animation: spin 1s ease-in-out infinite;
}

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

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #374151;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #374151 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}