/* General Styles */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Header & Navigation */
.header {
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #eee;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #007bff;
    margin: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px; /* Spacing between buttons/switcher */
}

/* Main Content & Feed */
.main-content {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between create-post and posts-container */
}

/* Create Post Section */
.create-post {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.create-post textarea {
    width: calc(100% - 22px); /* Adjust for padding/border */
    min-height: 60px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 10px;
    font-size: 1em;
}

.create-post .post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Posts Container & Individual Posts */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #555;
}

.post-header strong {
    font-weight: bold;
    color: #333;
}

.post-content {
    margin-bottom: 10px;
    white-space: pre-wrap; /* Preserve line breaks */
}

.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Comments */
.comments {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.comment {
    font-size: 0.9em;
    margin-bottom: 5px;
    background-color: #f9f9f9;
    padding: 5px 8px;
    border-radius: 4px;
}

.comment strong {
    font-weight: bold;
}

/* Buttons */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-like, .btn-comment, .btn-delete, .btn-image {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.btn-like:hover, .btn-comment:hover, .btn-delete:hover, .btn-image:hover {
    background-color: #e0e0e0;
}

.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
    background-color: transparent;
}

.btn-delete:hover {
    background-color: #dc3545;
    color: white;
}

.btn-image span {
    display: inline-block;
    vertical-align: middle;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Dim background */
    display: flex; /* Use flexbox for centering */
    align-items: center; /* Vertical center */
    justify-content: center; /* Horizontal center */
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Centered */
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px; /* Limit max width */
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Auth Forms within Modal */
.auth-form h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: calc(100% - 22px); /* Account for padding/border */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.auth-form button {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

/* User Switcher */
.user-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-switcher select {
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Beta Badge */
.beta-badge {
    background-color: #28a745; /* Bootstrap success green */
    color: white;
    padding: 3px 6px;
    font-size: 0.75em;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: bold;
}