.tool-container { max-width: 1000px; margin: 0 auto; padding: 2rem 1rem; }

.tool-header    { text-align: center; margin-bottom: 2.5rem; }
.tool-header h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 800; margin-bottom: 0.75rem; }
.tool-header p  { font-size: 1.1rem; color: var(--text-soft); }

.card {
    background: var(--panel);
    border: 1px solid var(--header-border);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-grid-2    { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .form-grid-2 { grid-template-columns: repeat(2, 1fr); } }

.form-group     { margin-bottom: 1rem; }
.form-label     { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }

.form-input,
.form-select,
.form-textarea  { width: 100%; padding: 0.75rem; border: 1px solid var(--header-border); border-radius: 0.375rem; font-size: 1rem; box-sizing: border-box; }
.form-textarea  { min-height: 150px; resize: vertical; font-family: inherit; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus { outline: none; border-color: var(--accent); }

#urlInput {
    border: 3px solid #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14), 0 14px 34px rgba(37, 99, 235, 0.14);
}

#urlInput:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.24), 0 18px 38px rgba(37, 99, 235, 0.18);
}

.btn            { padding: 0.75rem 1.5rem; background: var(--accent); color: white; border: none; border-radius: 0.375rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn:hover:not(:disabled) { background: var(--accent-strong); }
.btn:disabled   { opacity: 0.6; cursor: not-allowed; }
.btn-secondary  { background: var(--panel-soft); color: var(--text-strong); border: 1px solid var(--header-border); }
.btn-secondary:hover:not(:disabled) { background: var(--panel); }
.btn-group      { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.stats-row      { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.stat-chip      { display: inline-flex; align-items: center; padding: 0.5rem 1rem; background: var(--panel-soft); border: 1px solid var(--header-border); border-radius: 999px; font-size: 0.875rem; color: var(--text-soft); }

.balance-badge          { display: inline-block; padding: 0.5rem 1rem; border-radius: 0.375rem; font-weight: 600; font-size: 0.875rem; }
.balance-badge.good     { background: #dcfce7; color: #166534; }
.balance-badge.warning  { background: #fef3c7; color: #92400e; }
.balance-badge.danger   { background: #fee2e2; color: #991b1b; }

.table-wrapper  { overflow-x: auto; }
.results-table  { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.results-table th,
.results-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--header-border); }
.results-table th { background: var(--panel-soft); font-size: 0.875rem; font-weight: 600; color: var(--text-soft); }
.results-table td { font-size: 0.9375rem; }

.loading-box    { background: #e0f2fe; border: 1px solid #0ea5e9; border-radius: 0.5rem; padding: 1.5rem; text-align: center; margin-top: 1rem; }
.spinner        { border: 3px solid #e5e7eb; border-top: 3px solid var(--accent); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto 0.75rem; }
@keyframes spin { to { transform: rotate(360deg); } }

.tips-list      { list-style: none; padding: 0; }
.tips-list li   { padding: 0.75rem 0; border-bottom: 1px solid var(--header-border); }
.tips-list li:last-child { border-bottom: none; }

.faq-item       { margin-bottom: 1.5rem; }
.faq-question   { font-weight: 600; margin-bottom: 0.5rem; }
.faq-answer     { color: var(--text-soft); font-size: 0.9375rem; line-height: 1.6; }

@media (max-width: 640px) {
    .tool-container { padding: 1rem; }
    .card           { padding: 1.25rem; }
    .results-table  { font-size: 0.875rem; }
}

.keyword-cell { font-weight: 700; }
.is-hidden { display: none !important; }
.tool-container { color: var(--text-strong); }
.card, .stat-chip, .results-table th { background: var(--panel); border-color: var(--header-border); }
.form-input, .form-select, .form-textarea { background: var(--panel-soft); color: var(--text-strong); border-color: var(--header-border); }
