/* General Hidden Class */
.hidden {
    display: none !important;
}

/* Make the bottom visible from footer */
body {
    margin-bottom: 100px;
}
/* Popup Container */
#popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure the popup is on top of everything */
}

/* Popup Content */
#popup-content {
    background-color: #ffffff; /* Clean white background */
    padding: 30px;
    border-radius: 12px; /* Smooth rounded corners */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* Strong shadow for better focus */
    max-width: 600px; /* Limit width */
    width: 90%; /* Responsive for smaller screens */
    max-height: 80vh; /* Constrain height */
    overflow-y: auto; /* Scrollable if content exceeds height */
    font-family: "Arial", sans-serif;
    position: relative; /* To position the close button */
}

/* Popup Heading */
#popup-content h3 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #444;
    border-bottom: 1px solid #eee; /* Subtle underline */
    margin-bottom: 15px;
    padding-bottom: 10px;
}

/* Close Button */
#popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4d4d; /* Red close button for attention */
    border: none;
    color: white;
    border-radius: 50%; /* Circular button */
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#popup-close:hover {
    background-color: #ff0000; /* Darker red on hover */
    transform: scale(1.1); /* Slight zoom effect */
}

/* Hover Effects for Popup Items */
#popup-content ul li {
    margin-bottom: 10px;
    padding: 15px;
    background-color: #f9f9f9; /* Slight background for items */
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: box-shadow 0.2s ease-in-out;
}

#popup-content ul li:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Subtle shadow on hover */
}

/* Subjects Container */
#CQ_Preview_Subjects {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Spacing between subjects */
    padding: 20px;
    background-color: #f7f7f7; /* Subtle background color */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Slight shadow for separation */
}

/* Individual Subject Card */
.CQ_Preview_Subject {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between sections in the subject */
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* Light shadow for a modern look */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; /* Smooth hover effects */
}

/* Hover Effect for Subject */
.CQ_Preview_Subject:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Stronger shadow on hover */
}

/* Subject Title */
.CQ_Preview_Subject_Title h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee; /* Subtle underline */
}

/* Subject Description */
.CQ_Preview_Subject_Description p {
    font-size: 1rem;
    color: #555;
    margin: 0;
    line-height: 1.5; /* Better readability */
}

/* View Questions Button */
.CQ_Preview_Subject_ShowQuestions {
    align-self: flex-start; /* Align button to the left */
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.CQ_Preview_Subject_ShowQuestions:hover {
    background-color: #0056b3;
    transform: translateY(-2px); /* Slight lift on hover */
}

/* Questions Container */
#questions-1 {
    margin-top: 15px;
}

/* Individual Question Container */
.CQ_Preview_Question {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px; /* Spacing between sections */
}

/* Question Title */
.CQ_Preview_Question_Title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    color: #333;
}

/* Question Description */
.CQ_Preview_Question_Description {
    font-size: 1rem;
    color: #555;
    margin: 5px 0 10px;
    line-height: 1.5;
}

/* Votes Section */
.CQ_Preview_Question_Votes {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa; /* Light background */
    border: 1px solid #ccc;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #444;
}

/* Upvotes and Downvotes */
.CQ_Preview_Question_Votes span {
    display: inline-block;
    margin: 0 10px;
}

/* Answer Button */
.CQ_Preview_Question_ShowAnswer {
    align-self: flex-start; /* Align button to the start */
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.CQ_Preview_Question_ShowAnswer:hover {
    background-color: #218838;
}

/* Responsive Design */
@media (max-width: 768px) {
    #CQ_Preview_Subjects {
        padding: 10px;
    }

    .CQ_Preview_Subject {
        padding: 10px;
    }

    .CQ_Preview_Subject_Title h2 {
        font-size: 1.2rem;
    }

    .CQ_Preview_Subject_Description p {
        font-size: 0.9rem;
    }

    .CQ_Preview_Subject_ShowQuestions {
        font-size: 0.9rem;
    }

    .CQ_Preview_Question {
        padding: 10px;
    }

    .CQ_Preview_Question_Title {
        font-size: 1.1rem;
    }

    .CQ_Preview_Question_Description {
        font-size: 0.9rem;
    }

    .CQ_Preview_Question_Votes {
        font-size: 0.8rem;
    }

    #popup-content {
        max-width: 90%;
        max-height: 70vh;
    }

    #popup-content h3 {
        font-size: 1.5rem;
    }

    #popup-close {
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }
}
