/* ============================
   简航导航 - 自定义样式
   ============================ */

/* ===== 全局基础 ===== */
body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background: #f8faff;
    color: #1e293b;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== 顶部导航 ===== */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.header .navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar .navbar-brand.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.3rem;
    color: #0f172a;
    letter-spacing: -0.3px;
    padding: 0;
}

.brand .logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #4f6ef7, #7c5cfc);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(79, 110, 247, 0.25);
}

.brand .site-name {
    background: linear-gradient(135deg, #1e293b, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航链接 (覆盖 Bootstrap 样式) */
.nav-menu .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155 !important;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.nav-menu .nav-link:hover {
    color: #4f6ef7 !important;
    border-bottom-color: #4f6ef7;
}

.nav-menu .nav-link i {
    font-size: 0.9rem;
    color: #94a3b8;
    transition: color 0.2s;
}

.nav-menu .nav-link:hover i {
    color: #4f6ef7;
}

.nav-menu .nav-link.active {
    color: #4f6ef7 !important;
    border-bottom-color: #4f6ef7;
}

.nav-menu .nav-link.active i {
    color: #4f6ef7;
}

/* ===== Banner & 搜索区 ===== */
.banner {
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.banner::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 110, 247, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.banner::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.banner-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.banner-title span {
    background: linear-gradient(135deg, #4f6ef7, #7c5cfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-sub {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 28px;
    font-weight: 400;
}

/* 搜索框 */
.search-wrap {
    width: 100%;
    max-width: 600px;
    display: flex;
    background: #ffffff;
    border-radius: 60px;
    box-shadow: 0 8px 30px rgba(79, 110, 247, 0.10);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: box-shadow 0.25s, border-color 0.25s;
    overflow: hidden;
}

.search-wrap:focus-within {
    box-shadow: 0 8px 40px rgba(79, 110, 247, 0.18);
    border-color: #4f6ef7;
}

.search-wrap select {
    border: none;
    background: #f1f5f9;
    padding: 0 16px 0 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    border-right: 1px solid #e2e8f0;
    min-width: 100px;
    height: 54px;
    appearance: auto;
    background-color: #f8fafc;
}

.search-wrap input {
    flex: 1;
    border: none;
    padding: 0 18px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: #0f172a;
    height: 54px;
    min-width: 120px;
}

.search-wrap input::placeholder {
    color: #94a3b8;
    font-weight: 300;
}

.search-wrap button {
    border: none;
    background: linear-gradient(135deg, #4f6ef7, #7c5cfc);
    color: #fff;
    padding: 0 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 54px;
    letter-spacing: 0.3px;
}

.search-wrap button:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

.search-wrap button i {
    font-size: 0.95rem;
}

/* ===== 主内容 ===== */
.main-content {
    padding: 40px 0 48px;
}

/* 区域标题 */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #4f6ef7;
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
}

.section-title .badge-custom {
    font-size: 0.7rem;
    font-weight: 500;
    background: #eef2ff;
    color: #4f6ef7;
    padding: 2px 12px;
    border-radius: 30px;
    margin-left: 6px;
}

.section-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 36px 0 32px;
    opacity: 0.6;
}

/* ---- 最近链入 ---- */
.recent-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #334155;
    padding: 6px 14px 6px 10px;
    background: #f8fafc;
    border-radius: 30px;
    border: 1px solid #eef2f6;
    transition: background 0.2s, border-color 0.2s;
}

.recent-item:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.recent-item .favicon {
    width: 20px;
    height: 20px;
    background: #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 600;
    flex-shrink: 0;
}

.recent-item .link-text {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item .link-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: 4px;
}

/* ---- 导航分类 (全宽行布局) ---- */
.category-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-card {
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 20px 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.category-card .cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.category-card .cat-header .cat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.category-card .cat-header .cat-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #0f172a;
}

/* 查看更多链接 */
.category-card .cat-header .view-more {
    margin-left: auto;
    font-size: 0.8rem;
    color: #4f6ef7;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    cursor: pointer;
}

.category-card .cat-header .view-more:hover {
    color: #3b5bdb;
}

.category-card .cat-header .view-more i {
    font-size: 0.7rem;
}

/* 链接列表 */
.link-list {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.link-list .link-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s;
    font-size: 0.85rem;
    color: #334155;
    border: 1px solid #f1f5f9;
    justify-content: center;
    text-align: center;
}

.link-list .link-item:hover {
    background: #f8fafc;
    border-color: #d9e2fe;
}

.link-list .link-item i {
    font-size: 0.7rem;
    color: #94a3b8;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.link-list .link-item .link-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- 友情链接 ---- */
.friend-links-section {
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    padding: 28px 0 24px;
    margin-top: 16px;
}

.friend-links-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.friend-links-title i {
    font-size: 0.75rem;
}

.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.friend-links a {
    font-size: 0.78rem;
    color: #94a3b8;
    transition: color 0.2s;
    line-height: 1.8;
}

.friend-links a:hover {
    color: #4f6ef7;
}

/* ---- 站点推荐 ---- */
.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.recommend-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 16px 14px;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

.recommend-item:hover {
    background: #fafbff;
    transform: translateY(-2px);
    border-color: #d9e2fe;
}

.recommend-item .rec-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #4f6ef7;
    flex-shrink: 0;
}

.recommend-item .rec-info {
    flex: 1;
    min-width: 0;
}

.recommend-item .rec-info .rec-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
}

.recommend-item .rec-info .rec-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommend-item .rec-link {
    color: #94a3b8;
    font-size: 0.8rem;
    transition: color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.recommend-item:hover .rec-link {
    color: #4f6ef7;
    transform: translateX(2px);
}

/* ===== 分类详情页样式 ===== */
.cat-banner {
    padding: 32px 0 24px;
    border-bottom: 1px solid #eef2f6;
}

.cat-banner .row {
    align-items: center;
}

.cat-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cat-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.cat-banner-info h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.cat-banner-info .cat-count {
    font-size: 0.82rem;
    color: #94a3b8;
}

.cat-banner-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.cat-banner-back:hover {
    color: #4f6ef7;
}

/* Tab 栏 */
.cat-tabs-wrap {
    border-bottom: 1px solid #eef2f6;
    background: #fff;
    position: sticky;
    top: 60px;
    z-index: 99;
}

.cat-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}

.cat-tabs li {
    margin: 0;
}

.cat-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #94a3b8;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
    white-space: nowrap;
}

