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

:root {
    --primary: #1e3a8a;
    --secondary: #3b82f6;
    --dark: #0f172a;
    --darker: #020617;
    --light: #cbd5e1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    color: var(--light);
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 40px;
    text-align: center;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 15px;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transition: width 0.3s ease;
    z-index: -1;
    border-radius: 15px;
}

.nav-item:hover:before {
    width: 100%;
}

.nav-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.nav-item i {
    margin-right: 15px;
    font-size: 20px;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.admin-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 8px 15px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.3);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 30px;
    min-height: 100vh;
}

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

/* Cards */
.card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--light);
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    background: rgba(30, 58, 138, 0.3);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: var(--light);
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 13px;
}

/* Post Card */
.post-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid var(--secondary);
}

.post-user-info {
    flex: 1;
}

.post-username {
    font-weight: bold;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.verified-badge {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.post-time {
    font-size: 13px;
    color: #94a3b8;
}

.post-content {
    margin: 15px 0;
    line-height: 1.6;
}

.post-image {
    width: 100%;
    border-radius: 15px;
    margin: 15px 0;
}

.post-actions {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 10px;
}

.post-action:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.post-action.liked {
    color: var(--danger);
}

/* Comments */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(30, 58, 138, 0.2);
    border-radius: 12px;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
}

.comment-content {
    flex: 1;
}

.comment-username {
    font-weight: bold;
    margin-bottom: 5px;
}

/* Profile */
.profile-header {
    text-align: center;
    padding: 30px;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--secondary);
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.profile-username {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.profile-bio {
    color: #94a3b8;
    margin-bottom: 20px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary);
}

.stat-label {
    font-size: 14px;
    color: #94a3b8;
}

/* Admin Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.stat-card-number {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-card-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: rgba(30, 58, 138, 0.5);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--secondary);
}

.table td {
    padding: 15px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.table tr:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #6ee7b7;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--warning);
    color: #fcd34d;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--dark);
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.modal-header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: var(--light);
}

/* Search */
.search-box {
    position: relative;
    margin-bottom: 30px;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: rgba(30, 58, 138, 0.3);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    color: var(--light);
    font-size: 15px;
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    color: white;
}

/* Notifications */
.notification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(30, 58, 138, 0.2);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: rgba(30, 58, 138, 0.4);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.2);
    border-left: 4px solid var(--secondary);
}

.notification-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
}

.notification-content {
    flex: 1;
}

.notification-time {
    font-size: 12px;
    color: #94a3b8;
}

/* Messages */
.messages-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: calc(100vh - 100px);
}

.conversations-list {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    padding: 20px;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.conversation-item:hover {
    background: rgba(59, 130, 246, 0.2);
}

.conversation-item.active {
    background: rgba(59, 130, 246, 0.3);
}

.chat-window {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 15px;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.message-sent {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message-received {
    background: rgba(30, 58, 138, 0.5);
    border-bottom-left-radius: 5px;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 18px;
    background: rgba(30, 58, 138, 0.3);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: var(--light);
}

/* Login/Register Pages */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 25px;
    max-width: 450px;
    width: 100%;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.auth-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #94a3b8;
}

.auth-link a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }
    
    .sidebar .nav-item span {
        display: none;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .main-content {
        margin-left: 80px;
        padding: 15px;
    }
    
    .messages-container {
        grid-template-columns: 1fr;
    }
    
    .conversations-list {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top: 4px solid var(--secondary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.badge-admin {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.badge-verified {
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
}

.badge-banned {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Hashtag */
.hashtag {
    color: var(--secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hashtag:hover {
    color: var(--light);
    text-decoration: underline;
}