/* mmmCorp Forum — Minimal Responsive CSS */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-muted: #666;
    --border: #e0e0e0;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --radius: 6px;
    --max-width: 720px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header / Nav */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
}

/* Main content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1rem;
    flex: 1;
    width: 100%;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
}

/* Post cards (home feed) */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.post-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.post-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.post-card h2 a:hover {
    color: var(--accent);
}

.post-preview {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.reply-count {
    background: var(--bg);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

/* Full post view */
.post-full {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.post-full h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.post-body {
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 1rem;
    line-height: 1.7;
}

/* Reply section */
.reply-section {
    margin-top: 1rem;
}

.reply-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.reply-section h3 {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
}

/* Threaded replies */
.thread {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reply {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}

.reply-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    display: flex;
    gap: 0.75rem;
}

.depth-indicator {
    opacity: 0.5;
}

.reply-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.5;
    background: var(--surface);
    color: var(--text);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

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

/* Error messages */
.error {
    background: var(--error-bg);
    color: var(--error);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #fecaca;
}

/* Empty state */
.empty {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 1rem;
}

.empty a {
    color: var(--accent);
}

.depth-limit {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

/* Pagination */
.post-list + .btn {
    margin-top: 1rem;
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    main {
        padding: 1rem 0.75rem;
    }
    .post-full {
        padding: 1rem;
    }
    .reply {
        padding: 0.5rem 0.75rem;
    }
}