.cat-tabs button:hover {
    color: #4f6ef7;
}

.cat-tabs button.active {
    color: #4f6ef7;
    border-bottom-color: #4f6ef7;
}

.cat-tabs button i {
    font-size: 0.8rem;
}

.cat-section {
    padding: 24px 0 50px;
}

.cat-loading {
    display: none;
    text-align: center;
    padding: 60px 0;
    color: #94a3b8;
}

.cat-loading.show {
    display: block;
}

.cat-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    color: #4f6ef7;
}

.cat-loading p {
    margin-top: 12px;
    font-size: 0.88rem;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    transition: border-color 0.2s, background 0.15s;
}

.cat-item::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.9rem;
    color: #4f6ef7;
    margin-left: auto;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.cat-item:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.cat-item:hover {
    border-color: #dbe1ef;
    background: #fafbff;
    color: #1e293b;
}

.cat-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
    font-weight: 600;
}

.cat-item-name {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cat-empty {
    display: none;
    text-align: center;
    padding: 60px 0;
    color: #94a3b8;
}

.cat-empty.show {
    display: block;
}

.cat-empty i {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.load-more-wrap {
    text-align: center;
    margin-top: 28px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 36px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-load-more:hover {
    border-color: #4f6ef7;
    color: #4f6ef7;
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 工具箱页样式 ===== */
.tools-banner {
    padding: 50px 0 40px;
    text-align: center;
    background: linear-gradient(135deg, #f0f4ff 0%, #ecfdf5 100%);
    border-bottom: 1px solid #eef2f6;
}

.tools-banner h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.tools-banner h1 i {
    color: #10b981;
    margin-right: 10px;
}

.tools-banner p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
}

.tools-section {
    padding: 36px 0 50px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tool-card {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 20px 22px;
    text-decoration: none;
    color: #334155;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.tool-card:hover {
    border-color: #dbe1ef;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    color: #1e293b;
}

.tool-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.tool-icon.dev       { background: linear-gradient(135deg, #4f6ef7, #6366f1); }
.tool-icon.encode    { background: linear-gradient(135deg, #10b981, #14b8a6); }
.tool-icon.convert   { background: linear-gradient(135deg, #f59e0b, #f97316); }
.tool-icon.network   { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.tool-icon.text      { background: linear-gradient(135deg, #ec4899, #f472b6); }
.tool-icon.security  { background: linear-gradient(135deg, #ef4444, #f87171); }
.tool-icon.format    { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.tool-icon.other     { background: linear-gradient(135deg, #6b7280, #9ca3af); }

.tool-info {
    flex: 1;
    min-width: 0;
}

.tool-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
}

.tool-info p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0 0 10px;
}

.tool-tag {
    display: inline-block;
    font-size: 0.72rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.tool-card:hover .tool-tag {
    background: #eef2ff;
    color: #4f6ef7;
}

.tools-empty {
    text-align: center;
    padding: 60px 0;
    color: #94a3b8;
}

.tools-group-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef2f6;
}

.tools-group-title i {
    margin-right: 8px;
    color: #4f6ef7;
}

.tools-group-title:first-of-type {
    margin-top: 0;
}

/* ===== 申请收录页样式 ===== */
.apply-banner {
    padding: 50px 0 40px;
    text-align: center;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
    border-bottom: 1px solid #eef2f6;
}

.apply-banner h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.apply-banner h1 i {
    color: #4f6ef7;
    margin-right: 10px;
}

.apply-banner p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
}

.apply-section {
    padding: 40px 0 50px;
}

.apply-card {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 36px 40px;
}

.apply-card .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.apply-card .form-control {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.apply-card .form-control:focus {
    border-color: #4f6ef7;
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

.apply-card .form-control::placeholder {
    color: #cbd5e1;
}

.apply-card textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.captcha-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 40px;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #4f6ef7;
    font-family: 'Courier New', monospace;
    user-select: none;
    cursor: pointer;
    transition: transform 0.15s;
    flex-shrink: 0;
}

.captcha-code:hover {
    transform: rotate(5deg);
}

.captcha-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 4px;
}

.captcha-hint i {
    cursor: pointer;
    margin-right: 4px;
}

.btn-submit {
    background: linear-gradient(135deg, #4f6ef7, #7c5cfc);
    border: none;
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 110, 247, 0.3);
    color: #fff;
}

.btn-reset {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
    margin-left: 12px;
}

.btn-reset:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.rules-section {
    margin-top: 40px;
}

.rules-section h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.rules-section h5 i {
    color: #f59e0b;
    margin-right: 8px;
}

.rules-content {
    background: #fafbfc;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    padding: 24px 28px;
    font-size: 0.88rem;
    line-height: 1.9;
    color: #475569;
}

.rules-content p:last-child {
    margin-bottom: 0;
}

.form-msg {
    margin-top: 16px;
    font-size: 0.88rem;
}

/* ===== MD5工具页样式 ===== */
.tool-banner {
    padding: 44px 0 34px;
    text-align: center;
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border-bottom: 1px solid #eef2f6;
}

.tool-banner h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.tool-banner h1 i {
    color: #ef4444;
    margin-right: 8px;
}

.tool-banner p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

.tool-banner a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s;
}

.tool-banner a:hover { color: #4f6ef7; }

.tool-body {
    padding: 36px 0 50px;
}

.input-card,
.result-card {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 28px 30px;
}

.input-card label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.input-card textarea {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 140px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-card textarea:focus {
    border-color: #4f6ef7;
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

.input-card textarea::placeholder {
    color: #cbd5e1;
}

.btn-generate {
    background: linear-gradient(135deg, #ef4444, #f87171);
    border: none;
    border-radius: 8px;
    padding: 10px 36px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
    color: #fff;
}

.btn-generate:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn-clear {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.85rem;
    color: #64748b;
    background: #fff;
    transition: border-color 0.2s;
    margin-left: 10px;
}

.btn-clear:hover {
    border-color: #cbd5e1;
}

.result-card { margin-top: 24px; }

.result-card .result-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 18px;
}

.result-card .result-title i { color: #10b981; margin-right: 8px; }

.result-empty {
    text-align: center;
    padding: 30px 0;
    color: #cbd5e1;
}

.result-empty i { font-size: 2.5rem; margin-bottom: 10px; }

.result-item {
    margin-bottom: 16px;
}

.result-item:last-child { margin-bottom: 0; }

.result-item label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    display: block;
}

.result-value-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-value {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-family: 'Courier New', monospace;
    color: #0f172a;
    word-break: break-all;
    line-height: 1.5;
    user-select: all;
    min-height: 36px;
}

.btn-copy {
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.btn-copy:hover {
    border-color: #4f6ef7;
    color: #4f6ef7;
}

.btn-copy.copied {
    border-color: #10b981;
    color: #10b981;
}

.toast-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 9999;
}

.toast-msg.show { opacity: 1; }

.example-wrap {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-example {
    font-size: 0.78rem;
    color: #94a3b8;
    background: #f1f5f9;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-example:hover {
    background: #eef2ff;
    color: #4f6ef7;
}

/* ===== 页脚 ===== */
.footer {
    background: #ffffff;
    border-top: 1px solid #eef2f6;
    padding: 36px 0 28px;
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4f6ef7, #7c5cfc);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

.footer-site-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.footer-tagline {
    font-size: 0.8rem;
    color: #94a3b8;
}

.footer-middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.82rem;
    color: #94a3b8;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #4f6ef7;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: background 0.2s, color 0.2s;
    font-size: 0.85rem;
}

.footer-social a:hover {
    background: #4f6ef7;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 16px;
}

.footer-bottom p {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
    .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
    .banner {
        padding: 44px 0 36px;
    }
    .banner-title {
        font-size: 1.8rem;
    }
    .banner-sub {
        font-size: 0.95rem;
    }

    .search-wrap {
        max-width: 100%;
    }
    .search-wrap select {
        min-width: 80px;
        font-size: 0.8rem;
        padding: 0 10px 0 14px;
        height: 48px;
    }
    .search-wrap input {
        height: 48px;
        font-size: 0.9rem;
        padding: 0 14px;
    }
    .search-wrap button {
        height: 48px;
        padding: 0 18px;
        font-size: 0.9rem;
    }

    .category-grid {
        gap: 16px;
    }
    .link-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .recommend-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .cat-banner { padding: 24px 0 18px; }
}

@media (max-width: 600px) {
    .brand .site-name {
        font-size: 1.1rem;
    }
    .brand .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .navbar .navbar-brand.brand {
        font-size: 1.1rem;
    }

    .banner-title {
        font-size: 1.5rem;
    }
    .banner-sub {
        font-size: 0.9rem;
    }

    .search-wrap {
        flex-wrap: wrap;
        border-radius: 16px;
        background: #fff;
    }
    .search-wrap select {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        border-radius: 16px 16px 0 0;
        height: 44px;
        background: #f8fafc;
    }
    .search-wrap input {
        height: 44px;
        width: 100%;
        padding: 0 16px;
        border-radius: 0;
    }
    .search-wrap button {
        height: 44px;
        width: 100%;
        border-radius: 0 0 16px 16px;
        justify-content: center;
        padding: 0;
    }

    .link-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .recommend-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .recent-grid {
        padding: 16px;
        gap: 8px;
    }
    .recent-item {
        font-size: 0.8rem;
        padding: 4px 12px 4px 8px;
    }

    .footer-social {
        justify-content: center;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-banner-info h1 { font-size: 1.2rem; }
    .cat-tabs button { padding: 10px 14px; font-size: 0.82rem; }

    .tools-grid { grid-template-columns: 1fr; }
    .tools-banner { padding: 36px 0 28px; }
    .tools-banner h1 { font-size: 1.4rem; }
    .tool-card { padding: 16px 18px; }

    .apply-card {
        padding: 24px 20px;
    }
    .apply-banner {
        padding: 36px 0 28px;
    }
    .apply-banner h1 {
        font-size: 1.4rem;
    }
    .btn-submit,
    .btn-reset {
        width: 100%;
        margin-left: 0;
    }
    .btn-reset {
        margin-top: 8px;
    }

    .input-card, .result-card { padding: 20px 18px; }
    .tool-banner h1 { font-size: 1.3rem; }
    .btn-generate { width: 100%; }
    .btn-clear { width: 100%; margin-left: 0; margin-top: 8px; }
}

@media (max-width: 420px) {
    .link-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .recommend-grid {
        grid-template-columns: 1fr;
    }
    .cat-grid { grid-template-columns: 1fr; }
}
