/* =========================
   全局基础
========================= */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #1f2937;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(102,126,234,0.28), transparent 22%),
        radial-gradient(circle at 90% 12%, rgba(124,92,255,0.24), transparent 20%),
        radial-gradient(circle at 50% 90%, rgba(99,102,241,0.10), transparent 26%),
        linear-gradient(180deg, #eef2ff 0%, #f7f9ff 16%, #ffffff 50%, #f6f7fb 100%);
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    left: -160px;
    top: 80px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102,126,234,0.22), transparent 72%);
    filter: blur(16px);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    right: -180px;
    top: 180px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,92,255,0.18), transparent 72%);
    filter: blur(16px);
    pointer-events: none;
    z-index: 0;
}

a {
    text-decoration: none;
}

/* =========================
   层级
========================= */
.navbar,
.page-wrap,
.ad-wrap,
.tools-section,
.group-section,
.notice,
.footer,
.chat-shell,
.tool-shell {
    position: relative;
    z-index: 1;
}

/* =========================
   顶部导航（PC正常）
========================= */
.navbar {
    width: 100%;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(238,242,247,0.85);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(15,23,42,0.04);
}

.nav-inner {
    width: 100%;
    max-width: 1180px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #111827;
    flex-shrink: 0;
    min-width: 0;
}

.brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea, #7c5cff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(102,126,234,0.26);
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.brand-name {
    font-size: 20px;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.nav-link {
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(226,232,240,0.9);
    transition: all .2s ease;
    box-shadow: 0 8px 18px rgba(15,23,42,0.03);
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(102,126,234,0.10);
    color: #4f46e5;
    border-color: rgba(199,216,255,0.9);
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea, #7c5cff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(102,126,234,0.22);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5ce7, #5a67d8);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(102,126,234,0.16);
    transition: all .2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(102,126,234,0.24);
}

/* =========================
   页面主区域 / Hero
========================= */
.page-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px 12px;
}

.hero {
    text-align: center;
    margin: 10px 0 30px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(199,216,255,0.75);
    box-shadow: 0 10px 22px rgba(79,70,229,0.08);
    color: #6d5ce7;
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero h1 {
    margin: 0 0 14px;
    font-size: 54px;
    font-weight: 900;
    color: #111827;
    letter-spacing: -2px;
    line-height: 1.08;
}

.hero p {
    margin: 0 auto;
    color: #64748b;
    font-size: 18px;
    line-height: 1.85;
    max-width: 900px;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(199,216,255,0.75);
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(79,70,229,0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-feature .icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eef2ff;
    color: #6d5ce7;
    font-size: 14px;
}

/* =========================
   通用卡片
========================= */
.card,
.tool-card,
.chat-card,
.info-card,
.notice-inner,
.empty-box {
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(226,232,240,0.92);
    border-radius: 30px;
    box-shadow: 0 22px 55px rgba(15,23,42,0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card {
    overflow: hidden;
}

.card-head {
    padding: 22px 24px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, rgba(102,126,234,0.05), rgba(255,255,255,0));
}

.card-title {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
}

.card-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.8;
}

.card-body {
    padding: 24px;
}

/* =========================
   工具卡片
========================= */
.tools-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 74px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 14px;
}

.tool-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    min-height: 290px;
    transition: all .22s ease;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 75px rgba(15,23,42,0.12);
}

.tool-card::after {
    content: "";
    position: absolute;
    right: -58px;
    top: -58px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(102,126,234,0.10);
}

.tool-card::before {
    content: "";
    position: absolute;
    right: 18px;
    top: 18px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, rgba(99,102,241,0.03) 70%, transparent 100%);
    pointer-events: none;
}

.tool-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.tool-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea, #7c5cff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 14px 30px rgba(102,126,234,0.24);
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.tool-title {
    font-size: 28px;
    font-weight: 900;
    color: #111827;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.tool-desc {
    font-size: 15px;
    color: #667085;
    line-height: 1.85;
    margin-bottom: 24px;
    flex: 1 1 auto;
    position: relative;
    z-index: 1;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d5ce7, #5a67d8);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    transition: all .2s ease;
    text-decoration: none;
    width: fit-content;
    z-index: 1;
    position: relative;
    box-shadow: 0 10px 22px rgba(102,126,234,0.16);
}

.tool-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(102,126,234,0.24);
}

