/* ==================== DaigeNews2 主题样式 ==================== */
/* 极速收录、极致语义化、源码正文前置 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #f9fafb;
}

.container {
    width: 100%;
    margin: 0 auto;
}

.max-w-6xl {
    max-width: 72rem;
}

/* ==================== 布局类 ==================== */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.order-1 {
    order: 1;
}

.order-2 {
    order: 2;
}

/* ==================== 间距类 ==================== */
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.p-6 {
    padding: 1.5rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

.pb-6 {
    padding-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* ==================== 宽度类 ==================== */
.w-full {
    width: 100%;
}

.w-80 {
    width: 20rem;
}

/* ==================== 响应式类 ==================== */
@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:w-1\/3 {
        width: 33.333333%;
    }
    
    .md\:w-2\/3 {
        width: 66.666667%;
    }
    
    .md\:h-full {
        height: 100%;
    }
    
    .md\:p-6 {
        padding: 1.5rem;
    }
    
    .md\:p-8 {
        padding: 2rem;
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:text-xl {
        font-size: 1.25rem;
    }
    
    .md\:text-2xl {
        font-size: 1.5rem;
    }
    
    .md\:text-3xl {
        font-size: 1.875rem;
    }
    
    .md\:block {
        display: block;
    }
    
    .md\:hidden {
        display: none;
    }
}

@media (min-width: 1024px) {
    .lg\:flex-row {
        flex-direction: row;
    }
    
    .lg\:w-80 {
        width: 20rem;
    }
    
    .lg\:order-1 {
        order: 1;
    }
    
    .lg\:order-2 {
        order: 2;
    }
}

/* ==================== 颜色类 ==================== */
.bg-white {
    background-color: #ffffff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-800 {
    background-color: #1f2937;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-blue-500 {
    background-color: #3b82f6;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.text-white {
    color: #ffffff;
}

.text-gray-900 {
    color: #111827;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-blue-600 {
    color: #2563eb;
}

.text-blue-500 {
    color: #3b82f6;
}

.text-blue-800 {
    color: #1e40af;
}

/* ==================== 边框和阴影 ==================== */
.border {
    border-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-l-4 {
    border-left-width: 4px;
}

.border-gray-100 {
    border-color: #f3f4f6;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-blue-500 {
    border-color: #3b82f6;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* ==================== 交互效果 ==================== */
.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

.hover\:bg-blue-100:hover {
    background-color: #dbeafe;
}

.hover\:text-blue-600:hover {
    color: #2563eb;
}

.hover\:text-blue-800:hover {
    color: #1e40af;
}

.hover\:text-white:hover {
    color: #ffffff;
}

.hover\:underline:hover {
    text-decoration: underline;
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* ==================== 排版类 ==================== */
.text-sm {
    font-size: 0.875rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.leading-tight {
    line-height: 1.25;
}

.leading-relaxed {
    line-height: 1.625;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

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

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

/* ==================== 位置类 ==================== */
.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.z-50 {
    z-index: 50;
}

.overflow-hidden {
    overflow: hidden;
}

/* ==================== 图片类 ==================== */
.object-cover {
    object-fit: cover;
}

.w-4 {
    width: 1rem;
}

.w-48 {
    width: 12rem;
}

.h-4 {
    height: 1rem;
}

.h-48 {
    height: 12rem;
}

/* ==================== 导航模块样式 ==================== */
.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.desktop-nav ul li a {
    color: #4b5563;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.desktop-nav ul li a:hover {
    color: #2563eb;
}

/* ==================== 文章内容样式 ==================== */
.article-content {
    font-size: 1rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111827;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content a {
    color: #2563eb;
    text-decoration: underline;
}

.article-content a:hover {
    color: #1d4ed8;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #4b5563;
    font-style: italic;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-content li {
    margin: 0.5rem 0;
}

.article-content code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
}

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

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

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.article-content th,
.article-content td {
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.article-content th {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* ==================== 侧边栏模块样式 ==================== */
.sidebar-module {
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    border: 1px solid #f3f4f6;
}

.sidebar-module h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-module ul {
    list-style: none;
}

.sidebar-module ul li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed #f3f4f6;
}

.sidebar-module ul li:last-child {
    border-bottom: none;
}

.sidebar-module ul li a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.15s;
    display: block;
}

.sidebar-module ul li a:hover {
    color: #2563eb;
}

/* ==================== 分页样式 ==================== */
.pagebar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagebar a,
.pagebar span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.15s;
}

.pagebar a {
    background-color: #ffffff;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.pagebar a:hover {
    background-color: #f3f4f6;
    color: #2563eb;
    border-color: #2563eb;
}

.pagebar .pagebar-page-current {
    background-color: #3b82f6;
    color: #ffffff;
    border: 1px solid #3b82f6;
    font-weight: 600;
}

/* ==================== 搜索表单 ==================== */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s;
}

.search-form input[type="text"]:focus {
    border-color: #3b82f6;
}

.search-form button {
    padding: 0.5rem 1rem;
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s;
}

.search-form button:hover {
    background-color: #2563eb;
}

/* ==================== 标签云 ==================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f3f4f6;
    color: #4b5563;
    font-size: 0.875rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.15s;
}

.tag-cloud a:hover {
    background-color: #dbeafe;
    color: #2563eb;
}

/* ==================== Grid ==================== */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

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

.block {
    display: block;
}

.inline-flex {
    display: inline-flex;
}

.inline-block {
    display: inline-block;
}
