body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.welcome-text {
    font-size: 28px;
    font-weight: 600; /* Slightly bolder for Poppins */
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.container {
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    width: 640px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.community-card,
.chat-bubble,
.highlight-section {
    width: 100%; /* Ensure these elements take full width of the container */
}

.community-card {
    margin-bottom: 2rem;
}
.community-banner {
    position: relative;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
}
.community-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}
.community-avatar {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 80px;
    height: 80px;
    border-radius: 25px;
    border: 1px solid #f4f4f4;
    object-fit: cover;
}

.member-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}
.community-info {
    position: absolute;
    bottom: 10px;
    left: 100px;
    right: 10px;
}

.community-title {
    font-weight: 600; /* Slightly bolder for Poppins */
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #ffffff;
}

.community-description {
    font-weight: 300; /* Lighter weight for description */
    margin: 0;
    font-size: 14px;
    color: #cccccc;
}
.chat-bubble {
    background-color: #2c2c2c;
    border-radius: 18px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    text-align: left;
}
.chat-bubble::after {
    content: '';
    position: absolute;
    left: 20px;
    bottom: -10px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #2c2c2c transparent;
}
.inviter-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.5rem;
}
.inviter-name {
    font-weight: bold;
    color: #ffffff;
}
.chat-message {
    margin: 0;
    color: #cccccc;
}
.btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.1s;
    margin: 1rem auto 2rem; /* Center horizontally and add vertical margins */
    display: block; /* Allows margin auto to work */
    width: fit-content; /* Adjust width to content */
}
.btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}
.btn:active {
    transform: translateY(0);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #4CAF50;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    margin-top: 20px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 300;
}

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

/* HOT POSTS */
.highlight-section {
    margin-top: 2rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.highlight-title {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    text-align: center;
}

.post-list {
    opacity: 0.7;
    transition: opacity 0.3s ease;
    padding: 0; /* Remove default padding */
    margin: 0; /* Remove default margin */
    list-style-type: none; /* Remove default list styling */
}

.post-list:hover {
    opacity: 1;
}

.post-item {
    display: flex;
    background-color: rgba(44, 44, 44, 0.6);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    transition: background-color 0.3s;
}

.post-item:hover {
    background-color: rgba(56, 56, 56, 0.8);
}

.post-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}

.post-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgba(68, 68, 68, 0.5);
}

.post-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-text, .post-link {
    font-size: 13px;
    color: rgba(204, 204, 204, 0.8);
    margin: 0 0 0.75rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-link {
    color: rgba(76, 175, 80, 0.9);
    text-decoration: none;
}

.post-link:hover {
    text-decoration: underline;
}

.post-author-info {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: rgba(153, 153, 153, 0.8);
    margin-top: auto;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Responsive design for smaller screens */
@media (max-width: 600px) {
    .post-item {
        flex-direction: column;
    }

    .post-thumbnail {
        width: 100%;
        height: 160px;
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .post-title {
        white-space: normal;
    }
}