.tool-btn.disabled {
    background: #cbd5e1;
    color: #475569;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

/* =========================
   广告框
========================= */
.ad-wrap {
    max-width: 1180px;
    margin: 26px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.ad-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 6px;
    font-size: 13px;
    font-weight: 800;
    color: #6d5ce7;
    background: rgba(255,255,255,0.8);
    padding: 5px 10px;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(79,70,229,0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ad-box {
    width: 100%;
    min-height: 150px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
    border: 1px solid #cfd8ff;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(79,70,229,0.10);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.ad-box::before {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(102,126,234,0.10);
    pointer-events: none;
}

.ad-inner {
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-size: 15px;
    line-height: 1.8;
}

.ad-inner ins,
.ad-inner iframe,
.ad-inner > div {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

/* =========================
   提示 / 空状态 / 页脚
========================= */
.tip {
    background: #eef6ff;
    border: 1px solid #cfe3ff;
    color: #1d4ed8;
    border-radius: 18px;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.notice {
    max-width: 1180px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.notice-inner {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 18px;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.8;
    box-shadow: 0 10px 28px rgba(15,23,42,0.04);
}

.empty-box {
    padding: 28px;
    text-align: center;
    color: #64748b;
    box-shadow: 0 18px 40px rgba(15,23,42,0.06);
}

.footer {
    text-align: center;
    color: #8a94a6;
    font-size: 14px;
    padding: 28px 20px 40px;
}

/* =========================
   表单 / 输入 / 结果框
========================= */
input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    box-sizing: border-box;
    outline: none;
    background: #fafafa;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
    background: #fff;
}

.result-box {
    margin-top: 18px;
    padding: 14px;
    border-radius: 18px;
    background: #f8faff;
    border: 1px solid #dbe3ff;
    color: #1f2937;
    line-height: 1.85;
    white-space: pre-wrap;
    min-height: 120px;
}

textarea {
    width: 100%;
    min-height: 260px;
    padding: 14px;
    font-size: 14px;
    border-radius: 16px;
    border: 1px solid #d1d5db;
    resize: vertical;
    box-sizing: border-box;
    font-family: "Courier New", monospace;
    margin-top: 18px;
    white-space: pre-wrap;
    line-height: 1.8;
    background: #fcfcfd;
}

/* =========================
   按钮
========================= */
button,
.tool-btn,
.download-btn,
.nav-cta,
.action-btn {
    transition: all .2s ease;
}

button,
.tool-btn,
.nav-cta,
.download-btn {
    border: none;
    outline: none;
}

button {
    background: linear-gradient(135deg, #6d5ce7, #5a67d8);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(102,126,234,0.16);
}

button:hover:not(:disabled),
.tool-btn:hover,
.nav-cta:hover,
.download-btn:hover {
    transform: translateY(-1px);
}

.download-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 10px 22px rgba(16,185,129,0.14);
}

/* =========================
   移动端：手机可滑动导航
========================= */
@media (max-width: 860px) {
    .navbar {
        min-height: auto;
        padding: 12px 16px;
    }

    .nav-inner {
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
    }

    .brand {
        width: 100%;
    }

    .brand-sub {
        display: none;
    }

    .nav-links {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        gap: 8px;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        flex: 0 0 auto;
        font-size: 13px;
        padding: 9px 12px;
    }

    .nav-cta {
        display: none;
    }

    .page-wrap {
        padding-top: 24px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-features {
        gap: 12px;
    }

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

@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 42px;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-features {
        gap: 12px;
    }

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

    .tool-title {
        font-size: 24px;
    }
}
/* ===== final mobile header fix ===== */
@media (max-width: 860px) {
    .navbar {
        min-height: 72px !important;
        padding: 10px 12px !important;
    }

    .nav-inner {
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .brand {
        width: auto !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
    }

    .brand-icon {
        width: 40px !important;
        height: 40px !important;
        border-radius: 14px !important;
        font-size: 16px !important;
    }

    .brand-name {
        font-size: 17px !important;
    }

    .brand-sub {
        display: none !important;
    }

    .mobile-nav {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        min-width: 0 !important;
    }

    .mobile-nav::-webkit-scrollbar {
        display: none !important;
    }

    .mobile-nav .nav-link {
        flex: 0 0 auto !important;
        font-size: 12px !important;
        padding: 8px 11px !important;
        border-radius: 999px !important;
        margin: 0 !important;
    }

    .nav-cta {
        display: none !important;
    }
}
