/* 4Type specific styles - extends main.css */

body {
    overflow: auto !important;
}

#app {
    overflow: auto !important;
    height: auto !important;
    max-height: none !important;
}

.sidebar {
  width: 150px;
  flex: 0 0 150px;
  background-color: #111;
  color: #fff;
  padding: 5px 10px;
  box-sizing: border-box;
  background-image: url("/assets/images/sidebar.jpg");
  background-size: cover;
  background-repeat: no-repeat;
}

.content {
    overflow-y: auto;
    max-height: 100vh;
    width: 100%;
}

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

.alert-error {
    background-color: #ffe6e6;
    color: #cc0000;
    border-color: #cc0000;
}

.alert-success {
    background-color: #e6ffe6;
    color: #006600;
    border-color: #006600;
}

/* Upload Page */
.upload-page {
    max-width: 700px;
    margin: 0 auto;
}

.upload-container {
    background-color: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.upload-container h1 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #000;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-weight: 500;
    color: #000;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 12px;
    background-color: #fff;
    border: 1px solid #ccc;
    color: #000;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'NotoSans', sans-serif;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #f44;
}

.form-group small {
    color: #666;
    font-size: 11px;
}

.btn {
    padding: 10px 20px;
    border: 1px solid #0f0f0f;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'NotoSans', sans-serif;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(117, 117, 117, 0.15) 20%,
        rgba(92, 92, 92, 0.15) 60%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(41, 41, 41, 0.3) 100%
    );
    background-color: #f00;
    color: #fff;
}

.btn-primary:hover {
    background-color: #f44;
}

/* Feed Page */
.feed-page {
    padding: 0;
}

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

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.feed-header h2 {
    font-size: 24px;
    color: #000;
    margin: 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.post-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: #f44;
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-media {
    position: relative;
    width: 100%;
    background-color: #000;
    overflow: hidden;
}

.post-media video,
.post-media img {
    width: 100%;
    height: auto;
    display: block;
}

.post-media video {
    max-height: 400px;
    object-fit: contain;
}

.audio-placeholder {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.audio-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.audio-placeholder p {
    color: #fff;
    font-size: 12px;
    margin: 0;
    word-break: break-all;
}

.text-preview {
    padding: 40px 20px;
    background-color: #f5f5f5;
    color: #000;
    font-size: 14px;
    line-height: 1.6;
    max-height: 300px;
    overflow: hidden;
    text-align: left;
}

.post-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.post-info {
    padding: 12px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(117, 117, 117, 0.15) 20%,
        rgba(92, 92, 92, 0.15) 60%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(41, 41, 41, 0.3) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: #fff;
    border: 1px solid #0f0f0f;
    flex-shrink: 0;
}

.username {
    font-weight: 500;
    color: #000;
    font-size: 14px;
}

.post-caption {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
}

/* View Page */
.view-page {
    padding: 0;
}

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

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    gap: 10px;
}

.nav-btn {
    padding: 10px 20px;
    border: 1px solid #0f0f0f;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'NotoSans', sans-serif;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(117, 117, 117, 0.15) 20%,
        rgba(92, 92, 92, 0.15) 60%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(41, 41, 41, 0.3) 100%
    );
    background-color: #f00;
    color: #fff;
    flex: 1;
    max-width: 150px;
}

.nav-btn:hover {
    background-color: #f44;
}

.nav-btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-btn-feed {
    max-width: 120px;
    flex: 0 0 auto;
}

.post-view {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
}

.post-media-full {
    width: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.post-media-full video,
.post-media-full img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
}

.audio-player-container {
    width: 100%;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.audio-info h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.audio-player-container audio {
    width: 100%;
    max-width: 500px;
}

.text-content-full {
    padding: 40px;
    background-color: #f5f5f5;
    color: #000;
    font-size: 16px;
    line-height: 1.8;
    white-space: pre-wrap;
    min-height: 200px;
}

.post-details {
    padding: 20px;
}

.post-header {
    margin-bottom: 16px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(117, 117, 117, 0.15) 20%,
        rgba(92, 92, 92, 0.15) 60%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(41, 41, 41, 0.3) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    color: #fff;
    border: 1px solid #0f0f0f;
    flex-shrink: 0;
}

.username-large {
    font-weight: 500;
    color: #000;
    font-size: 16px;
}

.post-date {
    font-size: 12px;
    color: #666;
}

.post-caption-full {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ddd;
}

.post-caption-full p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-like {
    padding: 8px 16px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(117, 117, 117, 0.15) 20%,
        rgba(92, 92, 92, 0.15) 60%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(41, 41, 41, 0.3) 100%
    );
    background-color: #f00;
    color: #fff;
    border: 1px solid #0f0f0f;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'NotoSans', sans-serif;
    transition: background-color 0.2s;
}

.btn-like:hover {
    background-color: #f44;
}

.post-stats-full {
    font-size: 14px;
    color: #666;
}

/* Comments Section */
.comments-section {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 20px !important;
    margin-top: 20px !important;
}

.comments-section h3 {
    font-size: 15px !important;
    color: #000 !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #ddd !important;
}

.comments-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    align-items: flex-start !important;
}

.comments-list-wrapper {
    flex: 1 1 60% !important;
    min-width: 0 !important;
}

.comment-form-container {
    flex: 0 0 300px !important;
    padding: 15px !important;
    background-color: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    position: sticky !important;
    top: 20px !important;
}

.comment-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.comment-form .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.comment-form .form-group label {
    font-weight: 500 !important;
    color: #000 !important;
    font-size: 14px !important;
}

.comment-form .form-group input,
.comment-form .form-group textarea {
    padding: 10px 12px !important;
    background-color: #fff !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-family: 'NotoSans', sans-serif !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.comment-form .form-group input:focus,
.comment-form .form-group textarea:focus {
    border-color: #f44 !important;
}

.comments-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    max-height: 500px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px !important;
    background-color: #f5f5f5 !important;
    border: 5px solid #ddd !important;
    border-radius: 4px !important;
    margin: 0 !important;
}

.comments-list::-webkit-scrollbar {
    width: 8px !important;
}

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 4px !important;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

.no-comments {
    color: #666 !important;
    font-style: italic !important;
    text-align: center !important;
    padding: 20px !important;
    margin: 0 !important;
}

.comment-item {
    padding: 12px 16px !important;
    background-color: #fff !important;
    border-radius: 4px !important;
    border-left: 3px solid #f44 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    display: block !important;
}

.comment-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
}

.comment-username {
    font-weight: 500 !important;
    color: #000 !important;
    font-size: 14px !important;
    display: inline-block !important;
}

.comment-date {
    font-size: 11px !important;
    color: #666 !important;
    display: inline-block !important;
}

.comment-text {
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    word-wrap: break-word !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Related Posts */
.related-posts {
    margin-top: 30px;
}

.related-posts h3 {
    font-size: 20px;
    color: #000;
    margin-bottom: 16px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.related-post-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: #f44;
}

.related-media {
    width: 100%;
    background-color: #000;
    overflow: hidden;
}

.related-media video,
.related-media img {
    width: 100%;
    height: auto;
    display: block;
}

.related-audio-placeholder,
.related-text-placeholder {
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 24px;
}

.related-text-placeholder {
    background: #f5f5f5;
    color: #000;
    font-size: 14px;
    font-weight: bold;
}

.related-info {
    padding: 10px;
}

.related-username {
    font-size: 12px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

.related-caption {
    font-size: 11px;
    color: #666;
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #000;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .upload-container {
        padding: 20px;
    }
}

