.post-actions {
    position: relative;
}
.delete-btn {
    position: absolute;
    right: 0.7rem;
    bottom: 0.5rem;
    background: none;
    border: none;
    color: #ff5555;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    box-shadow: none;
    z-index: 5;
}
.delete-btn:hover, .delete-btn:focus {
    background: rgba(255,85,85,0.08);
    color: #fff;
}
/* --- Instagram-style Comments Section --- */
.comments-section {
    margin-top: 18px;
    background: #23272a;
    border-radius: 10px;
    padding: 18px 16px 10px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.comment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5865f2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    flex-shrink: 0;
}

.comment-content {
    background: #2c2f33;
    border-radius: 8px;
    padding: 10px 14px 8px 14px;
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.comment-username {
    font-weight: 600;
    color: #fff;
    font-size: 1em;
}

.comment-time {
    color: #b9bbbe;
    font-size: 0.85em;
}

.comment-body {
    color: #e4e6eb;
    font-size: 1em;
    word-break: break-word;
}

.comment-actions {
    margin-top: 4px;
}

.reply-btn {
    background: none;
    border: none;
    color: #5865f2;
    cursor: pointer;
    font-size: 0.95em;
    margin-left: 0;
    padding: 0;
}

.reply-form {
    margin-top: 8px;
    margin-left: 48px;
}

.reply-list {
    margin-left: 48px;
    margin-top: 8px;
    border-left: 2px solid #5865f2;
    padding-left: 12px;
}

#addCommentForm {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
}


#commentInput {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    background: #23272a;
    color: #fff;
    border: 1px solid #36393f;
    border-radius: 6px;
    padding: 10px;
    resize: vertical;
    font-size: 1em;
    transition: border 0.2s, background 0.2s;
    margin-bottom: 0;
}

#commentInput:focus {
    border: 1.5px solid #5865f2;
    outline: none;
    background: #2c2f33;
}

#addCommentForm button {
    background: linear-gradient(90deg, #5865f2 60%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

#addCommentForm button:hover {
    background: linear-gradient(90deg, #4752c4 60%, #5f3fa2 100%);
}
/* --- Staff Panel Input & Button Styling --- */
#staffPanel, #staffLoginForm {
    background: #23272a;
    border-radius: 10px;
    padding: 32px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    color: #fff;
    max-width: 420px;
    margin: 32px auto 0 auto;
}

#staffPanel label, #staffLoginForm label {
    color: #b9bbbe;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

#staffPanel input, #staffPanel textarea, #staffLoginForm input {
    width: 100%;
    background: #2c2f33;
    color: #fff;
    border: 1px solid #36393f;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 14px;
    font-size: 1em;
    transition: border 0.2s, background 0.2s;
}

#staffPanel input:focus, #staffPanel textarea:focus, #staffLoginForm input:focus {
    border: 1.5px solid #5865f2;
    outline: none;
    background: #23272a;
}

#staffPanel button, #staffLoginForm button {
    background: linear-gradient(90deg, #5865f2 60%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 8px;
    margin-top: 4px;
}

#staffPanel button:hover, #staffLoginForm button:hover {
    background: linear-gradient(90deg, #4752c4 60%, #5f3fa2 100%);
}

#staffSuccessMessage, #staffErrorMessage {
    background: #23272a;
    color: #43b581;
    border-left: 4px solid #43b581;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    margin-top: 4px;
    font-size: 1em;
    display: none;
}

#staffErrorMessage {
    color: #f04747;
    border-left-color: #f04747;
}
/* Verified Badge Image */
.verified-badge-img {
    display: inline-block;
    height: 1em;
    width: 1em;
    margin-left: 4px;
    vertical-align: middle;
    object-fit: contain;
}
/* Discord-themed CipherWeb Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #36393f;
    color: #dcddde;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    background: #2f3136;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #202225;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #202225;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

.logo i {
    color: #5865f2;
    font-size: 1.5rem;
}

.sidebar-content {
    flex: 1;
    padding: 1rem 0;
}

.user-info {
    padding: 0 1rem 1rem;
    border-bottom: 1px solid #202225;
    margin-bottom: 1rem;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.user-details h4 {
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.user-details span {
    color: #b9bbbe;
    font-size: 0.8rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #b9bbbe;
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 4px;
    margin: 0 0.5rem;
}

.nav-item:hover {
    background: #36393f;
    color: #dcddde;
}

.nav-item.active {
    background: #5865f2;
    color: #ffffff;
}

.nav-item i {
    width: 20px;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #202225;
}

/* Modern, Instagram-like post actions */
.post-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    background: transparent;
    border-radius: 0.5rem;
    padding: 0.25rem 0 0 0;
    justify-content: flex-start;
    align-items: center;
}

.post-actions button {
    background: none;
    border: none;
    color: #b9bbbe;
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}
.post-actions button:hover, .post-actions button:focus {
    background: rgba(88,101,242,0.08);
    color: #5865f2;
}
.post-actions .liked {
    color: #e1306c;
}

