/* ==========================================
   逍遥资源 · 暗黑简洁风格
   内容不变，仅视觉重构（2026-10-22）
   保留全部 class 名，JS 功能不受影响
   ========================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================
   浅色主题（备用，切换后可用）
   ========================================== */
:root {
    --bg: #F5F6FA;
    --bg-soft: #EEF0F6;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-header: rgba(255, 255, 255, 0.84);
    --bg-inset: rgba(15, 23, 42, 0.04);
    --text-primary: #0F1420;
    --text-secondary: #565D6C;
    --text-muted: #8A91A0;
    --border: rgba(15, 23, 42, 0.08);
    --accent: #6D5DF0;
    --accent-2: #4F7DF9;
    --gradient-main: linear-gradient(135deg, #7B6CF6 0%, #4F7DF9 100%);
    --gradient-accent: linear-gradient(135deg, #22D3EE 0%, #7B6CF6 100%);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 14px 32px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.16);
    --glow: 0 0 0 1px rgba(109, 93, 240, 0.14), 0 12px 32px rgba(109, 93, 240, 0.12);
    --radius-card: 16px;
    --transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   暗黑主题（默认主视觉）
   ========================================== */
body.dark {
    --bg: #09090E;
    --bg-soft: #0F0F16;
    --bg-card: rgba(21, 21, 30, 0.78);
    --bg-header: rgba(11, 11, 17, 0.82);
    --bg-inset: rgba(255, 255, 255, 0.05);
    --text-primary: #ECEDF3;
    --text-secondary: #9BA1B0;
    --text-muted: #616779;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #8B7CFF;
    --accent-2: #5B8CFF;
    --gradient-main: linear-gradient(135deg, #8B7CFF 0%, #5B8CFF 100%);
    --gradient-accent: linear-gradient(135deg, #22D3EE 0%, #8B7CFF 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 26px rgba(0, 0, 0, 0.30);
    --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.52);
    --glow: 0 0 0 1px rgba(139, 124, 255, 0.22), 0 14px 38px rgba(91, 140, 255, 0.14);
    color-scheme: dark;
}

/* ==========================================
   基础样式
   ========================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse at 18% -12%, rgba(139, 124, 255, 0.15), transparent 46%),
        radial-gradient(ellipse at 92% 8%, rgba(91, 140, 255, 0.11), transparent 42%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
    overflow-x: hidden;
}

body.dark {
    background-image:
        radial-gradient(ellipse at 18% -12%, rgba(139, 124, 255, 0.14), transparent 46%),
        radial-gradient(ellipse at 92% 8%, rgba(91, 140, 255, 0.10), transparent 42%);
}

::selection {
    background: rgba(139, 124, 255, 0.30);
}

body.dark ::-webkit-scrollbar { width: 10px; height: 10px; }
body.dark ::-webkit-scrollbar-thumb {
    background: #26262F;
    border-radius: 8px;
    border: 2px solid #09090E;
}
body.dark ::-webkit-scrollbar-track { background: transparent; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   背景装饰
   ========================================== */
.bg-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.10;
    animation: blobFloat 9s ease-in-out infinite alternate;
}

.bg-blob-1 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, #8B7CFF, transparent 68%);
    top: -160px; left: -160px;
    animation-delay: 0s;
}

.bg-blob-2 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, #5B8CFF, transparent 68%);
    top: 30%; right: -120px;
    animation-delay: 2.6s;
}

.bg-blob-3 {
    width: 360px; height: 360px;
    background: radial-gradient(circle, #22D3EE, transparent 68%);
    bottom: 90px; left: 22%;
    animation-delay: 5.2s;
}

body.dark .bg-blob { opacity: 0.07; }

@keyframes blobFloat {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 22px) scale(1.08); }
}

/* ==========================================
   导航栏
   ========================================== */
header {
    background: var(--bg-header);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition), box-shadow 0.3s, padding-bottom 0.3s;
}

