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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header h1 {
    display: inline-block;
    margin-right: 2rem;
}

header nav {
    display: inline-block;
}

header nav a,
header nav span {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
}

header nav a:hover {
    text-decoration: underline;
}

/* Main content */
main {
    min-height: 60vh;
}

/* Notice banner */
.notice {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 1rem;
}

.flash {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

/* Content grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Sections */
section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* Message form */
.message-form {
    margin-bottom: 1.5rem;
}

.message-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.message-form button {
    margin-top: 0.5rem;
    padding: 0.5rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.message-form button:hover {
    background-color: #2980b9;
}

/* Messages list */
.messages-list {
    max-height: 500px;
    overflow-y: auto;
}

.message-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.message-item:last-child {
    border-bottom: none;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-header strong {
    color: #2c3e50;
}

.timestamp {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.message-content {
    color: #34495e;
    white-space: pre-wrap;
}

/* Posts */
.post-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.post-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.75rem;
}

.post-content {
    color: #34495e;
    white-space: pre-wrap;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-container h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-container button {
    width: 100%;
    padding: 0.75rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.form-container button:hover {
    background-color: #2980b9;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
    color: #7f8c8d;
}

.form-footer a {
    color: #3498db;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Empty states */
.empty-state {
    text-align: center;
    color: #7f8c8d;
    padding: 2rem;
}

.login-prompt {
    text-align: center;
    padding: 1rem;
    background-color: #e8f4f8;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.login-prompt a {
    color: #3498db;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 3rem;
}

footer p {
    margin: 0;
}
