/* ========================================
   盘搜 - 觅觅风格样式
   简洁网盘资源搜索
   ======================================== */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
}

/* ========================================
   顶部导航栏 - mipan.so 风格
   ======================================== */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.brand .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2f80ed, #16b8a6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.brand-dom {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-item {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
}

.nav-item:hover {
    color: #3f63b4;
}

.nav-item.active {
    color: #3f63b4;
    font-weight: 500;
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: #eee;
}

.theme-dot {
    width: 12px;
    height: 12px;
    background: #3f63b4;
    border-radius: 50%;
}

.theme-label {
    font-size: 12px;
    color: #666;
}

/* ========================================
   主内容区域
   ======================================== */
.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Hero 区域
   ======================================== */
.hero {
    text-align: center;
    padding: 80px 20px 40px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.3;
    animation: title-glow 6s ease-in-out infinite;
}

/* 主标题呼吸灯：与搜索框同款的循环光晕 */
@keyframes title-glow {
    0%, 100% {
        text-shadow: 0 0 6px rgba(47, 128, 237, 0.5),
                     0 0 18px rgba(47, 128, 237, 0.25);
    }
    20% {
        text-shadow: 0 0 9px rgba(22, 184, 166, 0.55),
                     0 0 24px rgba(22, 184, 166, 0.3);
    }
    40% {
        text-shadow: 0 0 10px rgba(255, 122, 69, 0.55),
                     0 0 26px rgba(255, 122, 69, 0.28);
    }
    60% {
        text-shadow: 0 0 9px rgba(235, 47, 150, 0.55),
                     0 0 24px rgba(235, 47, 150, 0.28);
    }
    80% {
        text-shadow: 0 0 7px rgba(155, 81, 224, 0.55),
                     0 0 20px rgba(155, 81, 224, 0.3);
    }
}

.hero-title span {
    color: #3f63b4;
}

/* 「资源」二字：随机起始色 + 随时间循环变色 */
.hero-title .hero-accent {
    color: #e74c3c;
    animation: accent-color 6s linear infinite;
    display: inline-block;
}

@keyframes accent-color {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}

.hero-subtitle {
    font-size: 15px;
    color: #999;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ========================================
   搜索区域
   ======================================== */
.search-section {
    max-width: 640px;
    margin: 0 auto 32px;
}

.search-box {
    display: flex;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 4px;
    transition: all 0.3s;
    animation: search-glow 6s ease-in-out infinite;
}

/* 搜索框外发光：颜色循环 + 呼吸灯强弱变化 */
@keyframes search-glow {
    0%, 100% {
        box-shadow: 0 0 6px 1px rgba(47, 128, 237, 0.55),
                    0 0 16px 4px rgba(47, 128, 237, 0.22);
    }
    20% {
        box-shadow: 0 0 11px 3px rgba(22, 184, 166, 0.6),
                    0 0 26px 8px rgba(22, 184, 166, 0.28);
    }
    40% {
        box-shadow: 0 0 13px 4px rgba(255, 122, 69, 0.6),
                    0 0 30px 10px rgba(255, 122, 69, 0.25);
    }
    60% {
        box-shadow: 0 0 10px 3px rgba(235, 47, 150, 0.6),
                    0 0 26px 8px rgba(235, 47, 150, 0.26);
    }
    80% {
        box-shadow: 0 0 8px 2px rgba(155, 81, 224, 0.6),
                    0 0 22px 6px rgba(155, 81, 224, 0.28);
    }
}

.search-box:focus-within {
    border-color: #3f63b4;
}

.search-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    color: #333;
    background: transparent;
    border: none;
    outline: none;
}

.search-input::placeholder {
    color: #bbb;
}

.search-btn {
    height: 44px;
    padding: 0 24px;
    background: linear-gradient(135deg, #2f80ed, #16b8a6);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    opacity: 0.9;
}

/* ========================================
   热门关键词
   ======================================== */
.hot-section {
    max-width: 700px;
    margin: 0 auto 60px;
}

.hot-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    text-align: center;
    animation: glow-soft 6s ease-in-out infinite;
}

/* 热门搜索小光晕：与搜索框/主标题同节奏，但更柔和 */
@keyframes glow-soft {
    0%, 100% {
        text-shadow: 0 0 4px rgba(47, 128, 237, 0.5),
                     0 0 10px rgba(47, 128, 237, 0.22);
    }
    20% {
        text-shadow: 0 0 6px rgba(22, 184, 166, 0.55),
                     0 0 14px rgba(22, 184, 166, 0.26);
    }
    40% {
        text-shadow: 0 0 7px rgba(255, 122, 69, 0.55),
                     0 0 16px rgba(255, 122, 69, 0.24);
    }
    60% {
        text-shadow: 0 0 6px rgba(235, 47, 150, 0.55),
                     0 0 14px rgba(235, 47, 150, 0.24);
    }
    80% {
        text-shadow: 0 0 5px rgba(155, 81, 224, 0.55),
                     0 0 12px rgba(155, 81, 224, 0.26);
    }
}