header.scrolled {
    box-shadow: var(--shadow-sm);
    background: var(--bg-header);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* 左侧：Logo + 汉堡 */
.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hamburger {
    display: none;
    width: 36px; height: 36px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-inset);
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    align-items: center; justify-content: center;
    transition: var(--transition);
}
.hamburger:hover { color: var(--accent); border-color: rgba(139, 124, 255, 0.35); }

/* 右侧：时间 + 主题 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-clock {
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    text-decoration: none;
}

.logo-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--gradient-main);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(139, 124, 255, 0.25);
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* 导航链接 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(139, 124, 255, 0.12);
    color: var(--accent);
}

/* 主题切换按钮 */
.theme-toggle {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-inset);
    cursor: pointer;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(139, 124, 255, 0.35);
}

/* ==========================================
   移动端下拉菜单
   ========================================== */
.mobile-menu {
    display: none;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
}
.mobile-menu.open {
    display: block;
    max-height: 300px;
    opacity: 1;
    padding: 8px 20px 16px;
}
.mobile-menu-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s;
}
.mobile-menu-item:hover { background: rgba(139, 124, 255, 0.10); color: var(--accent); }

/* ==========================================
   主内容
   ========================================== */
main {
    flex: 1;
    padding: 40px 0 64px;
    position: relative;
    z-index: 1;
}

/* ==========================================
   Hero 区
   ========================================== */
.hero {
    text-align: center;
    margin-bottom: 46px;
    animation: fadeInUp 0.7s ease both;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: rgba(139, 124, 255, 0.10);
    border: 1px solid rgba(139, 124, 255, 0.28);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: 0;
    color: var(--text-primary);
}

.hero p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

.divider {
    width: 52px;
    height: 3px;
    background: var(--gradient-main);
    margin: 24px auto 0;
    border-radius: 4px;
}

/* ==========================================
   分区
   ========================================== */
.card-section {
    margin-bottom: 38px;
    scroll-margin-top: 84px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    border: 1px solid transparent;
}

