* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    padding: 60px 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
	padding: 50px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 8px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.02em;
}

.header-title {
    cursor: pointer;
    transition: color 0.2s ease;
}

.header-title:hover {
    color: #4f46e5;
}

.powered-by {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.powered-by-logo {
    height: 18px;
    width: auto;
    vertical-align: middle;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.powered-by-logo:hover {
    opacity: 1;
}

/* Card Tile */
.card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.08),
        0 20px 25px -5px rgba(0, 0, 0, 0.05);
    padding: 32px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.07),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 25px 30px -5px rgba(0, 0, 0, 0.08);
}

/* Card Top Row - Instructions and FAQ */
.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.instructions {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    flex: 1;
}

.faq-link {
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.faq-link:hover {
    color: #4f46e5;
}

/* Bottom left buttons container */
.bottom-left-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* History Button - Small icon only */
.history-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: #e5e7eb;
    border-radius: 50%;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.history-btn:hover {
    background: #d1d5db;
    color: #6366f1;
}

.history-btn.active {
    background: #6366f1;
    color: white;
}

.history-btn svg {
    width: 12px;
    height: 12px;
}

/* History Panel - Expands below input row */
.history-panel {
    display: none;
    margin-top: 16px;
    padding: 10px;
    background: #f3f4f6;
    border-radius: 12px;
    animation: fadeIn 0.2s ease;
}

.history-panel.visible {
    display: block;
}

.history-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.history-empty {
    color: #9ca3af;
    font-size: 0.8rem;
    padding: 8px 12px;
    text-align: center;
}

/* History Item - List style */
.history-item {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.65rem;
    color: #4b5563;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4f46e5;
}

/* Input Row - Textarea and Buttons side by side */
.input-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.textarea-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.text-input {
    flex: 1;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1a1a2e;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    resize: vertical;
    min-height: 140px;
    transition: all 0.2s ease;
    line-height: 1.6;
}

/* Textarea bottom row - clear button and word counter */
.textarea-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 4px;
}

/* Clear Button */
.clear-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: #e5e7eb;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.clear-btn:hover {
    background: #d1d5db;
    color: #6b7280;
}

.clear-btn:active {
    transform: scale(0.95);
}

/* Word Counter */
.word-counter {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: right;
    transition: color 0.2s ease;
}

.word-counter.warning {
    color: #f59e0b;
}

.word-counter.limit {
    color: #ef4444;
    font-weight: 500;
}

.text-input::placeholder {
    color: #9ca3af;
}

.text-input:focus {
    outline: none;
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Button Group */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 130px;
}

