.tecz-extractor-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tecz-extractor-header {
    background: #f8fafc;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.tecz-extractor-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.25rem;
    color: #1e293b;
}

.tecz-extractor-header p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.tecz-extractor-input-section {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.tecz-form-group {
    margin-bottom: 10px;
}

.tecz-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #334155;
}

.tecz-input-with-button {
    display: flex;
    gap: 10px;
}

.tecz-input-with-button input {
    flex-grow: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #0f172a;
}

.tecz-input-with-button input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tecz-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.85rem;
    box-sizing: border-box;
    font-family: monospace;
}

.tecz-fallback-toggle {
    margin-top: 8px;
}

.tecz-fallback-toggle a {
    font-size: 0.8rem;
    color: #3b82f6;
    text-decoration: none;
}

.tecz-fallback-toggle a:hover {
    text-decoration: underline;
}

.tecz-btn {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.tecz-btn:hover {
    background: #2563eb;
}

.tecz-btn-secondary {
    background: #64748b;
}

.tecz-btn-secondary:hover {
    background: #475569;
}

.tecz-btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.tecz-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px;
    color: #475569;
    font-size: 0.95rem;
}

.tecz-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #cbd5e1;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: tecz-spin 0.8s linear infinite;
}

@keyframes tecz-spin {
    to { transform: rotate(360deg); }
}

.tecz-error-banner {
    margin: 20px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 6px;
    font-size: 0.875rem;
}

#tecz-results-container {
    padding: 20px;
    background: #f8fafc;
}

.tecz-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tecz-results-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
    word-break: break-all;
}

.tecz-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.tecz-card h5 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.tecz-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tecz-table th,
.tecz-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    word-break: break-word;
}

.tecz-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.tecz-table td:first-child {
    font-weight: 600;
    color: #1e293b;
    width: 25%;
}

.tecz-tag-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #e2e8f0;
    color: #334155;
}

.tecz-headings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.tecz-heading-box {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.tecz-heading-box .count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
}

.tecz-heading-box .label {
    font-size: 0.75rem;
    color: #64748b;
}

.tecz-code-output {
    width: 100%;
    background: #0f172a;
    color: #38bdf8;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 10px;
    font-family: monospace;
    font-size: 0.8rem;
    box-sizing: border-box;
    resize: vertical;
}

@media (max-width: 600px) {
    .tecz-input-with-button {
        flex-direction: column;
    }
    .tecz-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}