.tag-blue  { background: rgba(79, 125, 249, 0.14);  color: #7FA8FF; border-color: rgba(79, 125, 249, 0.26); }
.tag-green { background: rgba(16, 185, 129, 0.13);  color: #4FD8A8; border-color: rgba(16, 185, 129, 0.26); }
.tag-pink  { background: rgba(236, 72, 153, 0.13);  color: #F07BAE; border-color: rgba(236, 72, 153, 0.26); }

:root:not(.dark) .tag-blue  { color: #3E6FE8; }
:root:not(.dark) .tag-green { color: #0E9F6E; }
:root:not(.dark) .tag-pink  { color: #DB2777; }

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================
   卡片网格
   ========================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* ==========================================
   卡片
   ========================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius-card);
    padding: 18px 52px 18px 18px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(139, 124, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: inherit;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow);
    border-color: rgba(139, 124, 255, 0.35);
}

.card:hover::before { opacity: 1; }

/* 卡片入场动画 — 即使 JS 不执行，卡片也正常显示 */
.card-animate {
    animation: cardIn 0.5s ease both;
}

.card-animate.visible {
    animation: none;
    opacity: 1;
    transform: translateY(0);
}

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

/* 精选卡片 */
.card-featured {
    border-color: rgba(139, 124, 255, 0.30);
    background: var(--bg-card);
}

.card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.card:hover .card-icon { transform: scale(1.05); }

.card-icon-img {
    padding: 6px;
}

.card-icon-img img {
    width: 32px; height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

/* 暗黑模式下压暗卡片图标的浅色渐变底色，保持简洁统一 */
body.dark .card-icon,
body.dark .card-icon-img {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.09);
    color: var(--text-secondary) !important;
}
body.dark .card-icon-img img { opacity: 0.92; }

.card-body {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-word;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    word-break: break-word;
}

.card-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    bottom: auto;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    transform: translateY(-50%);
}

.card:hover .card-arrow {
    background: rgba(139, 124, 255, 0.14);
    border-color: rgba(139, 124, 255, 0.35);
    color: var(--accent);
    transform: translate(2px, -50%);
}

/* 角标 */
.card-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.badge-purple { background: rgba(139, 92, 246, 0.15); color: #A78BFA; }
.badge-red    { background: rgba(239, 68, 68, 0.13);  color: #F87171; }
.badge-green  { background: rgba(16, 185, 129, 0.13); color: #4FD8A8; }
.badge-gold   { background: rgba(245, 158, 11, 0.14); color: #FBBF24; }

:root:not(.dark) .badge-purple { color: #8B5CF6; }
:root:not(.dark) .badge-red    { color: #EF4444; }
:root:not(.dark) .badge-green  { color: #0E9F6E; }
:root:not(.dark) .badge-gold   { color: #D97706; }

/* ==========================================
   搜索框
   ========================================== */
.search-section {
    max-width: 620px;
    margin: 26px auto 0;
    background: var(--bg-card);
    padding: 8px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    animation: fadeInUp 0.6s ease 0.3s both;
}

.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    transition: border-color 0.25s, background-color 0.25s;
}

.search-input:focus {
    border-color: rgba(139, 124, 255, 0.40);
    background: rgba(139, 124, 255, 0.06);
}

.search-input::placeholder { color: var(--text-muted); }

.search-button {
    padding: 12px 22px;
    background: var(--gradient-main);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(139, 124, 255, 0.22);
    transition: transform 0.25s, box-shadow 0.25s;
    white-space: nowrap;
}

.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(139, 124, 255, 0.30);
}

/* 搜索清除按钮 */
.search-clear {
    width: 34px; height: 34px;
    border-radius: 10px;
    border: none;
    background: var(--bg-inset);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.search-clear:hover { color: #F87171; background: rgba(239, 68, 68, 0.10); }

/* 搜索提示 */
.search-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    min-height: 16px;
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    animation: fadeInUp 0.3s ease both;
}
.no-results-emoji { font-size: 48px; margin-bottom: 12px; }
.no-results p { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.no-results span { font-size: 13px; color: var(--text-muted); }

/* ==========================================
   页脚
   ========================================== */
footer {
    background: var(--bg-header);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 30px 0;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 18px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.copyright {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================
   波纹效果
   ========================================== */
.ripple {
    position: absolute;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(139, 124, 255, 0.16);
    transform: translate(-50%, -50%) scale(0);
    animation: rippleAnim 0.6s linear forwards;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* ==========================================
   回到顶部
   ========================================== */
.back-to-top {
    position: fixed;
    right: 24px; bottom: 24px;
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--accent);
    color: #FFFFFF;
    border-color: transparent;
    transform: translateY(-2px) !important;
}

/* ==========================================
   响应式
   ========================================== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .hero { margin-bottom: 36px; }
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 0.96rem; }
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    main { padding: 28px 0 48px; }
    .search-section { margin-top: 18px; padding: 8px; }
    .search-button { padding: 11px 16px; }
    .card { padding: 14px 14px 42px; flex-direction: column; align-items: flex-start; min-height: 150px; }
    .card-arrow { top: auto; bottom: 14px; transform: none; }
    .card:hover .card-arrow { transform: translateX(2px); }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; line-height: 1.35; }
    .hero-badge { margin-bottom: 12px; }
    .divider { margin-top: 18px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card { padding: 14px; min-height: 136px; }
    .card-icon { width: 44px; height: 44px; font-size: 21px; }
    .card-title { font-size: 13px; }
    .card-subtitle { font-size: 11px; }
    .card-arrow { display: none; }
    .nav-clock { display: none; }
    .logo { font-size: 16px; gap: 8px; }
    .logo-icon { width: 34px; height: 34px; }
    .theme-toggle, .hamburger { width: 34px; height: 34px; }
    .search-form { gap: 6px; }
    .search-input { padding: 11px 12px; }
    .search-button { padding: 11px 12px; font-size: 14px; }
}
