/* CSS Variables for theming */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --text-primary: #eaeaea;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --accent: #4e9fff;
    --accent-hover: #3d8ce6;
    --border: #2a2a4a;
    --success: #4ade80;
    --warning: #fbbf24;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: 0.3s ease;
}

[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #888;
    --accent: #0066cc;
    --accent-hover: #0052a3;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Utility classes */
.hidden { display: none !important; }

/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial Hebrew', Tahoma, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    line-height: 1.7;
    font-size: 20px;
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.header-center {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Two-row header layout */
.header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.user-row {
    justify-content: space-between;
    padding-bottom: 0.5rem;
}

.header-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-row {
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
}

.admin-buttons {
    display: flex;
    gap: 0.5rem;
    margin-right: auto;
}

/* Search container */
.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.25rem 0.6rem;
    height: 32px;
    transition: border-color var(--transition);
}

.search-container:focus-within {
    border-color: var(--accent);
}

.search-icon {
    font-size: 0.9rem;
    margin-left: 0.4rem;
    opacity: 0.6;
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    width: 150px;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    opacity: 0;
    transition: opacity var(--transition);
}

.search-container:focus-within .search-clear,
.search-clear.visible {
    opacity: 1;
}

.search-clear:hover {
    color: var(--text-primary);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.9rem;
}

.tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tab:hover:not(.active) {
    background: var(--bg-card);
}

/* Sort toggle */
.sort-toggle {
    display: flex;
    gap: 0.25rem;
}

.sort-btn {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sort-btn.active {
    background: var(--accent);
    border-color: var(--accent);
}

.sort-btn:hover:not(.active) {
    background: var(--bg-card);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-icon-only {
    padding: 0.4rem 0.6rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Theme toggle icons - show current state */
.theme-icon-light { display: inline; }
.theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: inline; }

/* Source select */
.source-select {
    padding: 0.25rem 0.6rem;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Main content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Status bar */
.status-bar {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
    white-space: pre-wrap;
}

.status-bar.success { border-color: var(--success); }
.status-bar.warning { border-color: var(--warning); }
.status-bar.hidden { display: none; }

/* News grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Article cards */
.article-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

/* Duplicate articles - grayed out */
.article-card.article-duplicate {
    opacity: 0.5;
    border-color: var(--text-muted);
}

.article-card.article-duplicate:hover {
    opacity: 0.7;
    border-color: var(--accent);
}

/* Highlight animation for original article */
.article-card.article-highlight {
    animation: highlight-pulse 2s ease-out;
}

@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 4px var(--accent); }
    100% { box-shadow: none; }
}

.article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.article-image-placeholder {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
}

/* Meta row: scores left, source right (flex-direction reversed for RTL) */
.article-meta-row {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.article-source {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 600;
}

/* Score badges */
.article-scores {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.score-consequence {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.score-timeliness {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.score-novelty {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.score-emotional {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.score-controversy {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.predicted-score {
    font-size: 1.1rem;
    font-weight: 600;
}

.predicted-score.score-high {
    color: #22c55e;
}

.predicted-score.score-medium {
    color: var(--text-secondary);
}

.predicted-score.score-low {
    color: #ef4444;
}

.article-headline {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.article-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.article-content {
    flex: 1;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 0.5rem;
}

.original-content {
    opacity: 0.7;
    font-style: italic;
}

.no-content {
    color: var(--text-muted);
    font-style: italic;
}

/* Feedback buttons */
.feedback-buttons {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition);
    opacity: 0.6;
}

.feedback-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.feedback-btn.active {
    opacity: 1;
}

.feedback-btn.like.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #16a34a;
    color: white;
}

.feedback-btn.dislike.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #dc2626;
    color: white;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

.article-time {
    color: var(--text-muted);
    font-size: 1rem;
}

.article-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.article-link:hover {
    text-decoration: underline;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px dashed var(--border);
}

/* Loading spinner */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* New article animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-new {
    animation: slideIn 0.4s ease-out;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(78, 159, 255, 0.2);
}


/* Duplicate badge */
.duplicate-badge {
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--warning);
    background: rgba(251, 191, 36, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: opacity var(--transition);
}

.duplicate-badge:hover {
    opacity: 0.8;
}

/* Similarity badge and popup */
.similarity-badge {
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.7;
    transition: opacity var(--transition);
    padding: 0 0.25rem;
}

.similarity-badge:hover {
    opacity: 1;
}

.similarity-popup {
    position: absolute;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.25rem;
    width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.2s ease;
}


.similarity-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.similarity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.similarity-source {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.similarity-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.similarity-feedback {
    font-size: 0.9rem;
}

.similarity-feedback.unrated {
    color: var(--text-secondary);
    opacity: 0.5;
}

.similarity-prediction {
    font-size: 0.85rem;
    font-weight: 600;
}

.similarity-prediction.score-high {
    color: #22c55e;
}

.similarity-prediction.score-medium {
    color: var(--text-secondary);
}

.similarity-prediction.score-low {
    color: #ef4444;
}

.similarity-title {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.similarity-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Score explanation popup */
.explain-popup {
    position: absolute;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1rem;
    width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.2s ease;
    font-size: 0.85rem;
    direction: ltr;
    text-align: left;
}

.explain-header {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.explain-base {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.explain-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    gap: 0.5rem;
}

.explain-feature {
    flex: 1;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.explain-value {
    width: 50px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.explain-contrib {
    width: 60px;
    text-align: right;
    font-weight: 600;
}

.explain-contrib.positive {
    color: var(--success);
}

.explain-contrib.negative {
    color: #f87171;
}

/* Metadata popup (entities + category) */
.metadata-popup {
    position: absolute;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1rem;
    width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.2s ease;
    font-size: 0.85rem;
    direction: rtl;
    text-align: right;
}

.metadata-header {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    text-transform: capitalize;
}

.metadata-section {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.metadata-label {
    color: var(--text-muted);
    font-weight: 600;
}

.metadata-values {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 0.75rem;
    }

    .header-row {
        gap: 0.5rem;
    }

    .user-row {
        justify-content: space-between;
    }

    .admin-row {
        justify-content: space-around;
    }

    .logo {
        font-size: 1.2rem;
    }

    .header-group {
        gap: 0.5rem;
    }

    .header-group:first-of-type {
        order: 0;
    }

    .header-group:last-of-type {
        order: 1;
        flex: 1;
        justify-content: flex-end;
    }

    .tabs {
        margin-right: 0;
    }

    .tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .search-container {
        flex: 1;
        min-width: 0;
        order: 0;
    }

    .search-input {
        width: 100%;
        min-width: 80px;
    }

    .source-select {
        flex-shrink: 1;
        min-width: 0;
        max-width: 100px;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
        order: 1;
    }

    #theme-toggle {
        order: 2;
    }

    .btn-text {
        display: none;
    }

    .btn {
        padding: 0.5rem;
    }

    .btn-small {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .main-content {
        padding: 1rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Auth Styles */
.auth-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-user-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
    max-width: 400px;
    width: 90%;
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Auth Modal */
.auth-modal-content {
    max-width: 360px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.auth-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-error {
    color: #ef4444;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
}

.auth-error.hidden {
    display: none;
}

.btn-full {
    width: 100%;
}

/* Feedback buttons visibility for unauthenticated users */
.feedback-buttons.auth-required .feedback-btn {
    opacity: 0.3;
    pointer-events: none;
}

.feedback-buttons.auth-required::before {
    content: "Login to rate";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    color: var(--accent);
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
}

/* Ask Button */
.ask-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition);
    opacity: 0.6;
}

.ask-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

/* Q&A Modal */
.qa-modal-content {
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.qa-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-card));
}

.qa-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    direction: rtl;
    text-align: right;
}

.qa-conversation {
    flex: 1;
    min-height: 280px;
    max-height: 500px;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-primary);
}

.qa-message {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.7;
    font-size: 1.1rem;
    animation: fadeInUp 0.2s ease;
    white-space: pre-wrap;
}

.qa-message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border-bottom-right-radius: 4px;
    direction: rtl;
    text-align: right;
}

.qa-message-assistant {
    align-self: flex-start;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    direction: rtl;
    text-align: right;
}

/* Loading dots animation */
.qa-loading {
    display: flex;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
}

.qa-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: qaDotPulse 1.4s infinite ease-in-out;
}

.qa-dot:nth-child(1) { animation-delay: 0s; }
.qa-dot:nth-child(2) { animation-delay: 0.2s; }
.qa-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes qaDotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.qa-input-form {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

#qa-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

#qa-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(78, 159, 255, 0.15);
}

#qa-input::placeholder {
    color: var(--text-muted);
}

.qa-submit {
    padding: 0.75rem 1.25rem;
    border-radius: 24px;
    min-width: 70px;
}

.qa-submit:disabled {
    opacity: 0.5;
}

/* Q&A modal close button position */
.qa-modal-content .modal-close {
    top: 1rem;
    left: 1rem;
    z-index: 1;
}
