/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* --base-url: "<?= $QA_BASEURL ?>";
    --loader-bg: url("<?= $QA_BASEURL ?>assets/images/loader.gif");
    --logo-img: url("<?= $QA_BASEURL ?>assets/images/bookMark_unclicked.png");
    --logo-img-clicked: url("<?= $QA_BASEURL ?>assets/images/bookMark_clicked.gif");
    --dark-logo-img: url("<?= $QA_BASEURL ?>assets/images/dark_bookMark_unclicked.png"); */

    --primary-color: #40a944;
    --secondary-color: #89ff6b;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --navbar-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --second-nav: #f3f4f5;
    /* --logo-img: url("<?= $QA_BASEURL ?>/assets/images/bookMark_unclicked.png");
    --logo-img: url("<?= $QA_BASEURL ?>/assets/images/bookMark_clicked.gif"); */
   
}

.dark-theme {
    --primary-color: #40a944;
    --secondary-color: #89ff6b;
    --text-color: #f0f0f0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --navbar-bg: #1e1e1e;
    --shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
    --second-nav: #1e1e1e;
    /* --logo-img: url("<?= $QA_BASEURL ?>/assets/images/dark_bookMark_unclicked.png");
    --logo-img: url("<?= $QA_BASEURL ?>/assets/images/bookMark_clicked.gif"); */
    --logo-img: var(--dark-logo-img);
}


body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    margin: 0px !important;
    font-family: "Noto Sans", sans-serif !important;
}

.main-p-container {
    width: 88%;
    margin: 0 auto;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.sidebar {
    width: 30%;
    min-width: 300px;
}

.content-area {
    flex: 1;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fa-sun {
    color: #f9d71c;
}

.fa-moon {
    color: #85A947;
}

/* Carousel Section */
.carousel-section {
    padding: 30px 0;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    flex: 0 0 100%;
    min-height: 300px;
    background: linear-gradient(135deg, #85A947, #9DC45F);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-align: left;
    padding: 40px;
    pointer-events: none;
    /* Make the entire item non-clickable */
}

/* Re-enable pointer events for buttons */
.carousel-item button {
    pointer-events: auto;
}

/* New carousel action section for item1 */
.carousel-action {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    padding-right: 40px;
    padding-left: 0;
}

.carousel-image {
    display: flex;
    margin-right: 8%;
    justify-content: center;
}

.carousel-image svg {
    width: 150px;
    height: 150px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

/* Action button for first card */
.action-btn {
    background-color: white;
    color: #1a5fd6;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 200px;
}

.action-btn:hover {
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1000px;
}

.carousel-text {
    flex: 0 0 50%;
    padding-right: 40px;
}

.carousel-text h3 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: bold;
}

.carousel-text p {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
}


/* Gradient backgrounds for carousel items */
#item1 {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
}

#item2 {
    background: linear-gradient(135deg, #f3c806, #f3ef13d7);
    color: white;
}

#item1 .carousel-content {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Update carousel-text for item1 */
#item1 .carousel-text {
    flex: 0 0 50%;
    padding-right: 40px;
    z-index: 1;
}

/* Enhanced certificate buttons */
.certificate-buttons {
    flex: 0 0 50%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-left: 40px;
    width: 100%;
}

.cert-btn {
    pointer-events: auto !important;
    cursor: pointer;
    background: #2a2a2a;
    color: white;
    border: 2px solid #444;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.cert-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.cert-btn:hover::before {
    left: 100%;
}

.cert-btn:hover {
    background: #3a3a3a;
    border-color: #555;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.cert-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cert-btn img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}



/* Update carousel-text for item2 */
#item2 .carousel-text {
    flex: 0 0 50%;
    padding-right: 40px;
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}



.carousel-indicators {
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--primary-color);
}

/* Prepare by Topic and Language Sections */
.prepare-section {
    padding: 40px 0;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-color);
    text-align: left;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
    /* display: inline-block;  */
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 0;
    background-color: var(--primary-color);
     transition: width 0.4s ease;
}

.section-title:hover{
    cursor: pointer;
}