.post-card {
    position: relative;
}
.post-tags {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #5865f2;
    display: flex;
    gap: 0.3rem;
    z-index: 2;
}

.btn-icon:hover {
    background: #36393f;
    color: #dcddde;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    background: #36393f;
    padding: 1rem;
    border-bottom: 1px solid #202225;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b9bbbe;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    background: #40444b;
    border: 1px solid #202225;
    border-radius: 4px;
    color: #dcddde;
    font-size: 0.9rem;
}

.search-container input:focus {
    outline: none;
    border-color: #5865f2;
}

.top-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background: #5865f2;
    color: #ffffff;
}

.btn-primary:hover {
    background: #4752c4;
}

.btn-secondary {
    background: #40444b;
    color: #dcddde;
}

.btn-secondary:hover {
    background: #36393f;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Posts Container */
.posts-container {
    max-width: 600px;
    margin: 0 auto;
}

.post-card {
    background: #40444b;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s;
}

.post-card:hover {
    background: #42464d;
}

.post-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #202225;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.post-user-info h4 {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.post-user-info span {
    color: #b9bbbe;
    font-size: 0.8rem;
}

.post-content {
    padding: 1rem;
}

.post-text {
    color: #dcddde;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.post-media {
    margin-bottom: 1rem;
}

.post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 4px;
}

.post-video {
    width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

.video-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    border-radius: 4px;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #5865f2;
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    text-decoration: none;
}

.tag:hover {
    background: #4752c4;
    color: #ffffff;
}

.post-actions {
    padding: 0.75rem 1rem;
    border-top: 1px solid #202225;
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: #b9bbbe;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #36393f;
    color: #dcddde;
}

.action-btn.liked {
    color: #f04747;
}

/* No Posts State */
.no-posts {
    text-align: center;
    padding: 3rem;
    color: #b9bbbe;
}

.no-posts i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #40444b;
}

/* Explore Section */
.explore-content {
    max-width: 600px;
    margin: 0 auto;
}

.explore-content h2 {
    color: #ffffff;
    margin-bottom: 2rem;
    text-align: center;
}

.trending-tags,
.suggested-users {
    background: #40444b;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.trending-tags h3,
.suggested-users h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #36393f;
    border-radius: 4px;
}

.user-suggestion-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-suggestion-info h4 {
    color: #ffffff;
    font-size: 0.9rem;
}

.user-suggestion-info span {
    color: #b9bbbe;
    font-size: 0.8rem;
}

.btn-follow {
    background: #5865f2;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-follow:hover {
    background: #4752c4;
}

/* Profile Section */
.profile-content {
    max-width: 600px;
    margin: 0 auto;
}

.profile-header {
    background: #40444b;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.profile-header h2 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.profile-header .username {
    color: #b9bbbe;
    margin-bottom: 1rem;
}

.profile-bio {
    color: #dcddde;
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
}

.stat-label {
    font-size: 0.8rem;
    color: #b9bbbe;
}

/* Messages Section */
.messages-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem;
}

.messages-content h2 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.coming-soon {
    color: #b9bbbe;
    font-size: 1.1rem;
}

/* 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.8);
}

.modal-content {
    background: #36393f;
    margin: 2% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #202225;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #ffffff;
    font-size: 1.2rem;
}

.close-modal {
    background: none;
    border: none;
    color: #b9bbbe;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: #40444b;
    color: #dcddde;
}

.modal-body {
    padding: 1rem;
}

/* Create Post Form */
.post-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.post-type-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #40444b;
    background: #40444b;
    color: #b9bbbe;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.post-type-btn:hover {
    background: #36393f;
    color: #dcddde;
}

.post-type-btn.active {
    background: #5865f2;
    color: #ffffff;
    border-color: #5865f2;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: #b9bbbe;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: #40444b;
    border: 1px solid #202225;
    border-radius: 4px;
    color: #dcddde;
    font-size: 0.9rem;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5865f2;
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.photo-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
    }
    
    .sidebar-content {
        flex: 1;
        padding: 0.5rem;
    }
    
    .sidebar-nav {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .nav-item {
        margin: 0;
        flex: 1;
        justify-content: center;
        padding: 0.5rem;
    }
    
    .nav-item span {
        display: none;
    }
    
    .main-content {
        height: calc(100vh - 80px);
    }
    
    .top-bar {
        padding: 0.5rem;
    }
    
    .search-container {
        max-width: 200px;
    }
    
    .content-area {
        padding: 0.5rem;
    }
    
    .posts-container,
    .explore-content,
    .profile-content,
    .messages-content {
        max-width: none;
    }
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    margin-bottom: 2rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.back-link {
    margin-top: 2rem;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Admin Dashboard Styles */
.admin-header {
    background: #343a40;
    color: white;
    padding: 1rem 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.admin-main {
    padding: 2rem 0;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.post-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
}

.posts-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-post-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-post-item:last-child {
    border-bottom: none;
}

.admin-post-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.admin-post-meta {
    color: #666;
    font-size: 0.9rem;
}

.admin-post-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

