* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #172033;
    background: #f8fafc;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.brand strong {
    display: block;
    font-size: 20px;
}

.brand small {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
}

.main-nav a {
    color: #334155;
}

.main-nav a:hover {
    color: #2563eb;
}

.hero {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 30%), radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.16), transparent 30%), #ffffff;
    padding: 90px 0;
}

.hero-content {
    text-align: center;
    max-width: 850px;
}

.badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    margin: 22px 0 16px;
    color: #0f172a;
}

.hero p {
    font-size: 19px;
    color: #475569;
    max-width: 720px;
    margin: 0 auto 30px;
}

.search-box {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    padding: 10px;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 16px;
    font-size: 16px;
}

.search-box button {
    border: 0;
    border-radius: 14px;
    padding: 0 26px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.section {
    padding: 70px 0;
}

.section-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 36px;
}

.section-heading h2 {
    font-size: 34px;
    margin: 0 0 10px;
    color: #0f172a;
}

.section-heading p {
    color: #64748b;
    margin: 0;
}

.category-grid,
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.category-card,
.tool-card,
.content-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.category-card h3,
.tool-card h3 {
    margin-top: 0;
    color: #0f172a;
}

.category-card p,
.tool-card p {
    color: #64748b;
}

.tool-card a {
    display: inline-block;
    margin-top: 10px;
    color: #2563eb;
    font-weight: 800;
}

.page-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 55px 0;
}

.page-header h1 {
    font-size: 42px;
    margin: 0 0 10px;
}

.page-header p {
    margin: 0;
    color: #64748b;
    font-size: 18px;
}

.content-box {
    max-width: 900px;
}

.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding-top: 55px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 35px;
}

.site-footer h3,
.site-footer h4 {
    color: #ffffff;
    margin-top: 0;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 35px;
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

@media (max-width: 800px) {
    .nav-wrap {
        flex-direction: column;
        padding: 16px 0;
        gap: 14px;
    }
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .search-box {
        flex-direction: column;
    }
    .search-box button {
        padding: 15px;
    }
    .category-grid,
    .tool-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.mt-20 {
    margin-top: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.tool-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.tool-main {
    display: grid;
    gap: 24px;
}

.tool-sidebar {
    position: sticky;
    top: 95px;
}

.tool-ui-box {
    border: 2px solid #dbeafe;
}

.demo-tool-box {
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
    border-radius: 16px;
    padding: 24px;
    margin-top: 16px;
}

.example-box {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    margin-top: 20px;
}

.example-box pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 14px;
    overflow-x: auto;
}

.faq-item {
    border-top: 1px solid #e5e7eb;
    padding-top: 18px;
    margin-top: 18px;
}

.related-tool-link {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #2563eb;
    font-weight: 700;
}

.tool-card small {
    display: inline-block;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
}

@media (max-width: 900px) {
    .tool-page-grid {
        grid-template-columns: 1fr;
    }
    .tool-sidebar {
        position: static;
    }
}

.breadcrumb {
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #2563eb;
    font-weight: 700;
}

.tool-ui-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.tool-ui-header h2 {
    margin: 0 0 6px;
}

.tool-ui-header p {
    margin: 0;
    color: #64748b;
}

.privacy-badge {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
}

.word-counter-box {
    display: grid;
    gap: 12px;
}

.tool-label {
    font-weight: 800;
    color: #0f172a;
}

.tool-textarea {
    width: 100%;
    min-height: 260px;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    padding: 18px;
    font-size: 16px;
    line-height: 1.7;
    color: #0f172a;
    background: #ffffff;
    resize: vertical;
    outline: none;
}

.tool-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tool-btn {
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
}

.tool-btn.primary {
    background: #2563eb;
    color: #ffffff;
}

.tool-btn.secondary {
    background: #e0f2fe;
    color: #0369a1;
}

.tool-btn.danger {
    background: #fee2e2;
    color: #991b1b;
}

.tool-btn:hover {
    opacity: 0.92;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 24px;
}

.stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    text-align: center;
}

.stat-card span {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
}

.stat-card p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.keyword-box {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
}

.keyword-box h3 {
    margin-top: 0;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 13px;
}

.muted-text {
    color: #64748b;
    margin: 0;
}

@media (max-width: 900px) {
    .tool-ui-header {
        flex-direction: column;
    }
    .privacy-badge {
        white-space: normal;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .tool-actions {
        flex-direction: column;
    }
    .tool-btn {
        width: 100%;
    }
}