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

body {
    font-family: Arial, sans-serif;
    background-color: #fafafa;
}

.navbar {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #dbdbdb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand h2 {
    color: #262626;
}

.nav-search input {
    padding: 0.5rem;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    width: 200px;
}

.nav-links a {
    margin-left: 1rem;
    text-decoration: none;
    color: #262626;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-form {
    background: white;
    padding: 2rem;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    width: 350px;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
}

.auth-form button {
    width: 100%;
    padding: 0.75rem;
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.main-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.profile-card {
    background: white;
    padding: 2rem;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    text-align: center;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
}

.btn-follow {
    background: #0095f6;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
}

.post-card {
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    margin-bottom: 2rem;
}

.post-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-id {
    margin-left: auto;
    font-size: 0.8rem;
    color: #8e8e8e;
}

.post-image {
    width: 100%;
    height: auto;
}

.post-actions {
    padding: 1rem;
}

.like-btn {
    text-decoration: none;
    color: #262626;
}

.like-btn.liked {
    color: #ed4956;
}

.post-caption {
    padding: 0 1rem 1rem;
}

.comment {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.comment-form {
    padding: 1rem;
    display: flex;
    gap: 1rem;
}

.comment-form input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
}

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

.settings-section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    border: 1px solid #dbdbdb;
    text-align: left;
}

.flash-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 3px;
}

.delete-post {
    color: #ed4956;
    text-decoration: none;
}

/* Admin Specific Styles */
.admin-nav {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.admin-nav-btn {
    padding: 10px 20px;
    background: #0095f6;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.admin-nav-btn.active {
    background: #007acc;
}

.admin-nav-btn:hover {
    background: #007acc;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.status-admin {
    color: #d63031;
    font-weight: bold;
}

.status-public {
    color: #00b894;
    font-weight: bold;
}

.status-private {
    color: #fdcb6e;
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-reset, .btn-toggle, .btn-delete, .btn-chats {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-reset {
    background: #74b9ff;
    color: white;
}

.btn-toggle {
    background: #a29bfe;
    color: white;
}

.btn-delete {
    background: #ff7675;
    color: white;
}

.btn-chats {
    background: #55efc4;
    color: white;
}

.no-actions {
    color: #999;
    font-style: italic;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 5px;
    width: 400px;
    max-width: 90%;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: black;
}

.btn-confirm, .btn-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin: 5px;
    font-size: 14px;
}

.btn-confirm {
    background: #00b894;
    color: white;
}

.btn-cancel {
    background: #dfe6e9;
    color: #2d3436;
}

/* Chat Management Styles */
.chat-management {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 20px;
}

.users-section, .chat-partners-section {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.users-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    padding: 10px;
    border: 1px solid #eee;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.user-item:hover {
    background: #f5f5f5;
}

.user-item.selected {
    background: #0095f6;
    color: white;
    border-color: #0095f6;
}

.partners-list {
    max-height: 400px;
    overflow-y: auto;
}

.partner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #eee;
    margin: 5px 0;
    border-radius: 3px;
    background: #fafafa;
}

.btn-view-chat {
    background: #00b894;
    color: white;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    border: none;
    cursor: pointer;
}

.btn-view-chat:hover {
    background: #00a085;
}

.no-selection, .no-partners, .error {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Chat View Styles */
.chat-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn-back {
    background: #636e72;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
}

.btn-back:hover {
    background: #2d3436;
}

.chat-container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
}

.messages-container {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-height: 600px;
    overflow-y: auto;
}

.message {
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    max-width: 70%;
}

.message-sent {
    background: #0095f6;
    color: white;
    margin-left: auto;
}

.message-received {
    background: #f1f1f1;
    color: #333;
    margin-right: auto;
}

.message-deleted-everyone {
    background: #ffcccc;
    border: 2px dashed #e74c3c;
}

.message-deleted-partial {
    background: #ffeaa7;
    border: 2px dashed #e67e22;
}

.message-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.message-status {
    font-size: 10px;
    margin-top: 5px;
    font-weight: bold;
}

.status-deleted {
    color: #e74c3c;
}

.status-partial {
    color: #e67e22;
}

.status-active {
    color: #00b894;
}

.status-detail {
    color: #666;
    font-weight: normal;
}

.chat-info {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    height: fit-content;
}

.info-item {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 3px;
    border-left: 4px solid #0095f6;
}

.no-messages {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Admin Login Section */
.admin-login {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dbdbdb;
}

.admin-login h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-search input {
        width: 100%;
    }

    .nav-links {
        display: flex;
        gap: 1rem;
    }

    .nav-links a {
        margin-left: 0;
    }

    .main-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chat-management {
        grid-template-columns: 1fr;
    }

    .chat-container {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 4px;
    }
}

/* Button hover effects */
.btn-reset:hover { background: #0984e3; }
.btn-toggle:hover { background: #6c5ce7; }
.btn-delete:hover { background: #d63031; }
.btn-chats:hover { background: #00b894; }

/* Form enhancements */
.auth-form input:focus {
    outline: none;
    border-color: #0095f6;
}

.comment-form input:focus {
    outline: none;
    border-color: #0095f6;
}

/* Scrollbar styling */
.users-list::-webkit-scrollbar,
.partners-list::-webkit-scrollbar,
.messages-container::-webkit-scrollbar {
    width: 6px;
}

.users-list::-webkit-scrollbar-track,
.partners-list::-webkit-scrollbar-track,
.messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.users-list::-webkit-scrollbar-thumb,
.partners-list::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.users-list::-webkit-scrollbar-thumb:hover,
.partners-list::-webkit-scrollbar-thumb:hover,
.messages-container::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Flash message variants */
.flash-message.error {
    background: #f8d7da;
    color: #721c24;
}

.flash-message.warning {
    background: #fff3cd;
    color: #856404;
}

.flash-message.info {
    background: #d1ecf1;
    color: #0c5460;
}
/* Notification badges */
.nav-link-with-badge {
    position: relative;
    display: inline-block;
}

.nav-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
}

/* Create post form */
.create-post-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dbdbdb;
    border-radius: 10px;
}

.create-post-form {
    max-width: 500px;
}

.create-post-form .form-group {
    margin-bottom: 15px;
}

.create-post-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #262626;
}

.create-post-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #dbdbdb;
    border-radius: 5px;
}

.create-post-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dbdbdb;
    border-radius: 5px;
    resize: vertical;
    font-family: Arial, sans-serif;
}

.btn-post {
    background: #0095f6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-post:hover {
    background: #007acc;
}

/* Follow/Unfollow buttons */
.btn-follow {
    background: #0095f6;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.btn-unfollow {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.btn-following {
    background: #00b894;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}

.btn-requested {
    background: #fdcb6e;
    color: #2d3436;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}
