/* Facts page styles (viewFacts.php) */

.site-header {
    margin-bottom: 2rem;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.home-link:hover {
    color: var(--accent-gold-light);
}

.card {
    margin-bottom: 1.5rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
    background: var(--surface-1);
    border-radius: 12px;
}

.stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    text-align: center;
}

.message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: var(--success-soft);
}

.message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: var(--danger-soft);
}

/* Section titles */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title--center {
    justify-content: center;
}

.section-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-copper));
    border-radius: 8px;
    font-size: 1rem;
    color: var(--bg-deep);
    flex-shrink: 0;
}

[data-theme="light"] .section-icon {
    color: #fdf9f0;
}

/* Search & filter */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.65rem 1rem;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-cream);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

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

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

.filter-select {
    padding: 0.65rem 1rem;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-cream);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-select option {
    background: var(--bg-deep);
    color: var(--text-cream);
}

.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-copper));
    border: none;
    border-radius: 8px;
    color: var(--bg-deep);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="light"] .search-btn {
    color: #fdf9f0;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--glow-gold);
}

.search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Facts list */
.fact-item {
    margin-bottom: 0.75rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.pagination .page-info {
    font-size: 0.9rem;
}

.pagination .page-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .pagination {
        flex-direction: column;
        text-align: center;
    }
}

/* AI Section */
.ai-section {
    text-align: center;
}

.ai-hint {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.ai-hint--tight {
    margin-bottom: 0.5rem;
}

.ai-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ai-note--spaced {
    margin-top: 0.75rem;
}

.progress-bar-container {
    background: var(--surface-3);
    height: 8px;
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-copper));
    border: none;
    border-radius: 10px;
    color: var(--bg-deep);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="light"] .generate-btn {
    color: #fdf9f0;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--glow-gold);
}

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