@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Cormorant+Garamond:wght@500;600;700&display=swap");

:root {
    --td-bg: #ffffff;
    --td-ink: #111111;
    --td-ink-soft: #555555;
    --td-line: #111111;
    --td-line-soft: #d6d6d6;
    --td-accent: #e7247a;
    --td-card-gap: 16px;
    --td-card-height: 220px;
    --td-cover-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    background: var(--td-bg);
    color: var(--td-ink);
    font-family: "Manrope", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    line-height: 1.45;
}

body {
    padding: 20px;
}

.page {
    width: min(1360px, 100%);
    margin: 0 auto;
}

.hero {
    padding: 20px 0 24px;
    border-top: 2px solid var(--td-line);
    border-bottom: 1px solid var(--td-line-soft);
    margin-bottom: 22px;
}

.hero-kicker {
    margin-bottom: 8px;
    color: var(--td-ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero-title {
    margin-bottom: 10px;
    color: var(--td-ink);
    font-family: "Cormorant Garamond", "STSong", "SimSun", serif;
    font-size: 52px;
    line-height: 1.02;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.hero-desc {
    max-width: 900px;
    color: var(--td-ink-soft);
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tool-section {
    margin-bottom: 26px;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title {
    color: var(--td-ink);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}

.section-rule {
    height: 1px;
    flex: 1;
    background: var(--td-line-soft);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--td-card-gap);
}

.tool-card {
    display: flex;
    height: var(--td-card-height);
    border: 1px solid var(--td-line);
    background: #ffffff;
    color: inherit;
    cursor: pointer;
    transition: transform 0.22s ease, background-color 0.22s ease, color 0.22s ease;
    outline: none;
    overflow: hidden;
}

.tool-card:hover,
.tool-card:focus-visible {
    background: #121212;
    color: #ffffff;
    transform: translateY(-1px);
}

.cover-wrap {
    width: var(--td-cover-width);
    min-width: var(--td-cover-width);
    max-width: var(--td-cover-width);
    flex: 0 0 var(--td-cover-width);
    border-right: 1px solid var(--td-line);
    background: #f7f7f7;
    position: relative;
    overflow: hidden;
}

.cover {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cover-placeholder {
    display: flex;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: repeating-linear-gradient(-45deg, #f6f6f6 0, #f6f6f6 10px, #ececec 10px, #ececec 20px);
    color: #6b6b6b;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cover-auto {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    gap: 6px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 55%, #e2e8f0 100%);
    padding: 16px;
    overflow: hidden;
}

.cover-auto-loading {
    color: #64748b;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.cover-auto-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--td-accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    font-family: "Manrope", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    flex-shrink: 0;
}

.cover-auto-name {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cover-auto-url {
    color: #64748b;
    font-size: 12px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-card:hover .cover-auto {
    background: linear-gradient(135deg, #1b1b1b 0%, #252525 55%, #1a1a2e 100%);
}

.tool-card:hover .cover-auto-name {
    color: #ffffff;
}

.tool-card:hover .cover-auto-url {
    color: #94a3b8;
}

.tool-card:hover .cover-auto-icon {
    background: #ffffff;
    color: #121212;
}

.tool-card:hover .cover-placeholder,
.tool-card:focus-visible .cover-placeholder {
    background: repeating-linear-gradient(-45deg, #1b1b1b 0, #1b1b1b 10px, #252525 10px, #252525 20px);
    color: #a6a6a6;
}

.tool-main {
    flex: 1;
    min-width: 0;
    width: 0;
    padding: 14px 16px 14px 18px;
    display: flex;
    flex-direction: column;
}

.tool-topline {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tool-category {
    display: inline-flex;
    align-items: center;
    height: 26px;
    max-width: 100%;
    border: 1px solid var(--td-line);
    padding: 0 10px;
    background: #ffffff;
    color: var(--td-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card:hover .tool-category,
.tool-card:focus-visible .tool-category {
    border-color: #ffffff;
    background: transparent;
    color: #ffffff;
}

.tool-title {
    margin-bottom: 12px;
    color: inherit;
    font-family: "Cormorant Garamond", "STSong", "SimSun", serif;
    font-size: 36px;
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 80px;
}

.tool-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.tool-action {
    min-height: 44px;
    min-width: 116px;
    border: 1px solid #121212;
    padding: 0 16px;
    background: #121212;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.tool-action:hover {
    background: #ffffff;
    color: #121212;
}

.tool-card:hover .tool-action,
.tool-card:focus-visible .tool-action {
    border-color: #ffffff;
    background: #ffffff;
    color: #121212;
}

.tool-card:hover .tool-action:hover,
.tool-card:focus-visible .tool-action:hover {
    background: #121212;
    color: #ffffff;
}

.empty-state {
    border: 1px dashed var(--td-line-soft);
    background: #ffffff;
    padding: 22px;
    text-align: center;
    color: var(--td-ink-soft);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 1200px) {
    .hero-title {
        font-size: 46px;
    }

    .tool-title {
        font-size: 32px;
        min-height: 72px;
    }
}

@media (max-width: 1024px) {
    :root {
        --td-card-height: 198px;
        --td-cover-width: 226px;
    }

    body {
        padding: 16px;
    }

    .hero {
        padding-top: 16px;
        padding-bottom: 20px;
    }

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

    .tool-grid {
        gap: 12px;
    }

    .tool-title {
        font-size: 30px;
        min-height: 66px;
    }
}

@media (max-width: 768px) {
    :root {
        --td-card-height: 170px;
        --td-cover-width: 132px;
    }

    body {
        padding: 12px;
    }

    .hero {
        margin-bottom: 16px;
    }

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

    .hero-desc {
        font-size: 12px;
    }

    .section-title {
        font-size: 14px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tool-main {
        padding: 12px;
    }

    .tool-category {
        height: 24px;
        font-size: 10px;
        padding: 0 8px;
    }

    .tool-title {
        font-size: 24px;
        min-height: 56px;
        margin-bottom: 8px;
    }

    .tool-action {
        min-width: 96px;
        padding: 0 12px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .tool-card,
    .tool-action {
        transition: none;
    }
}