/* Import base styles */
@import url('home-styles.css');

/* Sharing Platform Specific Styles */
.sharing-platform {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Content Layout */
.content-layout {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: rgba(20, 20, 30, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* Sidebar Tabs */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.sidebar-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-tab.active {
    background: rgba(100, 150, 255, 0.2);
    color: #64a6ff;
    border-bottom: 2px solid #64a6ff;
}

/* Sidebar Sections */
.sidebar-section {
    display: none;
    padding: 20px;
}

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

.section-header {
    margin-bottom: 20px;
}

.section-header h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(15, 15, 25, 0.8);
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 30px;
    background: rgba(25, 25, 35, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item:first-child {
    color: #64a6ff;
    font-weight: 500;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Content Sections */
.content-section {
    display: none;
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

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

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    color: #fff;
    font-size: 2rem;
    margin: 0 0 10px 0;
}

.content-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin: 0;
}

/* Categories List */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(100, 150, 255, 0.3);
}

.category-item.active {
    background: rgba(100, 150, 255, 0.2);
    border-color: #64a6ff;
}

.category-header {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-name {
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
}

.category-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.category-icon {
    color: #64a6ff;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.category-item.expanded .category-icon {
    transform: rotate(90deg);
}

.category-posts {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.category-item.expanded .category-posts {
    max-height: 500px;
}

.post-item {
    padding: 10px 15px 10px 35px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.post-item.active {
    background: rgba(100, 150, 255, 0.15);
    border-left: 3px solid #64a6ff;
}

.post-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.post-meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Posts Container - Removed as posts are now in dropdown */

/* Post Detail */
.post-detail {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    min-height: 400px;
}

.post-detail-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-detail-title {
    color: #fff;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
}

.post-detail-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-detail-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 1rem;
}

.post-detail-content h1,
.post-detail-content h2,
.post-detail-content h3 {
    color: #fff;
    margin: 20px 0 10px 0;
}

.post-detail-content p {
    margin: 0 0 15px 0;
}

.post-detail-content a {
    color: #64a6ff;
    text-decoration: none;
}

.post-detail-content a:hover {
    text-decoration: underline;
}

.post-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.post-detail-content pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

.post-detail-content code {
    background: rgba(100, 150, 255, 0.2);
    color: #64a6ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Create Post Form */
.create-post-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #64a6ff;
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Category Input Container */
.category-input-container {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 48px;
    /* Fixed height to ensure consistency */
}

.category-input-container input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 15px;
}

.category-dropdown-btn {
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
}

.category-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(100, 150, 255, 0.3);
}

.category-dropdown-btn.active {
    background: rgba(100, 150, 255, 0.2);
    border-color: #64a6ff;
}

.category-dropdown-btn i {
    transition: transform 0.3s ease;
}

.category-dropdown-btn.active i {
    transform: rotate(180deg);
}

/* Category Dropdown */
.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 5px;
}

.category-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
}

.dropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.selected {
    background: rgba(100, 150, 255, 0.2);
    color: #64a6ff;
}

.dropdown-item i {
    color: #64a6ff;
    font-size: 0.9rem;
}

.dropdown-item .category-name {
    flex: 1;
}

.dropdown-item .category-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.dropdown-footer {
    padding: 12px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-style: italic;
}

/* Content Editor */
.content-editor {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.toolbar-btn:hover {
    background: rgba(100, 150, 255, 0.3);
    border-color: #64a6ff;
}

.language-selector select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.language-selector select option {
    background: #1a1a2e;
    color: #fff;
}

.editor-content {
    min-height: 200px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
    overflow-y: auto;
}

.editor-content:empty:before {
    content: attr(placeholder);
    color: rgba(255, 255, 255, 0.5);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Post Actions */
.post-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Create Post Preview */
.create-post-preview {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.preview-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-header h3 {
    color: #fff;
    margin: 0;
}

.preview-content {
    padding: 25px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    min-height: 400px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(25, 25, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    color: #fff;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.warning-text {
    color: #ff6b6b;
    font-weight: 500;
    margin: 10px 0 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 300px;
    }

    .content-area {
        min-height: calc(100vh - 380px);
    }

    .breadcrumb {
        padding: 10px 20px;
    }

    .content-section {
        padding: 20px;
    }

    .sidebar-tabs {
        flex-direction: column;
    }

    .sidebar-tab {
        padding: 12px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Mobile dropdown adjustments */
    .category-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
        max-height: 60vh;
        z-index: 1001;
    }

    .dropdown-list {
        max-height: 40vh;
    }
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #64a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.3);
}

.empty-state h3 {
    color: #fff;
    margin: 0 0 10px 0;
}

.empty-state p {
    margin: 0;
    font-size: 0.95rem;
}