.action-btn {
    flex: 1;
    padding: 0 24px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.paste-btn {
    color: #4f46e5;
    background: #eef2ff;
    border: 2px solid #e0e7ff;
}

.paste-btn:hover {
    background: #e0e7ff;
    border-color: #c7d2fe;
}

.analyze-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.analyze-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.analyze-btn:disabled {
    background: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.cooldown-bar {
    height: 3px;
    border-radius: 2px;
    background: #6366f1;
    width: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.cooldown-bar.active {
    opacity: 1;
    animation: cooldown 5s linear forwards;
}

@keyframes cooldown {
    from { width: 100%; }
    to   { width: 0%; }
}

/* Results Card */
.results-card {
    margin-top: 24px;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 0;
    overflow: hidden;
}

.results-card.visible {
    display: block;
    animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Header - The colored banner */
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
}

.result-header.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.result-header.failure {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.result-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.result-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.result-header.success .result-icon {
    background: #10b981;
    color: #ffffff;
}

.result-header.failure .result-icon {
    background: #ef4444;
    color: #ffffff;
}

.result-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-verdict {
    font-size: 1.2rem;
    font-weight: 600;
}

.result-header.success .result-verdict {
    color: #065f46;
}

.result-header.failure .result-verdict {
    color: #991b1b;
}

.result-confidence {
    font-size: 0.85rem;
    font-weight: 500;
}

.result-header.success .result-confidence {
    color: #059669;
}

.result-header.failure .result-confidence {
    color: #dc2626;
}

/* Feedback Row */
.feedback-row {
    padding: 10px 28px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.feedback-toggle {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.feedback-toggle:hover {
    color: #6366f1;
}

.feedback-form {
    display: none;
    margin-top: 10px;
}

.feedback-form.visible {
    display: block;
    animation: fadeIn 0.2s ease forwards;
}

.feedback-input {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.85rem;
    color: #1a1a2e;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
    transition: border-color 0.2s ease;
}

.feedback-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.feedback-input::placeholder {
    color: #9ca3af;
}

.feedback-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.feedback-submit {
    padding: 8px 18px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.25);
}

.feedback-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.feedback-cancel {
    padding: 8px 18px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-cancel:hover {
    background: #e5e7eb;
}

.feedback-thanks {
    display: none;
    margin-top: 8px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
}

.feedback-thanks.visible {
    display: block;
    animation: fadeIn 0.2s ease forwards;
}

/* Details Toggle Button */
.details-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

.result-header.success .details-toggle {
    color: #065f46;
}

.result-header.failure .details-toggle {
    color: #991b1b;
}

.details-toggle:hover {
    background: rgba(255, 255, 255, 0.9);
}

.toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.details-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* Details Section - Chart */
.details-section {
    display: none;
    padding: 0 28px 28px 28px;
    opacity: 0;
    transform: translateY(-10px);
}

.result-header.success + .details-section {
    background: linear-gradient(180deg, #d1fae5 0%, #ffffff 30%);
}

.result-header.failure + .details-section {
    background: linear-gradient(180deg, #fee2e2 0%, #ffffff 30%);
}

.details-section.visible {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-container {
    position: relative;
    height: 220px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chart-container canvas {
    cursor: pointer;
}

.chart-hint {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 8px;
    font-style: italic;
}

/* Result Actions */
.result-actions {
    padding: 20px 28px;
    background: #ffffff;
}

.result-btn {
    width: 100%;
    padding: 14px 24px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.explain-btn {
    color: #6b7280;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
}

.explain-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Loading Indicator */
.loading {
    display: none;
    text-align: center;
    padding: 30px;
    margin-top: 24px;
}

.loading.active {
    display: block;
}

.spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Error Display */
.error {
    background: #fef2f2;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 24px;
    display: none;
    font-size: 0.9rem;
    border: 1px solid #fecaca;
}

.error.active {
    display: block;
}

/* Explanation Section */
.explanation-section {
    display: none;
    padding: 0 28px 28px 28px;
    background: #ffffff;
}

.explanation-section.active {
    display: block;
}

.explanation-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.explanation-title-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.explanation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.ai-disclaimer {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    font-style: italic;
    transition: color 0.2s;
}

.ai-disclaimer:hover {
    color: #6b7280;
    text-decoration: underline;
}

.explanation-text {
    color: #4b5563;
    line-height: 1.7;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

/* Simplified Section */
.simplified-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    border-radius: 16px;
    padding: 24px;
    display: none;
}

.simplified-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 12px;
}

.simplified-sentence {
    background: white;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
    font-size: 0.95rem;
    color: #1a1a2e;
    margin-bottom: 16px;
    font-style: italic;
    line-height: 1.6;
}

.simplified-check {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.simplified-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.simplified-check:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.simplified-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    display: none;
}

.simplified-result.active {
    display: block;
}

.simplified-result.good {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.simplified-result.bad {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =====================================================
   PARAGRAPH RESULTS & HEATMAP STYLES
   ===================================================== */

/* Heatmap Section */
.heatmap-section {
    padding: 24px 28px;
    background: #ffffff;
}

.heatmap-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.heatmap-container {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    line-height: 1.8;
    font-size: 1rem;
}

/* Sentence spans in heatmap */
.heatmap-sentence {
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline;
    margin: 2px 0;
}

.heatmap-sentence:hover {
    filter: brightness(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.heatmap-sentence.selected {
    outline: 3px solid #6366f1;
    outline-offset: 2px;
}

/* CEFR Level Colors for sentences - these are fallbacks, actual colors are set dynamically based on confidence */
.heatmap-sentence.level-a1 {
    background-color: rgba(0, 200, 140, 0.35);
    color: #065f46;
}

.heatmap-sentence.level-a2 {
    background-color: rgba(52, 211, 153, 0.35);
    color: #065f46;
}

.heatmap-sentence.level-b1 {
    background-color: rgba(134, 210, 172, 0.4);
    color: #14532d;
}

.heatmap-sentence.level-b2 {
    background-color: rgba(197, 150, 28, 0.35);
    color: #78350f;
}

.heatmap-sentence.level-c1 {
    background-color: rgba(234, 88, 12, 0.35);
    color: #7c2d12;
}

.heatmap-sentence.level-c2 {
    background-color: rgba(220, 38, 38, 0.35);
    color: #7f1d1d;
}

/* Heatmap Legend */
.heatmap-legend {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.legend-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.legend-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legend-group.good .legend-label {
    color: #10b981;
}

.legend-group.bad .legend-label {
    color: #dc2626;
}

.legend-colors {
    display: flex;
    gap: 4px;
}

.legend-color {
    width: 20px;
    height: 12px;
    border-radius: 3px;
    cursor: help;
}

.legend-color.level-a1 {
    background-color: #00C88C;
}

.legend-color.level-a2 {
    background-color: #34d399;
}

.legend-color.level-b1 {
    background-color: #86D2AC;
}

.legend-color.level-b2 {
    background-color: #C5961C;
}

.legend-color.level-c1 {
    background-color: #ea580c;
}

.legend-color.level-c2 {
    background-color: #dc2626;
}

/* Sentence Detail Panel */
.sentence-detail-panel {
    display: none;
    margin: 0 28px 28px 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.sentence-detail-panel.active {
    display: block;
}

.sentence-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sentence-detail-level {
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    color: white;
}

.sentence-detail-level.level-a1 { background-color: #00C88C; }
.sentence-detail-level.level-a2 { background-color: #34d399; }
.sentence-detail-level.level-b1 { background-color: #86D2AC; color: #14532d; }
.sentence-detail-level.level-b2 { background-color: #C5961C; color: #78350f; }
.sentence-detail-level.level-c1 { background-color: #ea580c; }
.sentence-detail-level.level-c2 { background-color: #dc2626; }

.sentence-detail-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #e5e7eb;
    border-radius: 8px;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sentence-detail-close:hover {
    background: #d1d5db;
    color: #374151;
}

.sentence-detail-text {
    font-size: 1rem;
    color: #1a1a2e;
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.sentence-detail-probs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prob-item {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}

.prob-item.highlight {
    background: #6366f1;
    color: white;
}

/* Sentence detail content layout */
.sentence-detail-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.sentence-detail-main {
    flex: 1;
}

.sentence-detail-actions {
    flex-shrink: 0;
}

.sentence-explain-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.sentence-explain-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sentence-explain-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Sentence explanation area */
.sentence-explanation {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.sentence-explanation.active {
    display: block;
}

.sentence-explanation-text {
    color: #4b5563;
    line-height: 1.7;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.sentence-simplified {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
}

.sentence-simplified.active {
    display: block;
}

.sentence-simplified-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 8px;
}

.sentence-simplified-text {
    font-size: 0.9rem;
    color: #1a1a2e;
    font-style: italic;
    line-height: 1.6;
}

.sentence-simplified .simplified-check {
    margin-top: 12px;
}

/* =====================================================
   FAQ PAGE STYLES
   ===================================================== */

.faq-intro-card {
    margin-bottom: 24px;
}

.faq-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.back-link {
    color: #6366f1;
    font-weight: 600;
}

.back-link:hover {
    color: #4f46e5;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.faq-tile {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 2px 4px -1px rgba(0, 0, 0, 0.04),
        0 4px 8px -2px rgba(0, 0, 0, 0.06);
    padding: 24px;
    transition: all 0.2s ease;
}

.faq-tile:hover {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.07),
        0 8px 12px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.faq-question {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
    line-height: 1.4;
}

.faq-answer {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 40px 16px;
    }

    .page-header {
        flex-direction: column;
        gap: 4px;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .card {
        padding: 24px;
        border-radius: 20px;
    }

    .card-top-row {
        flex-direction: column;
        gap: 12px;
    }


    .input-row {
        flex-direction: column;
    }

    .button-group {
        flex-direction: row;
    }

    .action-btn {
        padding: 14px 24px;
    }

    .result-header {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .result-main {
        width: 100%;
    }

    .details-toggle {
        width: 100%;
        justify-content: center;
    }

    .details-section {
        padding: 0 20px 20px 20px;
    }

    .result-actions {
        padding: 16px 20px;
    }

    /* Feedback responsive */
    .feedback-row {
        padding: 10px 20px;
    }

    /* Heatmap responsive */
    .heatmap-section {
        padding: 20px;
    }

    .heatmap-legend {
        flex-wrap: wrap;
        gap: 10px;
    }

    .sentence-detail-panel {
        margin: 0 20px 20px 20px;
    }

    /* FAQ responsive */
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .faq-tile {
        padding: 20px;
    }
}
