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

:root {
    --bg: #fafaf9;
    --surface: #ffffff;
    --border: #e5e5e5;
    --text: #1c1917;
    --text-muted: #78716c;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --success: #16a34a;
    --error: #dc2626;
    --radius: 8px;
}

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;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

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

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--text);
}

/* Main */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Hero */
.hero {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.hero h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-muted);
}

/* Quote */
.quote-section {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}

.quote-section p {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.quote-section cite {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Form */
.form-section {
    margin: 2rem 0;
}

.form-section h3 {
    margin-bottom: 1rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

input, textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

button {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    align-self: flex-start;
}

button:hover {
    background: var(--accent-hover);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Feedback */
.feedback {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.feedback.success {
    color: var(--success);
}

.feedback.error {
    color: var(--error);
}

.hidden {
    display: none;
}

/* Messages */
.messages-section {
    margin: 2rem 0;
}

.messages-section h3 {
    margin-bottom: 1rem;
}

#message-count {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
}

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

.message-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-card .author {
    font-weight: 600;
}

.message-card .date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.message-card .content {
    color: var(--text);
    line-height: 1.5;
}

.loading {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.empty {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* Stats */
.stats-section {
    margin-top: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

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

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.site-footer p {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

/* About */
main h2 {
    margin-bottom: 1rem;
}

main h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

main ul {
    padding-left: 1.5rem;
}

main li {
    margin-bottom: 0.5rem;
}

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