/* ===== 暗色科技风首页样式 home-dark.css ===== */

/* 基础变量 */
:root {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --accent-cyan: #00d4ff;
    --accent-purple: #b829dd;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.1);
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.5);
    --glow-purple: 0 0 20px rgba(184, 41, 221, 0.5);
}

/* 全局样式 */
.dark-theme {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'JetBrains Mono', monospace;
}

/* 粒子背景Canvas */
.particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== 顶部导航栏 ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 56px;
}

.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-cyan);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-brand i {
    font-size: 16px;
}

.nav-logo-svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-logo-svg .logo-outer {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 3;
}

.nav-logo-svg .logo-inner {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
    opacity: 0.6;
}

.nav-logo-svg .logo-dot {
    fill: var(--accent-cyan);
}

.nav-logo-svg .logo-cross {
    stroke: var(--accent-cyan);
    stroke-width: 2;
    opacity: 0.4;
}

.nav-logo-svg .logo-t {
    fill: var(--accent-cyan);
}

.footer-logo-svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.footer-logo-svg .logo-outer {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 3;
}

.footer-logo-svg .logo-inner {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 2;
    opacity: 0.6;
}

.footer-logo-svg .logo-dot {
    fill: var(--accent-cyan);
}

.footer-logo-svg .logo-cross {
    stroke: var(--accent-cyan);
    stroke-width: 2;
    opacity: 0.4;
}

.footer-logo-svg .logo-t {
    fill: var(--accent-cyan);
}

.nav-brand:hover {
    color: #33e0ff;
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.nav-link.active {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
}

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

.nav-icp {
    color: rgba(0, 180, 212, 0.6);
    font-size: 11px;
    white-space: nowrap;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 14px;
}

.theme-toggle:hover {
    color: var(--accent-cyan);
    border-color: rgba(0, 212, 255, 0.3);
    text-decoration: none;
}

/* 主容器 */
.home-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 100px;
}

/* ===== 首屏横幅区 ===== */
.hero-banner {
    text-align: center;
    padding: 60px 0 40px;
}

.hero-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 36px;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #33e0ff 40%, #a8edea 70%, #b829dd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.hero-subtitle {
    color: #8a9bb5;
    font-size: 16px;
    letter-spacing: 4px;
    margin-bottom: 0;
}

.hero-divider {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    margin: 24px auto 0;
}

/* ===== 命令行搜索框 ===== */
.terminal-search {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.terminal-prompt {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.terminal-prompt:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.prompt-symbol {
    color: var(--accent-cyan);
    font-weight: bold;
    font-size: 18px;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
}

.terminal-input::placeholder {
    color: var(--text-secondary);
}

.terminal-cursor {
    color: var(--accent-cyan);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.terminal-hint {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
    padding-left: 30px;
}

/* 搜索建议下拉 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    background: rgba(15, 20, 25, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
}

/* ===== 分类标签 ===== */
.category-nav {
    text-align: center;
    margin-bottom: 40px;
}

.nav-track {
    display: inline-flex;
    gap: 10px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 25px;
}

.nav-item {
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* ===== 工具卡片网格 ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.tool-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: var(--glow-cyan);
    background: rgba(0, 212, 255, 0.04);
}

.tool-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
}

.tool-icon-wrapper {
    font-size: 48px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
    position: relative;
}

/* NEW角标 */
.new-badge {
    position: absolute;
    top: -8px;
    right: -16px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    animation: new-pulse 2s ease-in-out infinite;
}

@keyframes new-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.tool-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f0f0f0;
}

.tool-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    height: 40px;
    overflow: hidden;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    border-radius: 25px;
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s;
}

.tool-link:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    text-decoration: none;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* ===== 最近使用(左侧浮动) ===== */
.recent-section {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 100;
    background: rgba(15, 20, 25, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 14px;
    padding: 16px 18px 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.05);
    min-width: 150px;
}

.recent-divider {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.recent-divider span {
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    white-space: nowrap;
}

.recent-item:hover {
    border-color: rgba(0, 212, 255, 0.4);
    color: var(--accent-cyan);
    text-decoration: none;
    background: rgba(0, 212, 255, 0.06);
    transform: translateX(4px);
}

.recent-item i {
    color: var(--accent-cyan);
    font-size: 12px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.recent-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-time {
    font-size: 11px;
    opacity: 0.45;
    flex-shrink: 0;
}

/* ===== 广告位 ===== */
.ad-sidebar {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 50;
}

.ad-slot {
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.ad-slot::before {
    content: '广告';
    display: block;
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3px 0;
    letter-spacing: 2px;
}

.ad-slot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0 0 8px 8px;
}

.ad-slot-sidebar {
    width: 160px;
}

.ad-slot-bottom {
    width: 100%;
    max-width: 728px;
    margin: 40px auto 0;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.15);
    font-size: 12px;
}

.ad-placeholder i {
    font-size: 20px;
}

/* ===== 热门工具区(横向滚动) ===== */
.hot-tools-section {
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-cyan);
}