.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.hot-tag {
    padding: 6px 14px;
    background: transparent;
    border-radius: 16px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    animation: glow-soft 6s ease-in-out infinite;
}

.hot-tag:hover {
    background: transparent;
    color: #3f63b4;
    text-decoration: underline;
}

/* ========================================
   搜索结果页
   ======================================== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #fafafa;
    border-radius: 8px;
}

.results-count {
    font-size: 14px;
    color: #666;
}

.results-count strong {
    color: #3f63b4;
    font-size: 16px;
}

.cloud-filter {
    display: flex;
    gap: 6px;
}

.cloud-btn {
    padding: 5px 12px;
    font-size: 12px;
    color: #666;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.cloud-btn:hover {
    border-color: #3f63b4;
    color: #3f63b4;
}

.cloud-btn.active {
    background: linear-gradient(135deg, #3f63b4, #764ba2);
    color: white;
    border: none;
}

/* 结果网格 - 单列布局 */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.result-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    width: 100%;
    position: relative;
}

.result-card:hover {
    border-color: #3f63b4;
}

.result-content {
    padding: 16px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.result-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    flex: 1;
}

.cloud-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.cloud-badge.quark { background: #00d2ff; color: white; }
.cloud-badge.baidu { background: #3063eb; color: white; }
.cloud-badge.aliyun { background: #ff6a00; color: white; }
.cloud-badge.xunlei { background: #5bb8f5; color: white; }
.cloud-badge.tianyi { background: #00beae; color: white; }
.cloud-badge.unknown { background: #999; color: white; }

.result-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.result-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}

.copy-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #3f63b4, #764ba2);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    opacity: 0.9;
}

.copy-btn.copied {
    background: #999;
}

/* 失效标签 & 催更新按钮 */
.invalid-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #e74c3c;
    white-space: nowrap;
    flex-shrink: 0;
}

.report-btn {
    padding: 6px 14px;
    margin-right: 8px;
    background: #fff;
    color: #e67e22;
    border: 1px solid #e67e22;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.report-btn:hover {
    background: #fdf3e7;
}

.report-btn:disabled {
    color: #bbb;
    border-color: #ddd;
    background: #f7f7f7;
    cursor: default;
}

/* 侵权下架按钮 */
.copyright-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 0;
}

.copyright-hint {
    font-size: 13px;
    font-weight: 600;
    color: #e74c3c;
    white-space: nowrap;
}

.copyright-btn {
    padding: 11px 26px;
    background: linear-gradient(135deg, #ff5f4d, #d63031);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.45);
    transition: transform 0.15s, box-shadow 0.2s;
}

.copyright-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(231, 76, 60, 0.55);
}

.copyright-btn:disabled {
    color: #ccc;
    border: 1px solid #eee;
    background: #f5f5f5;
    box-shadow: none;
    cursor: default;
}

/* 侵权投诉弹窗 */
.modal-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-mask.open {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #2b303b;
    margin-bottom: 10px;
}

.modal-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 12px;
}

.modal-desc ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.modal-notice {
    background: #fdf6f5;
    border-left: 3px solid #e74c3c;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 0 0 10px;
    color: #555;
    font-size: 12.5px;
    line-height: 1.8;
}

.modal-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin: 12px 0 6px;
}

.modal-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.modal-file {
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    padding: 6px 0;
}

