/* =================================
    CSS VARIABLES (Light & Dark Mode)
    ================================= */
:root {
    /* Light Mode */
    --body-background: #f8f8f8;
    --main-text-color: #555;
    --heading-color: #2c3e50;
    --strong-text-color: #2c3e50;
    --nav-separator-color: #ccc;
    --media-overview-border: #ddd;
    --media-column-bg: #ffffff;
    --media-column-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --error-color: #e74c3c;
    --info-label-color: #777;
    --info-value-color: #333;
}

/* Dark Mode - Activated by System Preference or Manual Toggle */
@media (prefers-color-scheme: dark) {
    :root {
        --body-background: #1a1a1a;
        --main-text-color: #ccc;
        --heading-color: #e0e0e0;
        --strong-text-color: #e0e0e0;
        --nav-separator-color: #444;
        --media-overview-border: #444;
        --media-column-bg: #2c2c2c;
        --media-column-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        --error-color: #f1948a;
        --info-label-color: #aaa;
        --info-value-color: #e0e0e0;
    }
}

body[data-theme='dark'] {
    --body-background: #1a1a1a;
    --main-text-color: #ccc;
    --heading-color: #e0e0e0;
    --strong-text-color: #e0e0e0;
    --nav-separator-color: #444;
    --media-overview-border: #444;
    --media-column-bg: #2c2c2c;
    --media-column-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    --error-color: #f1948a;
    --info-label-color: #aaa;
    --info-value-color: #e0e0e0;
}

/* --- Base Layout & General Styling --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-background);
    color: var(--main-text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 60px;
    margin: 0;
}

.game-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    margin-top: 60px;
    gap: 20px;
    box-sizing: border-box;
}

.main-content-area {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left !important; 
}

/* --- Page Header Section --- */
.intro-heading-section {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--nav-separator-color);
    padding-bottom: 15px;
}

.intro-heading-section h1 {
    margin: 0 0 5px 0;
    color: var(--heading-color);
}

.intro-heading-section p {
    margin: 0;
    font-size: 1em;
}

/* --- Container Styling --- */
.container {
    max-width: none;
    padding: 0;
    margin: 0;
}

.container h1 {
    color: var(--heading-color);
    margin-bottom: 15px;
}

/* =================================
    COMMUNITY NOTES FEED STYLING
    ================================= */

.community-notes-feed {
    padding: 20px 0;
    text-align: left;
}

/* Individual Note Card */
.note-item.feed-item {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--media-overview-border);
    border-radius: 8px;
    background-color: var(--media-column-bg);
    box-shadow: var(--media-column-shadow);
    transition: box-shadow 0.3s ease, transform 0.1s ease;
    cursor: pointer; /* NEW: Indicate the whole card is clickable */
}

.note-item.feed-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px); /* Subtle lift on hover */
}

body[data-theme='dark'] .note-item.feed-item:hover,
@media (prefers-color-scheme: dark) {
    .note-item.feed-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
}

/* Header (GRPID and Date) */
.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--nav-separator-color);
}

.note-grpid {
    color: var(--info-label-color);
    font-weight: 400;
    font-size: 0.9em;
    margin-left: 5px;
}

.note-date {
    font-size: 0.85em;
    color: var(--info-label-color);
}

/* Reference to specific Title(s) */
.note-reference {
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 0.95em;
}

.title-list-display {
    color: var(--info-value-color);
    font-style: italic;
    margin-left: 5px;
}

/* Note Content */
.note-content {
    margin-bottom: 0px;
    color: var(--main-text-color);
    line-height: 1.6;
    border-top: 1px solid var(--media-overview-border);
    border-bottom: 1px solid var(--media-overview-border);
    font-size: 1em;
    text-align: left !important; 
}

/* Footer (Author) */
.note-footer {
    text-align: right;
    font-size: 0.9em;
}

.note-author {
    font-weight: 600;
    color: var(--strong-text-color);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .main-content-area {
        padding: 10px;
    }
    
    .game-content-wrapper {
        padding: 10px 10px 40px;
    }
}

@media (max-width: 600px) {
    .note-item.feed-item {
        padding: 15px;
    }
    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .note-date {
        margin-top: 5px;
    }
}