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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    color: #1a1a1a;
}

/* Navigation */
.navbar {
    background: #1877f2;
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-search input {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    width: 250px;
    font-size: 14px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.2);
}

.badge {
    background: #e41e3f;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 5px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.col-8 {
    flex: 2;
    min-width: 300px;
}

.col-4 {
    flex: 1;
    min-width: 250px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Create Post */
.create-post textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

.post-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-actions button {
    background: #1877f2;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* Post */
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.post-author {
    font-weight: bold;
    font-size: 16px;
}

.post-time {
    font-size: 12px;
    color: #65676b;
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-image img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

.post-stats {
    padding: 10px 0;
    border-top: 1px solid #e4e6eb;
    border-bottom: 1px solid #e4e6eb;
    margin-bottom: 10px;
    font-size: 14px;
    color: #65676b;
    display: flex;
    gap: 20px;
}

.post-buttons {
    display: flex;
    gap: 10px;
}

.post-buttons button {
    flex: 1;
    padding: 8px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #65676b;
    transition: background 0.3s;
}

.post-buttons button:hover {
    background: #f0f2f5;
}

.post-buttons button.active {
    color: #1877f2;
}

/* Reaction dropdown */
.reaction-dropdown {
    position: relative;
    flex: 1;
}

.reaction-btn {
    width: 100%;
}

.reaction-options {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border-radius: 40px;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    z-index: 10;
}

.reaction-dropdown:hover .reaction-options {
    display: flex;
    gap: 5px;
}

.reaction-options a {
    padding: 8px 12px;
    text-decoration: none;
    font-size: 20px;
    transition: transform 0.2s;
}

.reaction-options a:hover {
    transform: scale(1.2);
}

/* Comments */
.comments-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e4e6eb;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.comment-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

.comment-form button {
    background: #1877f2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
}

/* Admin Panel */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #1a1a2e;
    color: white;
    padding: 20px;
}

.admin-sidebar h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin-bottom: 10px;
}

.admin-sidebar a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.admin-sidebar a:hover {
    background: rgba(255,255,255,0.1);
}

.admin-content {
    flex: 1;
    padding: 20px;
    background: #f0f2f5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 32px;
    color: #1877f2;
    margin-bottom: 10px;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.data-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.actions a {
    color: #1877f2;
    text-decoration: none;
    margin-right: 10px;
    font-size: 12px;
}

.actions a.danger {
    color: #e41e3f;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.badge.admin {
    background: #e41e3f;
    color: white;
}

.badge.moderator {
    background: #ff9800;
    color: white;
}

.badge.user {
    background: #4caf50;
    color: white;
}

.badge.banned {
    background: #f44336;
    color: white;
}

.badge.active {
    background: #4caf50;
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

button[type="submit"] {
    background: #1877f2;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

button[type="submit"]:hover {
    background: #166fe5;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1877f2;
}

.login-container .card {
    width: 400px;
    padding: 30px;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.error {
    background: #fee;
    color: #e41e3f;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-success {
    background: #e8f5e9;
    color: #4caf50;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        margin: 5px;
    }
    
    .row {
        flex-direction: column;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
}