/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    color: #1c1e21;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.navbar {
    background: #1877f2;
    padding: 10px 0;
    color: white;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

input, textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}

button {
    background: #1877f2;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
}

/* Posts */
.post {
    background: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.post img {
    max-width: 100%;
    margin: 10px 0;
}

.comments {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
}

/* Messages */
.messages-container {
    display: flex;
    background: white;
    margin: 20px 0;
    border-radius: 8px;
}

.conversation {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Admin Panel */
.stats-section table {
    width: 100%;
    border-collapse: collapse;
}

.stats-section td, .stats-section th {
    padding: 8px;
    border: 1px solid #ddd;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

/* Utility Classes */
.error {
    color: red;
    margin-bottom: 10px;
}

.success-message {
    color: green;
    margin-bottom: 10px;
}

/* Messages Styles */
.messages-container {
    display: flex;
    height: calc(100vh - 60px);
    margin: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.conversations-list {
    width: 350px;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.conversation {
    display: flex;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.conversation:hover {
    background-color: #f0f2f5;
}

.conversation.active {
    background-color: #e7f3ff;
}

.conversation img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.conversation-info {
    flex: 1;
}

.conversation-info h3 {
    margin-bottom: 5px;
    color: #050505;
}

.last-message {
    color: #65676b;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-thread {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.thread-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
}

.message {
    max-width: 60%;
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
}

.message.sent {
    background-color: #0084ff;
    color: #fff;
    margin-left: auto;
}

.message.received {
    background-color: #e4e6eb;
    color: #050505;
}

.message .time {
    font-size: 0.75em;
    color: #65676b;
    margin-top: 5px;
    display: block;
}

.message-input {
    padding: 20px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

#message-form {
    display: flex;
    gap: 10px;
}

#message-content {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

button:hover {
    background-color: #0073e6;
}

/* User Actions Styles */
.user-actions-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.modal h2 {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Admin Panel Styles */
.admin-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.stats-section,
.reports-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.period-selector {
    margin: 20px 0;
}

.period-selector a {
    padding: 8px 16px;
    margin-right: 10px;
    text-decoration: none;
    color: #1c1e21;
    border-radius: 20px;
    background-color: #e4e6eb;
}

.period-selector a.active {
    background-color: #0084ff;
    color: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

/* Profile Pictures */
.profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-picture.large {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: block;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.post-header .profile-picture {
    flex-shrink: 0;
}

.comment .profile-picture {
    width: 32px;
    height: 32px;
    margin-right: 10px;
} 