/* ================================
/* ================================
   雨墨资源 - 统一样式文件
   包含首页和搜索页所有样式
   ================================ */

/* CSS Reset */
body, h1, h2, p, div, input, button, ul, li, a, svg {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa; 
    color: #343a40;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* 主题切换样式 */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ================================
   通用顶部区域样式
   ================================ */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

/* 首页顶部样式 */
.site-header.home-header {
    padding: 20px 0;
}

/* 搜索页顶部样式 */
.site-header.search-header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-logo {
    width: 36px;
    height: 36px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.site-logo:hover {
    transform: rotate(90deg);
}

.logo-main-color { stroke: #495057; }
.logo-accent-color { fill: #007bff; }

.logo-text {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(90deg, #343a40, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-decoration: none; /* 移除链接下划线 */
    transition: transform 0.2s ease; /* 添加悬停动画 */
    cursor: pointer;
}

.logo-text:hover {
    transform: scale(1.05); /* 悬停时轻微放大 */
}

.separator {
    margin: 0 5px;
    color: #ced4da;
}

.site-description {
    font-size: 14px;
    color: #6c757d;
}

.header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.action-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-left: 20px;
    fill: #6c757d;
    transition: fill 0.3s;
}

.action-icon:hover {
    fill: #343a40;
}

/* 搜索页专用头部搜索 */
.header-search {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    padding: 0 40px;
}

.header-search-wrapper {
    width: 100%;
    max-width: 580px;
    display: flex;
    border-radius: 50px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.header-search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 10px 20px;
    font-size: 14px;
    background: transparent;
}

.header-search-button {
    border: none;
    background-color: #007bff;
    color: white;
    padding: 0 25px;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-icon {
    width: 16px;
    height: 16px;
    fill: white;
}

/* ================================
   主体内容区域
   ================================ */
.main-content {
    flex-grow: 1;
}

/* 首页主体样式 */
.main-content.home-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 0;
}

/* 搜索页主体样式 */
.main-content.search-content {
    padding: 40px 0;
}

.slogan {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #343a40, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.decorative-text {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 40px;
}

/* 首页搜索框 */
.search-wrapper {
    width: 100%;
    max-width: 680px;
    display: flex;
    border-radius: 50px;
    border: 1px solid #dee2e6;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-wrapper:hover,
.search-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
}

.search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 18px 25px;
    font-size: 16px;
    background: transparent;
    color: #343a40;
}

.search-button {
    border: none;
    background-color: #007bff;
    color: white;
    padding: 0 30px;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #0056b3;
}

.search-icon.large {
    width: 20px;
    height: 20px;
    fill: white;
}

.hot-searches {
    margin-top: 20px;
    font-size: 14px;
}

.hot-searches a {
    color: #6c757d;
    text-decoration: none;
    margin: 0 5px; /* 减少了左右间距，从10px改为5px */
    padding: 6px 12px;
    border-radius: 16px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.hot-searches a:hover {
    color: #007bff;
    background-color: #e7f5ff;
    transform: translateY(-1px);
}

.hot-searches a:active {
    transform: translateY(0);
}

/* ================================
   搜索页专用样式
   ================================ */

/* 搜索控制区 */
.search-controls-block {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.results-summary {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}

.results-summary span {
    margin-right: 20px;
}

.filter-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    border-color: #007bff;
    color: #007bff;
}

.filter-pill.active {
    background-color: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.results-list {
    display: grid;
    gap: 20px;
}

.result-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-title a {
    text-decoration: none;
    color: #343a40;
    transition: color 0.2s;
}

.card-title a:hover {
    color: #007bff;
}

.card-description {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 12px;
}

.meta-tag {
    padding: 4px 10px;
    background-color: #f1f3f5;
    border-radius: 4px;
}

.meta-tag.disk-type {
    font-weight: bold;
    background-color: #e7f5ff;
    color: #007bff;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f3f5;
    padding-top: 15px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.button-icon {
    width: 14px;
    height: 14px;
}

.button-primary {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.button-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.button-outline {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
}

.button-outline:hover {
    background-color: #e7f5ff;
}

.extraction-code {
    font-size: 14px;
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 5px;
}

.extraction-code span {
    color: #6c757d;
    margin-right: 5px;
}

/* ================================
   底部区域样式
   ================================ */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #343a40;
}

/* 备案号链接样式 */
.copyright a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s;
}

.copyright a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* ================================
   深色主题样式
   ================================ */
body.dark-theme .site-header {
    background-color: #1a1a1c;
    border-bottom-color: #2c2c2e;
}

body.dark-theme .logo-main-color {
    stroke: #adb5bd;
}

body.dark-theme .logo-text {
    background: linear-gradient(90deg, #e0e0e0, #0099ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

body.dark-theme .site-description {
    color: #888888;
}

body.dark-theme .action-icon {
    fill: #bbbbbb;
}

body.dark-theme .action-icon:hover {
    fill: #ffffff;
}

body.dark-theme .slogan {
    background: linear-gradient(90deg, #e0e0e0, #0099ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-theme .decorative-text {
    color: #888888;
}

body.dark-theme .search-wrapper {
    background-color: #1e1e1e;
    border-color: #444;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

body.dark-theme .search-input {
    color: #e0e0e0;
}

body.dark-theme .hot-searches a {
    color: #bbbbbb;
}

body.dark-theme .hot-searches a:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

body.dark-theme .site-footer {
    background-color: #1a1a1c;
    border-top-color: #2c2c2e;
    color: #888888;
}

body.dark-theme .footer-links a {
    color: #888888;
}

body.dark-theme .footer-links a:hover {
    color: #cccccc;
}

/* 深色主题下备案号链接样式 */
body.dark-theme .copyright a {
    color: #888888;
}

body.dark-theme .copyright a:hover {
    color: #0099ff;
    text-decoration: underline;
}

/* 搜索页深色主题 */
body.dark-theme .header-search-wrapper {
    background-color: #2c2c2e;
    border-color: #444;
}

body.dark-theme .header-search-input {
    color: #e0e0e0;
}

body.dark-theme .search-controls-block {
    background-color: #1e1e1e;
    border-color: #2c2c2e;
}

body.dark-theme .results-summary,
body.dark-theme .card-description,
body.dark-theme .extraction-code span {
    color: #888888;
}

body.dark-theme .filter-pill {
    border-color: #444;
}

body.dark-theme .filter-pill:hover {
    border-color: #0099ff;
    color: #0099ff;
}

body.dark-theme .filter-pill.active {
    background-color: #0099ff;
    border-color: #0099ff;
    color: #fff;
}

body.dark-theme .result-card {
    background-color: #1e1e1e;
    border-color: #2c2c2e;
}

body.dark-theme .card-title a {
    color: #e0e0e0;
}

body.dark-theme .meta-tag {
    background-color: #2c2c2e;
}

body.dark-theme .meta-tag.disk-type {
    background-color: #003c66;
    color: #0099ff;
}

body.dark-theme .card-actions {
    border-top-color: #2c2c2e;
}

body.dark-theme .button-outline {
    color: #0099ff;
    border-color: #0099ff;
}

body.dark-theme .button-outline:hover {
    background-color: rgba(0, 153, 255, 0.1);
}

body.dark-theme .extraction-code {
    background-color: #2c2c2e;
}

/* ================================
   新增功能样式
   ================================ */

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 无结果提示 */
.no-results {
    text-align: center;
    color: #6c757d;
    font-size: 16px;
    padding: 60px 20px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

body.dark-theme .no-results {
    background-color: #1e1e1e;
    border-color: #2c2c2e;
    color: #888888;
}

/* 错误消息 */
.error-message {
    text-align: center;
    color: #dc3545;
    font-size: 16px;
    padding: 60px 20px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

body.dark-theme .error-message {
    background-color: #1e1e1e;
    border-color: #2c2c2e;
    color: #ff6b6b;
}

/* Toast 提示动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* 搜索按钮禁用状态 */
.search-button:disabled,
.header-search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.search-button:disabled:hover,
.header-search-button:disabled:hover {
    background-color: #007bff;
}

/* 搜索结果页面改进 */
.header-search-wrapper {
    position: relative;
}

.clear-search-btn {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    font-size: 18px;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.clear-search-btn:hover {
    color: #343a40;
}

.clear-search-btn.show {
    display: flex;
}

body.dark-theme .clear-search-btn {
    color: #bbbbbb;
}

body.dark-theme .clear-search-btn:hover {
    color: #ffffff;
}

/* 筛选动画效果 */
.results-list {
    transition: opacity 0.3s ease;
}

.results-list.filtering {
    opacity: 0.5;
}

.result-card {
    animation: fadeInUp 0.4s ease;
}

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

/* 筛选按钮动画 */
.filter-pill {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.filter-pill:hover::before {
    left: 100%;
}

.filter-pill.active {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

body.dark-theme .filter-pill.active {
    box-shadow: 0 2px 8px rgba(0, 153, 255, 0.3);
}

/* 分页加载相关样式 */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    margin: 20px 0;
    transition: opacity 0.3s ease;
}

.loading-text {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-text::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 筛选时的加载动画 */
.results-list.filtering {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* 旋转动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 新加载的卡片动画 */
.result-card {
    animation: fadeIn 0.4s ease-out;
}

/* 深色主题下的加载指示器 */
body.dark-theme .loading-indicator {
    color: #a0a0a0;
}

body.dark-theme .loading-text {
    color: #a0a0a0;
}

body.dark-theme .loading-text::before {
    border-color: #333;
    border-top-color: #007bff;
}