.section-title:hover::after {
    width: 100%; /* Expand to full width on hover */
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.topic-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

.topic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.topic-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.topic-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.topic-desc {
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #64748b;
    
}

.topic-level {
    font-size: 14px;
    color: #777;
    margin-bottom: 8px;
}

.topic-problems {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    background-color: rgba(6, 208, 1, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    margin-top: 5px;
}

.dark-theme .topic-problems {
    background-color: rgba(157, 196, 95, 0.2);
}

/* Highlight effect for Java item in the grid */
#prepare-by-language .topic-item:nth-child(1) {
    background-color: rgba(240, 240, 245, 0.3);
}

/* Preparing Kits Styles */
.kits-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.kit-card {
    background: linear-gradient(135deg, #430981, #a71bca);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 250px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.kit-card:before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    z-index: 1;
}

.kit-card:after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.kit-card:nth-child(2) {
    background: linear-gradient(135deg, #e71d6b, #a82a3b);
}

.kit-card:nth-child(3) {
    background: linear-gradient(135deg, #218b45, #0d9b25);
}

.kit-content {
    padding: 30px 20px 20px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    z-index: 2;
}

.kit-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
}

.kit-content p {
    margin-bottom: 20px;
    font-size: 14px;
    opacity: 0.9;
    text-align: center;
}

.kit-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    align-self: center;
    margin-top: auto;
}

.kit-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Cards Styles */
.cards-section {
    padding: 40px 0;
}

.cards-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card:hover .card-image {
    transform: translateY(-5px);
}

/* Gradient backgrounds for cards */
#card1 {
    background: linear-gradient(135deg, #ff6eff, rgb(27, 25, 25));
}

#card2 {
    background: linear-gradient(135deg, #0051ff, rgb(27, 25, 25));
}

#card3 {
    background: linear-gradient(135deg, #00f897, rgb(27, 25, 25));
}

.card-content {
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    z-index: 1;
}

.card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: white;
    font-weight: 600;
}

.card p {
    margin-bottom: 20px;
    font-size: 15px;
    opacity: 0.9;
    color: white;
    max-width: 70%;
}

.card-image {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 110px;
    height: 100px;
    transition: var(--transition);
    z-index: 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.1) rotate(5deg);
}

.card-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    z-index: 1;
}

.card-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.page-header {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    position: relative;
}

/* Responsive Styles */
@media (max-width: 992px) {

    .cards-container {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 15px;
        overflow-x: auto;
        padding: 0 10px;
    }

    .card {
        flex: 1;
        min-width: 220px;
        max-width: none;
        margin-bottom: 0;
        min-height: 250px;
    }

    .card-content {
        justify-content: space-around;
    }

    .card p {
        max-width: 100%;
        margin-bottom: 20px;
        font-size: 14px;
    }

    .card-image {
        bottom: 15px;
        right: 15px;
        width: 90px;
        height: 85px;
    }

    .card-btn {
        width: auto;
        padding: 8px 15px;
    }

    .carousel-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .carousel-text {
        flex: 0 0 50%;
        padding-right: 20px;
    }

    .carousel-action {
        flex-direction: column;
        align-items: flex-end;
    }

    .carousel-image {
        margin-right: 8%;
        transform: scale(0.9);
    }

    .certificate-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .cards-container {
        flex-direction: column;
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 0;
    }

    .card {
        flex: none;
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
        min-height: 200px;
    }

    .card p {
        max-width: 70%;
    }

    .card-image {
        width: 80px;
        height: 75px;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-text h3 {
        font-size: 24px;
    }

    .carousel-text p {
        font-size: 16px;
    }

    .carousel-image svg {
        width: 120px;
        height: 120px;
    }

    .action-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Maintain desktop layout with adjusted dimensions */
    .carousel-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .carousel-text {
        flex: 0 0 50%;
    }
}

@media (max-width: 576px) {
    .main-p-container {
        width:92%;
    }
    
    .container {
        padding: 0px 10px;

    }

    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .carousel-container {
        height: auto;
    }

    #item1 .carousel-content {
        height: auto;
        flex-direction: column;

    }

    #item1 .carousel-text {
        padding: 0px 15px;
        margin-bottom: 0px;
    }

    #item2 .carousel-text {
        padding-right: 0px;
        margin-bottom: 10px;
    }

    #item1 .carousel-action {

        gap: 10px;
        padding-right: 0px;
    }

    .carousel-item {
        height: auto;
        min-height: 350px;
        padding: 28px 10px;
    }

    /* Maintain desktop layout with adjusted dimensions */
    .carousel-content {
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }

    .carousel-text {
        flex: 0 0 55%;
        padding-right: 10px;
    }

    .carousel-text h3 {
        font-size: 25px;
        margin-bottom: 10px;
    }

    .carousel-text p {
        padding: 0px 10px;
        font-size: 14px;
        line-height: 1.4;
    }

    .carousel-image svg {
        width: 90px;
        height: 90px;
    }

    .action-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 150px;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .topic-item {
        padding: 15px 10px;
    }

    .topic-icon {
        font-size: 30px;
        margin-bottom: 10px;
    }

    .topic-name {
        font-size: 16px;
    }

    .topic-level,
    .topic-problems {
        font-size: 12px;
    }

    .certificate-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 5px 20px;
    }

    .cert-btn {
        padding: 10px 5px;
        font-size: 12px;
    }

    .cert-btn img {
        width: 20px;
        height: 20px;
        margin-right: 5px;
    }

    .card {
        margin-bottom: 10px;
        min-height: 150px;
    }

    .card-content {
        padding: 10px 20px;
    }
}