.hot-tools-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.hot-tools-scroll::-webkit-scrollbar {
    height: 6px;
}

.hot-tools-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.hot-tools-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.hot-tools-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.hot-tool-card {
    flex: 0 0 auto;
    width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hot-tool-card:hover {
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: var(--glow-cyan);
    background: rgba(0, 212, 255, 0.04);
}

.hot-tool-icon {
    font-size: 32px;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.3));
}

.hot-tool-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.hot-tool-btn {
    display: inline-block;
    padding: 6px 20px;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    border-radius: 20px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
}

.hot-tool-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    text-decoration: none;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* ===== 工具教程区 ===== */
.tutorial-section {
    margin-bottom: 40px;
}

.tutorial-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.tutorial-scroll::-webkit-scrollbar {
    height: 6px;
}

.tutorial-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.tutorial-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.tutorial-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.tutorial-card {
    flex: 0 0 auto;
    width: 220px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tutorial-card:hover {
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: var(--glow-cyan);
}

.tutorial-icon {
    font-size: 28px;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

.tutorial-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tutorial-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    height: 36px;
    overflow: hidden;
}

.tutorial-link {
    display: inline-block;
    padding: 6px 18px;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 20px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
    margin-top: 4px;
}

.tutorial-link:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-cyan);
    text-decoration: none;
}

/* ===== 页脚 ===== */
.site-footer-full {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(8, 12, 18, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 20px 16px;
    margin-top: 0;
    backdrop-filter: blur(10px);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-cyan);
    text-decoration: none;
}

.footer-sep {
    color: rgba(255, 255, 255, 0.15);
    font-size: 12px;
}

.footer-bottom p {
    margin: 3px 0;
    font-size: 12px;
    color: rgba(0, 180, 212, 0.5);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.4) !important;
}

.footer-contact a {
    color: rgba(0, 180, 212, 0.65);
    text-decoration: none;
}

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

.footer-icp {
    letter-spacing: 1px;
}

/* ===== 响应式适配 ===== */
@media (max-width: 768px) {
    .top-nav-inner {
        padding: 0 12px;
    }

    .nav-links {
        display: none;
    }

    .nav-icp {
        display: none;
    }

    .home-container {
        padding: 70px 15px 100px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 13px;
        letter-spacing: 2px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .hot-tool-card {
        width: 160px;
    }

    .tutorial-card {
        width: 180px;
    }

    .recent-section {
        display: none !important;
    }

    .ad-sidebar {
        display: none !important;
    }

    .ad-slot-bottom {
        height: 60px;
    }

    .footer-top {
        flex-direction: column;
        gap: 16px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===== Layer弹框暗色主题 ===== */
.dark-theme .layui-layer {
    background-color: #1a1f2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.dark-theme .layui-layer-title {
    background: #151a26;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .layui-layer-content {
    color: #e0e0e0;
}

.dark-theme .layui-layer-dialog .layui-layer-content {
    color: #e0e0e0;
}

.dark-theme .layui-layer-btn {
    background: #151a26;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .layui-layer-btn a {
    background: #2a2f3e;
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-theme .layui-layer-btn a:hover {
    background: #353a4a;
}

.dark-theme .layui-layer-btn .layui-layer-btn0 {
    background: #0071ce;
    color: #fff;
    border-color: #0071ce;
}

.dark-theme .layui-layer-msg {
    background: #1a1f2e;
    border-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
}

.dark-theme .layui-layer-msg .layui-layer-content {
    color: #e0e0e0;
}

.dark-theme .layui-layer-prompt .layui-layer-input {
    background: #2a2f3e;
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

.dark-theme .layui-layer-prompt .layui-layer-input:focus {
    border-color: var(--accent-cyan);
}

.dark-theme .layui-layer-setwin .layui-layer-min cite {
    background-color: #a0aec0;
}

.dark-theme .layui-layer-setwin .layui-layer-min:hover cite {
    background-color: var(--accent-cyan);
}

/* 隐藏动画 */
.tool-card.hidden {
    display: none;
}

.tool-card.fade-in {
    animation: fadeIn 0.3s ease;
}

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