/* Enable scrolling for this page */
body.reflections-page {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}

body.reflections-page #app {
    height: auto;
    min-height: 100vh;
}

/* Dereal Reflections - Styles */

body {
    background: var(--bg-dark);
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: var(--accent-primary);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

/* Stats Section */
.stats-section {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Filters */
.filters-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    color: var(--text-secondary);
}

.filter-group select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Notes List */
.notes-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.note-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.note-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.note-title {
    font-size: 18px;
    font-weight: 600;
}

.note-date {
    font-size: 12px;
    color: var(--text-muted);
}

.note-preview {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-footer {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.note-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border-radius: 12px;
    color: var(--text-secondary);
}

.note-domain {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    color: var(--accent-primary);
}

.note-companion {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    color: var(--accent-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state.hidden {
    display: none;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Prompts Section */
.prompts-section {
    margin-top: 40px;
}

.prompts-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.prompt-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.prompt-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
}

.prompt-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.prompt-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--bg-card);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* View Modal */
.view-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.view-content {
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.view-tags {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .stats-section {
        flex-direction: column;
    }
    
    .filters-section {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .prompts-grid {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}