.modal-error {
    min-height: 18px;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 8px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.modal-cancel,
.modal-submit {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
}

.modal-cancel {
    background: #f5f6f8;
    color: #606266;
    border-color: #dcdfe6;
}

.modal-submit {
    background: #e74c3c;
    color: #fff;
    font-weight: 600;
}

.modal-submit:hover {
    background: #c0392b;
}

.modal-submit:disabled {
    background: #f0b4ae;
    cursor: not-allowed;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0;
}

.page-link {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    background: #fff;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #e5e5e5;
}

.page-link:hover {
    border-color: #3f63b4;
    color: #3f63b4;
}

.page-link.active {
    background: linear-gradient(135deg, #3f63b4, #764ba2);
    color: white;
    border: none;
}

/* 无结果 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #fafafa;
    border-radius: 8px;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-results p {
    font-size: 14px;
    color: #999;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: #fafafa;
    border-top: 1px solid #e5e5e5;
    padding: 40px 20px;
    text-align: center;
}

.footer-content {
    max-width: 700px;
    margin: 0 auto;
}

.footer-disclaimer {
    font-size: 12px;
    color: #999;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-disclaimer a {
    color: #3f63b4;
    text-decoration: none;
}

.footer-disclaimer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-links a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.footer-links a:hover {
    color: #3f63b4;
}

.footer-copyright {
    font-size: 12px;
    color: #999;
}

/* ========================================
   关于页
   ======================================== */
.about-page {
    padding: 40px 0;
    max-width: 700px;
    margin: 0 auto;
}

.about-content {
    background: #fafafa;
    border-radius: 8px;
    padding: 32px;
}

.about-section {
    margin-bottom: 28px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.about-section p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 10px;
}

.about-section ul, .about-section ol {
    font-size: 14px;
    color: #666;
    line-height: 2;
    padding-left: 20px;
}

.about-section li {
    margin-bottom: 4px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .topbar-inner {
        padding: 0 16px;
    }
    
    .brand-dom {
        display: none;
    }
    
    .nav {
        gap: 16px;
    }
    
    .hero {
        padding: 48px 16px 32px;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .main {
        padding: 0 16px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .cloud-filter {
        flex-wrap: wrap;
    }
}

/* ========================================
   深色主题
   ======================================== */
body.dark-theme {
    color: #e0e0e0;
    background: #1a1a1a;
}

body.dark-theme .topbar {
    background: #1a1a1a;
    border-bottom-color: #333;
}

body.dark-theme .brand-name {
    color: #e0e0e0;
}

body.dark-theme .brand-dom {
    color: #666;
}

body.dark-theme .nav-item {
    color: #888;
}

body.dark-theme .nav-item:hover,
body.dark-theme .nav-item.active {
    color: #7b9cff;
}

body.dark-theme .theme-btn {
    background: #2a2a2a;
}

body.dark-theme .theme-btn:hover {
    background: #333;
}

body.dark-theme .theme-label {
    color: #888;
}

body.dark-theme .theme-dot {
    background: #7b9cff;
}

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

body.dark-theme .hero-subtitle {
    color: #666;
}

body.dark-theme .search-box {
    background: #2a2a2a;
    border-color: #333;
}

body.dark-theme .search-box:focus-within {
    border-color: #7b9cff;
}

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

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

body.dark-theme .hot-tag {
    background: transparent;
    color: #888;
}

body.dark-theme .hot-tag:hover {
    background: transparent;
    color: #7b9cff;
}

body.dark-theme .results-header {
    background: #2a2a2a;
}

body.dark-theme .results-count {
    color: #888;
}

body.dark-theme .cloud-btn {
    background: #2a2a2a;
    border-color: #333;
    color: #888;
}

body.dark-theme .cloud-btn:hover {
    border-color: #7b9cff;
    color: #7b9cff;
}

body.dark-theme .result-card {
    background: #2a2a2a;
    border-color: #333;
}

body.dark-theme .result-card:hover {
    border-color: #7b9cff;
}

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

body.dark-theme .result-meta {
    color: #666;
}

body.dark-theme .result-desc {
    color: #888;
}

body.dark-theme .result-footer {
    border-top-color: #333;
}

body.dark-theme .result-date {
    color: #666;
}

body.dark-theme .page-link {
    background: #2a2a2a;
    border-color: #333;
    color: #888;
}

body.dark-theme .page-link:hover {
    border-color: #7b9cff;
    color: #7b9cff;
}

body.dark-theme .no-results {
    background: #2a2a2a;
}

body.dark-theme .footer {
    background: #1a1a1a;
    border-top-color: #333;
}

body.dark-theme .footer-disclaimer {
    color: #666;
}

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

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

body.dark-theme .footer-copyright {
    color: #555;
}

body.dark-theme .about-content {
    background: #2a2a2a;
}

body.dark-theme .about-section h3 {
    color: #e0e0e0;
    border-bottom-color: #333;
}

body.dark-theme .about-section p,
body.dark-theme .about-section li {
    color: #888;
}

body.dark-theme .about-content {
    border-color: #333;
}


/* ===== 广告位 & 公告（默认隐藏，有数据时 .active 才显示）===== */
.ad-slot,
.announcement {
    display: none;
    width: 100%;
}
.ad-slot.active,
.announcement.active {
    display: block;
}
/* 广告：居中、限制最大宽度，不占满整行，避免喧宾夺主 */
.ad-slot {
    text-align: center;
    margin: 8px auto;
}
.ad-slot .ad-link {
    display: inline-block;
    text-decoration: none;
    position: relative;
    max-width: 728px;      /* 限制广告最大宽度 */
}
.ad-slot .ad-link img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    max-height: 120px;      /* 限制广告最大高度 */
    object-fit: contain;
}
/* 广告角标 */
.ad-slot .ad-tag {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 2px;
    line-height: 1.4;
}
/* 公告顶部条：紧凑 */
.announcement[data-announcement-type='top_bar'].active {
    background: #fff8e1;
    border-bottom: 1px solid #ffe082;
    padding: 3px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #6d4c00;
}
.ann-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ann-item .ann-title {
    font-weight: bold;
    margin-right: 6px;
}
/* 公告弹窗：更小更紧凑 */
.ann-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.ann-modal {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    max-width: 320px;
    width: 88%;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.ann-modal h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.ann-modal .ann-content {
    font-size: 13px;
    line-height: 1.5;
    color: #444;
}
.ann-modal .ann-close {
    margin-top: 12px;
    padding: 5px 16px;
    border: none;
    background: #3f63b4;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
/* 侧栏公告：紧凑 */
.announcement[data-announcement-type='sidebar'].active {
    padding: 6px 10px;
    font-size: 12px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #555;
}

