/* Common styles used across all pages */

/* Base styles */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    max-width: 1068px;
    margin: auto;
}

/* Common post card styles */
.post-card {
    background: #fff;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.post-card h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.4;
}

.post-card p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.post-card img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-top: 10px;
}

.content-body img {
    max-width: 100%;
    height: auto !important;
}

/* Common date info styles */
.post-date-info {
    color: #95a5a6;
    font-size: 12px;
}

.post-date-info i {
    margin-right: 5px;
}

/* Related posts common styles */
.related-post-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 7px;
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.related-post-image-container {
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 6px;
    height: 120px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image {
    transform: scale(1.05);
}

#thread-title {
    margin-top: 15px;
    margin-bottom: 10px;
    padding: 0px 10px;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 600;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#thread-title .fa {
    color: #3498db;
    -webkit-text-fill-color: #3498db;
}

.related-post-no-image {
    color: #6c757d;
    font-size: 24px;
}

.related-post-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-description {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Common tag styles */
.tag-link {
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag-link:hover {
    text-decoration: none;
    transform: scale(1.05);
    background-color: #3498db !important;
    color: white !important;
}

/* Common social sharing styles */
.social-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.2s;
}

.social-icon:hover {
    transform: scale(1.1);
}

/* Common loading styles */
#loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 14px;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Thread list styles */
.thread-item {
    padding: 10px 15px;
    margin-bottom: 5px;
    /* background: rgba(255, 255, 255, 0.1); */
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ecf0f1;
}

.thread-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.thread-item.active {
    font-weight: 600;
    color: yellow;
}

.thread-item i {
    margin-right: 8px;
    color: #3498db;
}

/* Responsive styles */
@media (max-width: 768px) {
    .post-card {
        margin: 10px;
        padding: 15px;
    }

    .post-card h4 {
        font-size: 18px;
    }

    .post-card p {
        font-size: 13px;
    }

    .related-post-image-container {
        height: 100px;
    }

    .related-post-title {
        font-size: 15px;
    }

    .related-post-description {
        font-size: 13px;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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