.ws-directory,
.ws-tool {
    max-width: 1120px;
    margin: 0 auto;
    padding: 30px 20px;
}

.ws-directory h1,
.ws-tool h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    margin: 0 0 18px;
    letter-spacing: -0.04em;
}

.ws-description,
.ws-directory > p,
.ws-tool-header > p {
    font-size: 20px;
    line-height: 1.6;
    color: #374151;
    max-width: 760px;
}

.ws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 36px;
}

.ws-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 32px;
    margin: 28px 0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.ws-card h2 {
    font-size: 34px;
    margin: 0 0 20px;
    letter-spacing: -0.03em;
}

.ws-card h3 {
    font-size: 24px;
    margin-top: 24px;
}

.ws-card h4 {
    font-size: 18px;
    margin-top: 24px;
}

.ws-category,
.ws-badge {
    display: inline-flex;
    align-items: center;
    background: #eef2ff;
    color: #3730a3;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-tool-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 14px;
}

.ws-tool-input,
.ws-search,
.ws-tool-form input {
    flex: 1;
    min-width: 260px;
    padding: 15px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 17px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-tool-input:focus,
.ws-search:focus,
.ws-tool-form input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.ws-tool-form button,
.ws-result-actions button,
.ws-example,
.ws-card a {
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff !important;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
}

.ws-tool-form button:hover,
.ws-result-actions button:hover,
.ws-example:hover,
.ws-card a:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.ws-examples {
    margin: 16px 0 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #475569;
}

.ws-example {
    padding: 8px 12px;
    font-size: 14px;
    background: #f1f5f9;
    color: #0f172a !important;
    border: 1px solid #e2e8f0;
}

.ws-example:hover {
    background: #e0f2fe;
    color: #075985 !important;
}

#ws-result {
    margin-top: 26px;
}

.ws-loading,
.ws-success,
.ws-error {
    border-radius: 16px;
    padding: 24px;
    margin: 22px 0;
}

.ws-loading {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-weight: 700;
}

.ws-success {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.ws-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-weight: 700;
}

.ws-analyzer {
    border-left: 6px solid #22c55e;
}

.ws-score-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    color: #334155;
    font-weight: 700;
}

.ws-score-label {
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 14px;
}

.ws-score strong {
    display: block;
    font-size: 42px;
    margin: 8px 0 12px;
    letter-spacing: -0.04em;
}

.ws-score-bar {
    height: 14px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 10px 0 20px;
}

.ws-score-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #22c55e;
}

.ws-score-yellow .ws-score-bar span {
    background: #f59e0b;
}

.ws-score-red .ws-score-bar span {
    background: #ef4444;
}

.ws-score-yellow strong {
    color: #92400e;
}

.ws-score-red strong {
    color: #991b1b;
}

.ws-score-green strong {
    color: #166534;
}

.ws-summary {
    font-size: 18px;
    margin: 20px 0;
}

.ws-warning-panel,
.ws-recommendation-panel {
    margin-top: 24px;
}

.ws-note {
    padding: 14px 16px;
    border-radius: 14px;
    margin: 10px 0;
    font-size: 16px;
}

.ws-note-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ws-note-strength {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.ws-note-tip {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.ws-result-box {
    border-left: 6px solid #2563eb;
}

.ws-kv {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.ws-kv span {
    color: #64748b;
}

.ws-kv strong {
    color: #0f172a;
    text-align: right;
}

.ws-status-open {
    display: inline-flex;
    align-items: center;
    background: #dcfce7;
    color: #166534;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}

.ws-status-closed {
    display: inline-flex;
    align-items: center;
    background: #fee2e2;
    color: #991b1b;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}

.ws-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ws-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.ws-result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 14px;
}

.ws-result-table th,
.ws-result-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.ws-result-table th {
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-result-table tr:hover td {
    background: #f9fafb;
}

.ws-success pre {
    background: #0f172a;
    color: #d1fae5;
    padding: 18px;
    border-radius: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.6;
}

.ws-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.ws-related-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ws-related-grid {
    display: grid;
    gap: 12px;
}

.ws-related-item {
    display: flex !important;
    justify-content: space-between;
    width: 100%;
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #e5e7eb;
    padding: 16px 18px !important;
}

.ws-related-item:hover {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.ws-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 28px 0;
}

.ws-stats div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 24px;
    min-width: 160px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.ws-stats strong {
    display: block;
    font-size: 32px;
    color: #111827;
}

.ws-search {
    width: 100%;
    margin: 10px 0 8px;
}

.ws-meta {
    color: #64748b;
    font-size: 15px;
    margin: 18px 0;
}

@media (max-width: 640px) {
    .ws-directory,
    .ws-tool {
        padding: 20px 14px;
    }

    .ws-card {
        padding: 22px;
    }

    .ws-tool-form {
        display: block;
    }

    .ws-tool-form input,
    .ws-tool-form button {
        width: 100%;
        margin-bottom: 12px;
    }

    .ws-kv {
        display: block;
    }

    .ws-kv strong {
        display: block;
        text-align: left;
        margin-top: 4px;
    }

    .ws-score-head {
        display: block;
    }
}