/* Pico.css provides base styling, this is for overrides and custom elements */

body {
    font-family: sans-serif;
}

.nav-link {
    cursor: pointer;
}

.page-section {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.active {
    display: block !important;
}

/* Article Grid and Cards */
#articlesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.article-card {
    border: 1px solid var(--card-border-color, #e1e1e1);
    border-radius: var(--border-radius);
    padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);
    background-color: var(--card-background-color);
    box-shadow: var(--card-box-shadow);
    overflow: hidden; /* Important for blur containment */
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.5rem;
    display: block;
}

.article-card .category {
    font-size: 0.8em;
    color: var(--muted-color);
    background-color: var(--muted-border-color);
    padding: 0.2em 0.5em;
    border-radius: var(--border-radius);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.article-card .visibility {
    font-size: 0.7em;
    color: var(--contrast-hover);
    background-color: var(--primary-focus);
    padding: 0.2em 0.5em;
    border-radius: var(--border-radius);
    display: inline-block;
    margin-bottom: 0.5rem;
    margin-left: 0.3rem;
}

.article-card .actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.article-card .actions button {
    margin-left: 0.5rem;
}

/* Style for disabled navigation links */
.disabled-nav-link {
    color: var(--muted-color) !important;
    cursor: not-allowed !important;
    pointer-events: none; /* This is the primary way to disable clicks */
    text-decoration: none !important; /* Optional: remove underline if it has one */
}
.disabled-nav-link:hover {
    color: var(--muted-color) !important; /* Keep color same on hover */
    background-color: transparent !important; /* Prevent hover background changes */
}

/* NSFW Blurring */
.nsfw-blurred img,
.nsfw-blurred .description-text {
    filter: blur(8px);
    transition: filter 0.3s ease-in-out;
}

.nsfw-blurred:hover img,
.nsfw-blurred:hover .description-text {
     /* filter: blur(5px); keep it blurred on hover, unblur only on explicit toggle */
}

/* Chat interface */
.ai-chat-status { 
    margin-bottom: 1rem;
    font-size: 0.9em;
    /* Pico's blockquote styling is used by default */
}
.ai-chat-status.hidden {
    display: none;
}

.chat-output-container {
    height: 350px; 
    border: 1px solid var(--muted-border-color);
    padding: 1rem;
    overflow-y: auto;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    display: flex; 
    flex-direction: column; 
}

.chat-message { 
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem; 
    max-width: 80%; 
}

.chat-message.user {
    align-self: flex-end; 
    align-items: flex-end; 
}

.chat-message.ai {
    align-self: flex-start; 
    align-items: flex-start; 
}

.chat-sender-display-name { 
    font-size: 0.8em;
    font-weight: bold;
    color: var(--muted-color);
    margin-bottom: 0.25rem;
    padding: 0 0.5rem;
}

.chat-message.user .chat-sender-display-name {
    text-align: right;
}
.chat-message.ai .chat-sender-display-name {
    text-align: left;
}


.chat-message-content { 
    padding: 0.6rem 1rem; 
    border-radius: 15px; 
    word-wrap: break-word;
    line-height: 1.4;
    color: var(--contrast-inverse); 
}

.chat-message.user .chat-message-content {
    background-color: var(--primary);
    color: var(--primary-inverse);
    border-bottom-right-radius: 5px; 
}

.chat-message.ai .chat-message-content {
    background-color: var(--contrast);
    border-bottom-left-radius: 5px;
}


.chat-timestamp {
    font-size: 0.7em;
    color: var(--muted-color);
    margin-top: 0.3rem;
    padding: 0 0.5rem; 
}


.chat-input-form {
    display: flex;
}

.chat-input-form textarea {
    flex-grow: 1;
    margin-right: 0.5rem;
    margin-bottom: 0; 
    resize: vertical; 
    min-height: 40px; 
    padding: 0.5rem; 
    border-radius: var(--border-radius);
}

#imagePreviewContainer {
    border: 1px dashed var(--muted-border-color);
    padding: 1rem;
    text-align: center;
    min-height: 100px;
}
#imagePreview {
    display: block; 
    margin: 0 auto 1rem auto; 
    max-width: 100%; 
    max-height: 250px; 
    object-fit: contain; 
}

#aiImageStatus {
    font-style: italic;
    color: var(--muted-color);
}

/* Admin Panel Specific Styles */
#admin-panel article {
    margin-bottom: 2rem;
}

#adminBannedUsersList {
    list-style-type: disc;
    padding-left: 20px;
}
#adminBannedUsersList li {
    margin-bottom: 0.25rem;
}

/* Jumpscare Overlay Styles */
#jumpscareOverlay {
    display: none; /* Initially hidden, controlled by JS */
    /* other styles in HTML for brevity */
}
#jumpscareOverlay.active {
    display: flex; /* Use flex for centering */
}