/* Post View Layout */
.post-view-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: calc(100vh - 80px);
}

.post-view-main {
    min-width: 0;
}

.post-view-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.post-view-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-view-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.post-view-author {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.back-btn:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    transform: translateX(-2px);
}

.post-view-content {
    animation: fadeSlideUp 0.3s ease;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-view-content .post-card {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #1e2024;
}

.post-view-content .post-main {
    padding: 20px;
}

.post-view-content .post-avatar {
    width: 48px;
    height: 48px;
}

.post-view-content .post-display-name {
    font-size: 16px;
}

.post-view-content .post-content {
    font-size: 16px;
    line-height: 1.6;
    margin: 16px 0;
}

.post-view-content .post-media img,
.post-view-content .post-media video {
    border-radius: 12px;
    max-height: 600px;
}

/* Comments Section Improvements */
.post-view-content .comments-section {
    display: block;
    max-height: none;
    padding: 20px;
    opacity: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

.post-view-content .comments-section.expanded {
    max-height: none;
}

.post-view-content .comments-list {
    max-height: none;
    overflow-y: visible;
}

.post-view-content .comment-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}

.post-view-content .comment-item:last-child {
    margin-bottom: 0;
}

/* Author Profile Sidebar */
.post-view-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.post-author-card {
    background: #1e2024;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    animation: fadeSlideUp 0.3s ease 0.1s both;
}

.author-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.author-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(251, 191, 36, 0.2);
}

.author-card-info {
    flex: 1;
    min-width: 0;
}

.author-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-card-username {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.author-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.author-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 4px;
}

.author-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.author-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.author-card-btn svg {
    width: 16px;
    height: 16px;
}

.author-card-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
}

.post-view-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    animation: fadeSlideUp 0.3s ease;
}

.post-view-error svg {
    width: 72px;
    height: 72px;
    color: rgba(251, 191, 36, 0.4);
    margin-bottom: 20px;
}

.post-view-error h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.post-view-error p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 28px;
}

.error-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #fbbf24;
    color: #000;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.error-home-btn:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.25);
}

/* Tablet and Mobile */
@media (max-width: 1024px) {
    .post-view-layout {
        grid-template-columns: 1fr;
        padding: 16px;
        padding-bottom: 100px;
    }
    
    .post-view-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .post-view-header {
        margin-bottom: 16px;
    }
    
    .post-view-title h1 {
        font-size: 18px;
    }
    
    .back-btn {
        width: 36px;
        height: 36px;
    }
    
    .back-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .post-view-content .post-main {
        padding: 16px;
    }
    
    .post-view-content .post-avatar {
        width: 42px;
        height: 42px;
    }
    
    .post-view-content .post-content {
        font-size: 15px;
    }
    
    .post-view-content .comments-section {
        padding: 16px;
    }
}
