.llm-response {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 20px 0;
    min-height: 200px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6b7280;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #7c3aed;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-text {
    font-size: 14px;
    color: #6b7280;
}

.error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 14px;
}

.analysis-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.analysis-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.api-key-group {
    display: flex;
    gap: 8px;
    flex-grow: 1;
    max-width: 500px;
}

#api-key-input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
    transition: border-color 0.2s;
}

#api-key-input:focus {
    border-color: #7c3aed;
    outline: none;
    background: white;
}

.key-button {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.key-button:hover {
    background: #e5e7eb;
}

.analysis-button {
    padding: 8px 16px;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.analysis-button:hover:not(:disabled) {
    background: #6d28d9;
}

.analysis-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

#analysis-content {
    padding: 24px;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.6;
}

#analysis-content h1,
#analysis-content h2,
#analysis-content h3 {
    color: #111827;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 600;
}

#analysis-content h1 {
    font-size: 1.5em;
}

#analysis-content h2 {
    font-size: 1.25em;
}

#analysis-content h3 {
    font-size: 1.1em;
}

#analysis-content p {
    margin-bottom: 1em;
}

#analysis-content ul,
#analysis-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}

#analysis-content li {
    margin: 0.5em 0;
}

#analysis-content code {
    background: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, monospace;
}

#analysis-content pre {
    background: #f3f4f6;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1em 0;
}

#analysis-content pre code {
    background: none;
    padding: 0;
}

#analysis-content blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1em;
    margin: 1em 0;
    color: #4b5563;
}
