.analyzer-input {
    margin-bottom: 24px;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.input-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.input-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

#input-text, #nft-input-text {
    width: 100%;
    min-height: 50vh;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    resize: vertical;
}

/* Results */
.results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.table-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.table-header h3 {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 600;
}

.table-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.table-body {
    padding: 0;
}

.chain-block {
    border-bottom: 1px solid var(--border);
}
.chain-block:last-child { border-bottom: none; }

.chain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg);
    cursor: pointer;
    user-select: none;
}

.chain-header:hover { background: var(--bg-hover); }

.chain-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chain-info {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.policy-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.policy-ACCEPT { background: var(--green-bg); color: var(--green); }
.policy-DROP { background: var(--red-bg); color: var(--red); }

.chain-rules {
    display: none;
    padding: 0;
}

.chain-rules.open { display: block; }

.rule-item {
    padding: 10px 16px 10px 32px;
    border-top: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.rule-item:hover { background: var(--bg-hover); }

.rule-summary {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rule-num {
    color: var(--text-muted);
    font-size: 0.7rem;
    min-width: 24px;
}

.target-badge {
    font-size: 0.7rem;
    padding: 1px 8px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.target-ACCEPT { background: var(--green-bg); color: var(--green); }
.target-DROP { background: var(--red-bg); color: var(--red); }
.target-REJECT { background: var(--orange-bg); color: var(--orange); }
.target-LOG { background: var(--yellow-bg); color: var(--yellow); }
.target-SNAT, .target-DNAT, .target-MASQUERADE, .target-REDIRECT {
    background: var(--blue-bg); color: var(--blue);
}
.target-RETURN { background: var(--bg-tertiary); color: var(--text-secondary); }
.target-MARK, .target-CONNMARK { background: rgba(167,139,250,0.1); color: var(--purple); }

.rule-summary-text {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.rule-detail {
    display: none;
    margin-top: 10px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.rule-detail.open { display: block; }

.detail-section {
    margin-bottom: 10px;
}

.detail-section:last-child { margin-bottom: 0; }

.detail-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 0.82rem;
    color: var(--text);
}

.detail-explanation {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 2px;
}

.condition-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.condition-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dotted var(--border);
}

.condition-item:last-child { border-bottom: none; }

.condition-field {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 500;
}

.condition-value {
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.condition-explanation {
    grid-column: 2;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.raw-rule {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    word-break: break-all;
    margin-top: 8px;
}

.warning-list {
    margin-top: 8px;
}

.warning-item {
    font-size: 0.78rem;
    color: var(--orange);
    padding: 4px 0;
}

.warning-item::before {
    content: "! ";
    font-weight: bold;
}

/* ipset results */
.ipset-result-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.ipset-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ipset-result-header h4 {
    font-size: 0.95rem;
    color: var(--accent);
}

.ipset-result-type {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.ipset-result-entries {
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.ipset-entry-item {
    padding: 3px 8px;
    border-bottom: 1px dotted var(--border);
}
