/* ==========================================================================
   Page main & sections（.app 见 common.css；侧栏/顶栏/页脚见对应组件样式）
   ========================================================================== */

.page-main {
    align-self: stretch;
    padding: 30px 40px 32px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 48px;
    display: flex;
}

.content-section {
    align-self: stretch;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 32px;
    display: flex;
}

.content-section--lg-gap {
    gap: 48px;
}

.section-header {
    align-self: stretch;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    display: inline-flex;
}

.section-header--split {
    justify-content: space-between;
    align-items: flex-end;
}

.section-header__inner {
    flex: 1 1 0;
    min-width: 0;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    display: flex;
}

.section-header__inner.sidebar-nav__link-content {
    gap: 12px;
}

.section-header__accent {
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #8a6bff 0%, #26d7e6 100%);
    border-radius: 999px;
    flex-shrink: 0;
}

.section-header__title {
    color: #eef0f8;
    font-size: 20px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.section-header__desc {
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.3;
}

.section-header__more {
    flex-shrink: 0;
    color: #a7acc2;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.section-header__more:hover {
    color: #26d7e6;
}

.text-muted {
    color: #a7acc2;
}

/* ==========================================================================
   Article cards (base — variant gradients & carousel layout in carousel.css)
   ========================================================================== */

.article-card {
    position: relative;
    height: 230px;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
}

.article-card--violet {
    background: radial-gradient(96.88% 96.88% at 96.88% 10%, #6E4BFF 0%, #3A1F9E 55%, #140A3A 100%);
    border: 1px solid #5641A8;
    overflow: hidden;
}
.article-card--violet .article-card__body {
    background: rgb(19 6 59 / 0.4);
}

.article-card--cyan {
    background: radial-gradient(96.29% 96.29% at 96.29% 13.48%, #0E6E6E 0%, #0A3D52 55%, #06141F 100%);
    border: 1px solid #0B7070;
    overflow: hidden;
}
.article-card--cyan .article-card__body {
    background: rgb(19 6 59 / 0.4);
}

.article-card--pink {
    background: radial-gradient(82.13% 103.98% at 79.7% 23.04%, #FF5BA0 0%, #A6308E 55%, #3A123F 100%);
    border: 1px solid #892C65;
    overflow: hidden;
}
.article-card--pink .article-card__body {
    background: rgb(19 6 59 / 0.4);
}

.article-card__body {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 28px 24px 24px 28px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    display: inline-flex;
}

.article-card__body--center {
    justify-content: center;
}

.article-card__shell {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.article-card__title {
    align-self: stretch;
    color: #eef0f8;
    font-size: 18px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 314px;
}

.article-card__title--md {
    font-size: 16px;
}

.article-card__desc {
    align-self: stretch;
    color: #a7acc2;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 314px;
}

.article-card__more {
    color: #fff;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 500;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.article-card__more:hover {
    opacity: 0.85;
}

.article-card__img {
    position: absolute;
    top: 50%;
    right: 0;
    width: 273px;
    height: 230px;
    object-fit: cover;
    pointer-events: none;
    z-index: 1;
    transform: translateY(-50%);
    mask-image: linear-gradient(to right, transparent, #000);
    mask-size: 100% 100%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000);
    -webkit-mask-size: 100% 100%;
}

.article-card--violet::after,
.article-card--cyan::after,
.article-card--pink::after {
    /*content: "";*/
    /*position: absolute;*/
    /*inset: 0;*/
    /*background: radial-gradient(ellipse 80% 60% at 85% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 55%);*/
    /*pointer-events: none;*/
    /*z-index: 0;*/
}

/* ==========================================================================
   Carousel dots
   ========================================================================== */

.carousel-dots {
    margin-top: 4px;
}

.carousel-dots__item,
.carousel-dots__item--active {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dots__item--active {
    width: 24px;
    background: linear-gradient(90deg, #8a6bff 0%, #26d7e6 100%);
}

.carousel-dots__item:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* ==========================================================================
   Featured block & compact tool cards
   ========================================================================== */

.featured-block {
    align-self: stretch;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    display: flex;
}

.featured-block__row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: linear-gradient(90deg, #1B183B 0%, #122235 100%);
    border: 1px solid #8A6BFF4D;
    border-radius: 18px;
    width: 100%;
}

.featured-card {
    min-width: 0;
    width: calc(50% - 8px);
    min-height: 280px;
    padding: 22px 24px 24px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(138, 107, 255, 0.12) 0%, rgba(18, 21, 31, 0.95) 38%, #12151f 100%);
    border: 1px solid rgba(138, 107, 255, 0.22);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), 0 0 32px rgba(138, 107, 255, 0.15);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 16px;
    display: inline-flex;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.featured-card:hover {
    border-color: rgba(138, 107, 255, 0.38);
}

.featured-card__top {
    align-self: stretch;
    justify-content: flex-start;
    align-items: flex-start;
    display: inline-flex;
}

.featured-card__badge {
    width: 100px;
    height: 33px;
    background: linear-gradient(90deg, rgba(138, 107, 255, 0.160784) 0%, rgba(216, 52, 78, 0.2) 100%);
    border-radius: 999px;
    border: 1px solid #D8344E66;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.featured-card__badge-icon {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.featured-card__badge-text {
    color: #D8344E;
    font-size: 12px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1;
}

.featured-card__main {
    align-self: stretch;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    display: flex;
}

.featured-card__info {
    align-self: stretch;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 14px;
    display: flex;
}

.featured-card__header {
    align-self: stretch;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    display: inline-flex;
}

.featured-card__title {
    color: #eef0f8;
    font-size: 22px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.featured-card__desc {
    align-self: stretch;
    color: #a7acc2;
    font-size: 14px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.65;
}

.featured-side {
    width: calc(50% - 8px);
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-content: start;
    overflow: visible;
}

.tool-card-compact {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 132px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, #12151f 55%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    display: inline-flex;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tool-card-compact:hover {
    z-index: 5;
    background: #161a27;
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.tool-card-compact__head,
.tool-card-compact__row {
    align-self: stretch;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    display: inline-flex;
}

.tool-card-compact__desc {
    align-self: stretch;
    color: #a7acc2;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-compact__tooltip,
.tool-card__tooltip {
    --tooltip-gap: 7px;
    --tooltip-arrow-size: 6px;
    position: absolute;
    left: 50%;
    top: calc(100% + var(--tooltip-gap) + var(--tooltip-arrow-size));
    z-index: 10;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: max-content;
    max-width: min(280px, calc(100vw - 48px));
    padding: 10px 12px;
    border-radius: 12px;
    background: #222638;
    color: #fff;
    font-size: 14px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.tool-card-compact__tooltip::before,
.tool-card__tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: var(--tooltip-arrow-size) solid transparent;
    border-bottom-color: #222638;
}

@media (hover: hover) and (pointer: fine) {
    .tool-card-compact:hover .tool-card-compact__tooltip,
    .tool-card:hover .tool-card__tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================================================
   Hot tools, banners, tool grid & cards
   ========================================================================== */

.hot-tools {
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    overflow: visible;
}

.banner-img {
    width: 200px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 14.29px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    display: block;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.banner-img:hover {
    border-color: rgba(138, 107, 255, 0.5);
    transform: translateY(-2px);
}

.tool-card {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 115px;
    max-height: 115px;
    min-height: 0;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.035) 0%, #12151f 50%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    display: flex;
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tool-card:hover {
    z-index: 5;
    overflow: visible;
    background: #161a27;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.tool-card__head,
.tool-card-compact__row {
    align-self: stretch;
    min-width: 0;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    display: inline-flex;
}

.tool-card__name {
    flex: 1 1 0;
    min-width: 0;
    color: #eef0f8;
    font-size: 16px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-card__desc {
    align-self: stretch;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    color: #a7acc2;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-main--index .tool-card__desc {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}

.tool-name {
    color: #eef0f8;
    font-size: 22px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

/* ==========================================================================
   Tool icon variants
   ========================================================================== */

.tool-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    display: flex;
    font-size: 16px;
    font-weight: 600;
    color: #eef0f8;
    border: 1px solid rgba(255, 255, 255, 0.12);}

.tool-icon--lg {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 20px;
}

.tool-icon--blue {
    background: linear-gradient(135deg, #3b5bdb 0%, #228be6 100%);
    box-shadow: 0 4px 16px rgba(34, 139, 230, 0.25);
}

.tool-icon--green {
    background: linear-gradient(135deg, #2f9e44 0%, #37b24d 100%);
    box-shadow: 0 4px 16px rgba(55, 178, 77, 0.22);
}

.tool-icon--purple {
    background: linear-gradient(135deg, #7950f2 0%, #8a6bff 100%);
    box-shadow: 0 4px 16px rgba(138, 107, 255, 0.28);
}

.tool-icon--cyan {
    background: linear-gradient(135deg, #1098ad 0%, #26d7e6 100%);
    box-shadow: 0 4px 16px rgba(38, 215, 230, 0.22);
}

.tool-icon--orange {
    background: linear-gradient(135deg, #e8590c 0%, #ff922b 100%);
    box-shadow: 0 4px 16px rgba(255, 146, 43, 0.25);
}

.tool-icon--gray {
    background: linear-gradient(135deg, #495057 0%, #868e96 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tool-icon--red {
    background: linear-gradient(135deg, #c92a2a 0%, #f03e3e 100%);
    box-shadow: 0 4px 16px rgba(240, 62, 62, 0.22);
}

.tool-icon--pink {
    background: linear-gradient(135deg, #c2255c 0%, #e64980 100%);
    box-shadow: 0 4px 16px rgba(230, 73, 128, 0.25);
}

/* ==========================================================================
   Filter tags
   ========================================================================== */

.filter-nav {
    align-self: stretch;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.filter-tag:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
}

.filter-tag--active {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);}

.filter-tag__text {
    color: #a7acc2;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.filter-tag:hover .filter-tag__text {
    color: #eef0f8;
}

.filter-tag__text--active,
.filter-tag--active .filter-tag__text {
    color: #eef0f8;
    font-weight: 600;
}

/* ==========================================================================
   Nested section-header inside cards (reset block layout)
   ========================================================================== */

.tool-card .section-header,
.tool-card-compact .section-header {
    align-self: stretch;
    gap: 0;
    display: flex;
}

.tool-card .section-header--split,
.tool-card-compact .section-header--split {
    justify-content: flex-start;
    align-items: center;
}

/* ==========================================================================
   Main content — Responsive
   ========================================================================== */

/* Desktop wide (max-width: 1600px) */

@media (max-width: 1600px) {
    .tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Desktop narrow (max-width: 1400px) */

@media (max-width: 1400px) {
    .page-main {
        padding: 28px 32px 32px;
        gap: 40px;
    }

    .featured-block__row {
        flex-direction: column;
    }

    .featured-card {
        flex: none;
        width: 100%;
    }

    .featured-side {
        width: 100%;
    }

}

/* Desktop compact (max-width: 1200px) */

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

    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* Tablet (min-width: 768px and max-width: 1024px) */

@media (min-width: 768px) and (max-width: 1024px) {
    .app {
        flex-direction: column;
    }

    .page-main {
        padding: 24px 20px 28px;
        gap: 36px;
    }

    .content-section {
        gap: 24px;
    }

    .content-section--lg-gap {
        gap: 36px;
    }

    .section-header--split {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px 16px;
    }

}

/* Mobile (max-width: 767px) 见 mobile.css、*.mobile.css */

/* ==========================================================================
   Accessibility — prefers-reduced-motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .tool-card,
    .tool-card-compact,
    .featured-card,
    .banner-img,
    .contact__icon,
    .carousel-dots__item,
    .carousel-dots__item--active {
        transition: none;
    }

    .tool-card:hover,
    .tool-card-compact:hover,
    .banner-img:hover,
    .contact__icon:hover {
        transform: none;
    }
}
