body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

main {
    padding: 1rem;
}

#reviews-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center; /* Center reviews horizontally */
}

#reviews-container .review {
    background: #fff;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px; /* Limit width */
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto; /* Center if container is wider */
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* smaller gap */
    margin-bottom: 0;
    font-size: 0.85rem; /* smaller base font size for all children */
}

.review-header .profile-picture {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.review-header .username {
    font-weight: 500;
    font-size: 0.95em;
    margin-right: 0.5rem;
    cursor: pointer;
}

.review-header .game-cover {
    width: 32px !important;
    height: 45px !important;
    border-radius: 4px;
    object-fit: cover;
    margin: 0 0.5rem 0 0;
}

.review-header .game-name {
    font-size: 0.95em;
    color: #000;
    font-weight: 500;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.review-header .time-ago {
    font-size: 0.85em;
    color: #888;
    margin-right: 0.5rem;
    white-space: nowrap;
}

#reviews-container .profile-picture {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

#reviews-container .review-content h3 {
    margin: 0;
    font-size: 1.2rem;
}

#reviews-container .review-content p {
    margin: 0.5rem 0;
    font-size: 1.15rem;
    line-height: 1.6;
    font-weight: 600;
    color: #222;
    letter-spacing: 0.1px;
}

#reviews-container .review-content p strong {
    font-weight: 800;
    color: #007BFF;
}

#load-more {
    display: block;
    margin: 1rem auto;
    padding: 0.5rem 1rem;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#load-more:hover {
    background-color: #0056b3;
}

#reviews-container .game-cover {
    width: 100px;
    height: 150px;
    border-radius: 5px;
    object-fit: cover;
    margin: 0.5rem 0;
}

#popular-games {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#popular-games h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #333;
}

#games-container {
    display: flex;
    gap: 1.5rem; /* Increased gap between games */
    overflow-x: auto; /* Enable horizontal scrolling */
    padding-bottom: 10px; /* Add padding for better visibility */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #007BFF #f4f4f4; /* For Firefox */
    scroll-behavior: smooth; /* Smooth scrolling */
    scroll-snap-type: x mandatory; /* Snap to items */
}

#games-container::-webkit-scrollbar {
    height: 8px; /* Set the height of the scrollbar */
}

#games-container::-webkit-scrollbar-thumb {
    background-color: #007BFF; /* Scrollbar thumb color */
    border-radius: 10px; /* Rounded scrollbar thumb */
}

#games-container::-webkit-scrollbar-track {
    background-color: #f4f4f4; /* Scrollbar track color */
}

#popular-games .game {
    flex: 0 0 auto;
    text-align: center;
    width: 120px;
}

#popular-games .game img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

#popular-games .game p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

#popular-games .games-list {
    gap: 15px;
    justify-content: center;
}

#popular-games .game-box {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 110px;
    height: 160px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 0; /* Ensure no padding */
    margin: 0;  /* Ensure no margin */
}

#popular-games .game-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

#popular-games .game-box a {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0 !important;
    margin: 0 !important;
    border: none;
    background: none;
}

#popular-games .game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0; /* Only .game-box should have border-radius */
    box-shadow: none;
    max-width:unset;
}

#popular-games .game-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 10px 10px;
}

#popular-games .game-box:hover .game-title-overlay {
    opacity: 1;
}

.review-tags {
    margin-top: 0;
    margin-bottom: 0; /* Changed from 0.5rem to 0 */
}

.tag {
    display: inline-block;
    background-color: #007BFF;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 5px;
    font-size: 12px;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: #0056b3;
}

.review-tags-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.review-rating {
    font-size: 0.95em;
    color: #f5b301;
    font-weight: bold;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.review-image {
    display: block;
    max-width: 350px;
    max-height: 250px;
    width: auto;
    height: auto;
    margin: 12px auto 0 auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

.review-footer {
    display: flex;
    justify-content: flex-start; /* Align items to the left */
    align-items: center;
    gap: 0.25rem; /* Reduce gap for compactness */
    margin-top: 0.5rem;
}

.like-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    padding: 5px 12px;
    font-size: 0.95em;
    margin-right: 0.25rem; /* Add space between button and like count */
}

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

.like-count {
    font-size: 0.95em;
    color: #555;
    margin-left: 0.25rem;
}

.review-quest {
    margin-top: 10px;
    background: #f9f9f9;
    border-radius: 7px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.review-quest h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: #007BFF;
}

.progress-bar-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 8px;
    height: 16px;
    margin: 5px 0;
}

.progress-bar {
    height: 100%;
    background-color: #4caf50;
    border-radius: 8px;
    transition: width 0.4s ease;
}

.review-task {
    margin-top: 8px;
    background: #f5f5f5;
    border-radius: 7px;
    padding: 8px 12px;
}

.task-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.task-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}
