:root {
    --primary-color: #0a66c2;
    --primary-hover: #004182;
    --bg-color: #f3f2ef;
    --card-bg: #ffffff;
    --text-color: #1d1d1d;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --success-color: #057642;
    --error-color: #d11124;
    --shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 4px rgba(0, 0, 0, 0.3);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Fira Sans", Ubuntu, Oxygen, "Oxygen Sans", Cantarell, "Droid Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Lucida Grande", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Nav */
header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo span {
    background-color: var(--primary-color);
    color: white;
    padding: 0 4px;
    border-radius: 4px;
}

/* Layout */
main {
    flex: 1;
    max-width: 1128px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Card Component */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

/* Typography */
h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    font-size: 1rem;
}

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

button, .btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(10, 102, 194, 0.1);
}

/* Post Styling */
.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 48px;
    height: 48px;
    background-color: #ddd;
    border-radius: 50%;
}

.post-author {
    font-weight: 700;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-content {
    font-size: 1rem;
    white-space: pre-wrap;
    margin-bottom: 1.5rem;
}

.post-actions {
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    text-align: center;
    margin-top: auto;
}

footer span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Login/Register Wrapper */
.wrapper {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.input-box {
    position: relative;
    margin-bottom: 1rem;
}

.input-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.register-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.outcome-msg {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-weight: 600;
}

.outcome-success {
    background-color: #e6f4ea;
    color: var(--success-color);
}

.outcome-fail {
    background-color: #fce8e6;
    color: var(--error-color);
}