@media (max-width: 450px) {


    .carousel-content {
        flex-direction: column;
        flex-wrap: wrap;
    }

    .carousel-text {
        flex: 0 0 100%;
        padding-right: 0;
        margin-bottom: 15px;
        text-align: center;
    }

    .carousel-image {
        margin: 0 auto;
        transform: scale(0.85);
    }

    .carousel-action {
        flex: 0 0 100%;
        align-items: center;
        margin-top: 15px;
    }

    .action-btn {
        min-width: 180px;
    }

    .certificate-buttons {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .topic-item {
        padding: 10px 8px;
    }

    .topic-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .topic-name {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .topic-level,
    .topic-problems {
        font-size: 11px;
    }
}

.prep-section {
    padding: 25px 0;
    margin-bottom: 40px;
}

.prep-section .prep-section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 60px;
    font-family: 'Poppins', sans-serif;
}

.prep-kits-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.prep-kit-card {
    flex: 1;
    position: relative;
    min-width: 300px;
    height: 200px;
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(44, 36, 36, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-theme .prep-kit-card {
    background: linear-gradient(145deg, #2a2a2a 0%, #222222 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.prep-kit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Decorative holes */
.prep-kit-card:before {
    content: "";
    z-index: 99;
    position: absolute;
    top: -10px;
    left: 32px;
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 16px;
    background: rgba(44, 36, 36, 0.1);
}

.prep-kit-card:after {
    content: "";
    z-index: 99;
    position: absolute;
    bottom: -10px;
    left: 32px;
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 16px;
    background: rgba(44, 36, 36, 0.1);
}

.dark-theme .prep-kit-card:before,
.dark-theme .prep-kit-card:after {
    background: #171717;
}

.prep-kit-card:hover:before,
.prep-kit-card:hover:after {
    background: rgba(255, 255, 255, 0.9);
}

.dark-theme .prep-kit-card:hover:before,
.dark-theme .prep-kit-card:hover:after {
    background: #171717;
}

/* Spiral binding dots */
.prep-kit-card ul {
    z-index: 99;
    position: absolute;
    left: 41px;
    top: 5px;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.prep-kit-card ul li {
    width: 2px;
    height: 2px;
    border-radius: 2px;
    margin: 6px 0;
    background: #333;
}

/* Content positioning - Fixed for better visibility */
.prep-kit-content {
    position: absolute;
    z-index: 100;
    top: 20px;
    left: 75px;
    right: 100px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.prep-kit-content h3 {
    font-family: "Poppins", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    transition: all 0.3s ease;
    z-index: 555;
}

.dark-theme .prep-kit-content h3 {
    color: #f0f0f0;
}

.prep-kit-content p {
    font-size: 14px;
    color: #161616;
    line-height: 1.4;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 555;
    margin: 0;
}

.dark-theme .prep-kit-content p {
    color: #ddd;
}

/* Icon styles */
.prep-kit-icon {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 80px;
    height: 80px;
    object-fit: contain;
    z-index: 102;
    transition: all 0.3s ease;
    filter: brightness(0.7);
}

.prep-kit-card:hover .prep-kit-icon {
    transform: rotate(5deg) scale(1.1);
}

.prep-kit-card:hover .prep-kit-content h3 {
    color: #fff;
}

.prep-kit-card:hover .prep-kit-content p {
    color: #fff;
    opacity: 1;
}

/* Background decoration */
.prep-kit-card .prep-kit-decoration {
    flex: 1;
    z-index: 1;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(145deg, #ffffff 0%, #ece4e4 100%);
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.dark-theme .prep-kit-card .prep-kit-decoration {
    background: linear-gradient(145deg, #333 0%, #c9c9c9 100%);
}

.prep-kit-card:hover .prep-kit-decoration {
    filter: grayscale(0);
    background: linear-gradient(45deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Tablet Portrait (768px - 1024px) - NEW BREAKPOINT */
@media (max-width: 1024px) and (min-width: 769px) {
    .prep-section {
        padding: 30px 20px;
    }

    .prep-section .prep-section-title {
        font-size: 2.8rem;
        margin-bottom: 50px;
    }

    .prep-kits-container {
        gap: 15px;
        width: auto;
        margin: 0 auto;
    }

    .prep-kit-card {
        width: 100%;
        max-width: 550px;
        height: 180px;
        min-width: unset;
    }

    .prep-kit-content {
        top: 15px;
        left: 70px;
        right: 90px;
        bottom: 15px;
    }

    .prep-kit-content h3 {
        margin-top: 6px;
        font-size: 17px;
        width: 120px;

    }

    .prep-kit-content p {
        font-size: 9px;
        margin-top: 6px;
        width: 120px;
    }

    .prep-kit-icon {
        width: 70px;
        height: 70px;
        right: 12px;
        bottom: 12px;
    }
}

@media (max-width: 768px) {
    .prep-section {
        padding: 30px 20px;
    }

    .prep-section .prep-section-title {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }

    .prep-kits-container {
        gap: 20px;
        flex-direction: row;
    }

    .prep-kit-card {
        width: 100%;
        max-width: 450px;
        height: 160px;
        min-width: unset;
        margin: 0 auto;
    }

    .prep-kit-content {
        top: 15px;
        left: 60px;
        right: 80px;
        bottom: 15px;
    }

    .prep-kit-content h3 {
        font-size: 20px;
    }

    .prep-kit-content p {
        font-size: 11px;
        margin-top: 4px;
    }

    .prep-kit-icon {
        width: 60px;
        height: 60px;
        right: 12px;
        bottom: 12px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .prep-section {
        padding: 25px 0px;
    }

    .prep-kits-container {
        display: block;

    }


    .prep-section .prep-section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .prep-kit-card {
        width: 100%;
        height: 140px;
        margin: 15px auto;
        max-width: 350px;
    }

    .prep-kit-content {
        top: 12px;
        left: 50px;
        right: 60px;
        bottom: 12px;
    }

    .prep-kit-content h3 {
        font-size: 18px;
    }

    .prep-kit-content p {
        font-size: 10px;
        margin-top: 3px;
    }

    .prep-kit-icon {
        width: 70px;
        height: 75px;
        right: 10px;
        bottom: 10px;
    }

    .prep-kit-card ul {
        left: 35px;
    }

    .prep-kit-card:before,
    .prep-kit-card:after {
        left: 28px;
        width: 16px;
        height: 16px;
    }

    .prep-kit-card ul li {
        width: 2px;
        height: 2px;
        border-radius: 2px;
        margin: 3.5px 0;
        background: #333;
    }

    .mobile-only {
        display: block;
    }
}

/* Very Small Mobile Phones */
@media (max-width: 360px) {
    .prep-section .prep-section-title {
        font-size: 1.8rem;
    }

    .prep-kit-card {
        height: 130px;
    }

    .prep-kit-content {
        left: 45px;
        right: 55px;
    }

    .prep-kit-content h3 {
        font-size: 16px;
    }

    .prep-kit-content p {
        font-size: 9px;
    }

    .prep-kit-icon {
        width: 45px;
        height: 45px;
    }

    .prep-kit-card ul {
        left: 32px;
    }

    .prep-kit-card:before,
    .prep-kit-card:after {
        left: 25px;
        width: 14px;
        height: 14px;
    }
}


/* Problem Cards Container */
.problem-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 auto;
}

/* Individual Problem Card */
.problem-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #e0e0e0;
    gap: 5rem;
}

.problem-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Left side - Problem name and difficulty */
.problem-left {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
}

.problem-name,
.problem-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    white-space: normal;
    letter-spacing: 0.5px;
}

/* Difficulty Tags */
.difficulty-tag,
.problem-difficulty {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background-color: rgba(0, 0, 0, 0.027);
}

.difficulty-tag.basic,
.problem-difficulty.basic {
    color: #3b89e3;
    background: #3b89e317;
}

.difficulty-tag.easy,
.problem-difficulty.easy {
    color: #00b8a3;
    background: #00b8a321;
}

.difficulty-tag.medium,
.problem-difficulty.medium {
    color: #f9a825;
    background: #f9a82521;
}

.difficulty-tag.hard,
.problem-difficulty.hard {
    color: #f5576c;
    background: #f5576c24;
}

/* Right side - Topics, accuracy, and favorite */
.problem-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.problem-topics {
    display: flex;
    gap: 8px;
    position: relative;
}

.topic-tag,
.problem-tag {
    background-color: rgba(133, 169, 71, 0.1);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* .accuracy {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    min-width: 50px;
    text-align: center;
} */

.accuracy,
.submission,.total_accuracy, .total_submission { 
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    min-width: 50px;
    background: rgba(133, 169, 71, 0.1);
    text-align: center;
    padding: 4px 8px;
    border-radius: 6px;
}

.tippy-box { z-index: 999999 !important; }


.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    background-image: var(--logo-img);
    ;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.bookmark-icon {
    width: 25px;
    height: 30px;
    object-fit: contain;
}

/* For placement and master certificate pages */
.problem-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.problem-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.problem-description {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.4;
    margin: 0;
}

.problem-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.problem-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.solve-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.solve-btn:hover {
    background-color: #369739;
    transform: translateY(-1px);
}

.favorite-btn i {
    font-size: 18px;
    color: #ccc;
    transition: color 0.2s ease;
}

.favorite-btn:hover i,
.favorite-btn.active i {
    color: #ff4757;
}

/* No Problems Message */
.no-problems {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 16px;
  margin: 40px 0;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.no-problems::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

.no-problems-content {
  position: relative;
  z-index: 2;
}

.no-problems-title {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.no-problems-subtitle {
  font-size: 16px;
  color: #5a6c7d;
  margin: 0 0 30px 0;
  line-height: 1.6;
  max-width: 500px;
}

.no-problems-action {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.action-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.action-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Dark Mode Support */
body.dark-mode .no-problems {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .no-problems-title {
  color: #e0e0e0;
}

body.dark-mode .no-problems-subtitle {
  color: #a0a0a0;
}


/* Responsive Design for Problem Cards */
@media (max-width: 992px) {
    .problem-cards {
        gap: 10px;
    }

    .problem-card {
        padding: 12px 16px;
    }

    .problem-right {
        gap: 12px;
    }

    .problem-topics,
    .problem-tags {
        gap: 4px;
    }
}

@media (max-width: 768px) {
    .problem-card {
        padding: 12px 10px;
        /* Keep single line format */
    }

    .problem-name,
    .problem-title {
        font-size: 14px;
    }

    .problem-right {
        gap: 12px;
    }

    .topic-tag,
    .problem-tag {
        font-size: 11px;
        padding: 3px 6px;
    }

    .accuracy {
        font-size: 13px;
        min-width: 45px;
    }

    .solve-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .problem-actions {
        gap: 8px;
    }
}

@media (max-width: 480px) {

    .problem-topics,
    .problem-tags {
        display: none;
        /* Hide topics on very small screens */
    }

    .problem-right {
        gap: 8px;
    }

    .problem-name,
    .problem-title {
        font-size: 13px;
    }

    .accuracy {
        font-size: 12px;
        min-width: 40px;
    }

    .difficulty-tag,
    .problem-difficulty {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Special handling for preparation pages - Always single line */
.preparation-page-container .problem-cards {
    max-width: none;
    margin: 0;
}

.preparation-page-container .problem-card {
    /* Force single line layout on all screen sizes */
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
}

.preparation-page-container .problem-left {
    width: auto !important;
    flex: 1;
}

.preparation-page-container .problem-right {
    width: auto !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
}

/* wrap loader */
.wrap_loader {
    background: snow var(--loader-bg) no-repeat;
    background-attachment: fixed;
    background-position: center center;
    width: 100%;
    min-height: 1024px;
    margin: 0 auto;
    padding: 0 0 0 0;
    vertical-align: center;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    opacity: .8;
    display: none;
}

.wrap_loader img {
    text-align: center;
    border: 0;
    display: none;
}

@media (max-width: 768px) {
    .preparation-page-container .problem-right {
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .preparation-page-container .problem-right {
        gap: 8px !important;
    }
}



/* Difficulty Level Bar Styles */

.difficulty-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-bg-color);
    padding: 20px;
    border-radius: var(--border-radius);
    width: auto;
}

.difficulty-options {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: space-between;
}

.difficulty-option {
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    border: 2px solid transparent;
    text-align: center;
}

.difficulty-option.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.difficulty-option.locked {
    opacity: 0.6;
    cursor: not-allowed;
    border: 2px solid var(--border-color);
    color: var(--text-color-light);
}

.difficulty-option.locked::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 5px;
    font-size: 14px;
}

.difficulty-option:not(.active):not(.locked):hover {
    background-color: rgba(133, 169, 71, 0.1);
    border-color: var(--primary-color);
}

/* Locked content section */
.locked-content {
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    margin-left: 15px !important;
    display: none;
    width: calc(100% - 350px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    background: #aaabac0d !important;
}

.locked-content.visible {
    display: block;
}

.locked-content i {
    font-size: 48px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.locked-content h3 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.locked-content p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.unlock-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.unlock-btn:hover {
    background-color: #9DC45F;
}


@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }

    .header-left {
        flex-direction: column;
        gap: 15px;
    }

    .page-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .page-info h1 {
        font-size: 20px;
    }

    .difficulty-bar {
        width: 90%;
    }

    .difficulty-options {
        flex-direction: row;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .locked-content {
        width: auto;
    }
}

/* Difficulty Bar Styles */

.difficulty-bar {
    display: flex;
    justify-content: space-between;
    background-color: #9dc45f26;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 15px;
    margin-bottom: 30px;
}

.difficulty-options {
    display: flex;
    gap: 15px;
}

.difficulty-option {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.difficulty-option:hover {
    background-color: var(--hover-bg-color);
}

.difficulty-option.active {
    background-color: var(--primary-color);
    color: white;
}

.difficulty-option.easy {
    color: #2ecc71;
}

.difficulty-option.medium {
    color: #f1c40f;
}

.difficulty-option.hard {
    color: #e74c3c;
}

.difficulty-option.active.easy,
.difficulty-option.active.medium,
.difficulty-option.active.hard {
    color: white;
}

.difficulty-option.locked {
    opacity: 0.7;
    cursor: pointer;
    position: relative;
}

@media (max-width: 768px) {
    .difficulty-bar {
        gap: 8px;
        width: auto;
        margin-bottom: 0px;
    }

    .difficulty-options {
        flex-wrap: wrap;
        justify-content: center;
    }

    .points-required {
        margin-left: 0;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .difficulty-option {
        padding: 6px 12px;
        font-size: 10px;
    }

    .locked-content {
        padding: 10px;
    }

}

/* placement sheets*/

/* Main Content Area - 80% */
.placement-content-area {
    width: 80%;
    padding: 20px;
    margin-left: 1%;
}

.right-sidebar {
    width: 20%;
    position: fixed;
    right: 0;
    height: calc(100vh - 56px);
    overflow-y: auto;
    padding: 20px;
}

.placement-content-area .page-header{
    background-color: var(--card-bg);
    border-bottom-left-radius: 7px !important;
    border-bottom-right-radius: 7px !important;
    overflow: hidden; 
    padding: 15px !important;
    margin: 15px 15px 15px 15px;
    box-shadow: var(--shadow);
    position:relative;
}
.placement-content-area .page-info h1 {
    font-size: 32px;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 600;
    margin: 15px 0 0 5px;
}

.placement-content-area .page-info p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin: 5px 0 0 70px;
}