body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

textarea {
    font-size: 14px;
    line-height: 1.65;
}

.copy-btn {
    cursor: pointer;
    white-space: nowrap;
}

/* Note type toggle buttons */
.note-type-label {
    cursor: pointer;
}

.note-type-btn {
    display: block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.15s ease;
}

.dark .note-type-btn {
    color: #94a3b8;
}

.note-type-btn:hover {
    color: #374151;
    background: rgba(0, 0, 0, 0.04);
}

.dark .note-type-btn:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

/* Result cards */
.result-card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    border-radius: 12px;
}

.result-card:hover {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    border-color: #d1d5db;
}

.dark .result-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    border-color: #334155;
}

/* Selected panel glow */
#selectedPanel {
    transition: box-shadow 0.2s ease;
}

#selectedPanel:hover {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.dark #selectedPanel:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

/* Critical care banner pulse */
#criticalCareBanner {
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #fecaca; }
    50% { border-color: #f87171; }
}

.dark #criticalCareBanner {
    animation: pulse-border-dark 2s ease-in-out infinite;
}

@keyframes pulse-border-dark {
    0%, 100% { border-color: rgba(239, 68, 68, 0.2); }
    50% { border-color: rgba(239, 68, 68, 0.5); }
}

/* Selection left border */
.border-l-3 {
    border-left-width: 3px;
}

/* Checkbox styling */
input[type="checkbox"]:checked {
    background-color: #2563eb;
}

/* Analyze button gradient */
#analyzeBtn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

#analyzeBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

/* Textarea focus glow */
textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 0 20px rgba(59, 130, 246, 0.08);
}

/* Sticky secondary header shadow when stuck */
#secondaryHeader {
    transition: border-color 0.15s ease;
}

/* Footer */
footer {
    background: transparent;
}

/* Scrollbars */
#historyList,
#results {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.dark #historyList,
.dark #results {
    scrollbar-color: #334155 transparent;
}

/* Settings drawer */
#settingsDrawer {
    transition: transform 0.3s ease;
}

/* Character count */
#charCount {
    font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace;
}

/* Smooth color transitions for theme toggle */
body, header, footer, .result-card, #selectedPanel, #settingsDrawer,
textarea, select, input {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
