.social-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
}

.social-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.social-tabs {
    display: flex;
    gap: 0.25rem;
}

.social-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.social-tab:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.social-tab.active {
    background: var(--primary);
    color: white;
}

.social-tab svg {
    width: 18px;
    height: 18px;
}

.btn-new-post {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-new-post:hover {
    background: var(--primary-hover);
}

.social-layout {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    gap: 1rem;
    flex: 1;
    padding: 1rem;
    overflow: hidden;
}

.social-sidebar,
.social-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.sidebar-section {
    background: var(--surface);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.75rem 0;
}

.social-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.post-composer {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.composer-avatar .avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
}

.composer-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.composer-input:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
}

.composer-actions {
    display: flex;
    gap: 0.25rem;
}

.composer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.composer-btn:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

.post-card {
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

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

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

.post-meta {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.875rem;
}

.post-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.post-content {
    padding: 0 1rem 1rem;
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
}

.reactions {
    display: flex;
    gap: 0.5rem;
}

.reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

.post-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.post-actions button:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

.comments-section {
    border-top: 1px solid var(--border);
    padding: 1rem;
}

.empty-feed {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-placeholder {
    height: 60px;
    background: linear-gradient(
        90deg,
        var(--bg) 25%,
        var(--surface-hover) 50%,
        var(--bg) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.empty-state {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
    margin: 0;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

.btn-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.modal-body {
    padding: 1rem;
}

.post-author-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.post-author-row .avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.visibility-select {
    padding: 0.25rem 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
}

.post-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.15s ease;
}

.post-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.post-textarea::placeholder {
    color: var(--text-secondary);
}

.post-attachments {
    margin-top: 0.75rem;
}

.poll-creator {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
}

.poll-question {
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.poll-question:focus {
    outline: none;
    border-color: var(--primary);
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.poll-options input {
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
}

.poll-options input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-add-option {
    padding: 0.5rem;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-add-option:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.post-options {
    margin-top: 0.75rem;
}

.community-select {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
}

.post-tools {
    display: flex;
    gap: 0.25rem;
}

.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.tool-btn:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

.btn-post {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-post:hover {
    background: var(--primary-hover);
}

.btn-post:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 1200px) {
    .social-layout {
        grid-template-columns: 220px 1fr;
    }
    .social-right-sidebar {
        display: none;
    }
}

@media (max-width: 900px) {
    .social-layout {
        grid-template-columns: 1fr;
    }
    .social-sidebar {
        display: none;
    }
}

@media (max-width: 600px) {
    .social-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    .social-tabs {
        width: 100%;
        overflow-x: auto;
    }
    .social-tab span {
        display: none;
    }
    .btn-new-post span {
        display: none;
    }
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}
