/* Main Layout */
.problems-page-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    /* Subtract navbar heights */
    margin-top: 5px;
    padding-top: 0;
    position: relative;
    z-index: 1;
}

/* Left Sidebar - 20% */
.left-sidebar {
    width: 20%;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: absolute;
    top: -5px;
    height: 100vh;
    border-bottom: 2px solid #cccccc8f;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.left-sidebar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Problem of the Day Section - FIXED */
.problem-of-day-section {
    height: auto;
    min-height: 120px;
    margin-bottom: 8px;
    width: 100%;
}

.problem-of-day-card {
    background: linear-gradient(135deg, #85A947, #9DC45F);
    border-radius: 12px;
    padding: 15px;
    color: white;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: none;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.problem-of-day-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: white;
    text-align: center;
    /* letter-spacing: 1px; */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.pod-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 5px;
}

.problem-title {
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    flex: 1;
    /* margin: 0; */
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.problem-difficulty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 3px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 70px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white !important;
    flex-shrink: 0;
}


/* Calendar Section - 50% height */
.calendar-section {
    height: auto;
    min-height: 35%;
    margin-bottom: 20px;
    width: 100%;
}

.calendar-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow);
    min-height: 12.8rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header h3 {
    font-size: 16px;
    margin: 0;
}

.calendar-nav-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 10px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 10px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-gap: 1px;
    text-align: center;
}

.calendar-days div {
    padding: 5px;
    font-size: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-days .current-day {
    background-color: var(--primary-color);
    color: white;
}

.calendar-days .prev-month,
.calendar-days .next-month {
    color: #aaa;
}



/* Dropdowns Section - 30% height */
.dropdowns-section {
    height: auto;
    min-height: 45vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.dropdowns-section::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}


.problem-difficulty.easy {
    background-color: #43e97b;
}

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

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

.solve-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    font-weight: 500;
    font-size: 14px;
}

.solve-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Sidebar Dropdowns */
.sidebar-dropdown {
    position: relative;
    margin-bottom: 10px;
    margin-top: 15px;
}

.sidebar-dropdown-btn {
    width: 100%;
    margin-top: 7px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-dropdown-content {
    position: absolute;
    display: none;
    border-radius: 5px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.02);
    box-shadow: var(--shadow);
    max-height: 350px;
    overflow: hidden;
    height: 35vh;
    width: 100%;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.sidebar-dropdown-content::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.sidebar-dropdown-content.active {
    display: block;
}

/* Progress Section */
.progress-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-container {
    padding: 15px 0;
}

.progress-container h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.progress-item {
    margin-bottom: 12px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: var(--text-color);
    font-size: 13px;
}

.progress-bar {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Custom colors for difficulty levels */
.progress-item:nth-child(2) .progress {
    background-color: #5f79e0;
}

.progress-item:nth-child(3) .progress {
    background-color: #43e97b;
}

/* Easy - Green */
.progress-item:nth-child(4) .progress {
    background-color: #f9a825;
}

/* Medium - Orange */
.progress-item:nth-child(5) .progress {
    background-color: #f5576c;
}

/* Hard - Red */

/* Main Content Area - 60% */
.main-content-area {
    width: 60%;
    margin-left: 20%;
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    max-height: calc(100vh - 112px);
    margin-top: 20px;
    /* Account for second navbar */
}

.main-content-area::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}



.problem-search {
    display: flex;
    align-items: center;
}

.problem-search input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.problem-search button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}



.tag {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag i {
    cursor: pointer;
}

.topic-tag {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

/* Tags Container */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
}

.more-tags-indicator {
    background-color: #f0f0f0;
    color: #666;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.more-tags-popup {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-width: 365px;
    margin-bottom: 8px;
    width: max-content;
}

.more-tags-popup::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.more-tags-popup.show {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

/* Problems Header */
.problems-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.problems-header h2 {
    font-size: 24px;
    color: var(--text-color);
}

.sort-dropdown {
    position: relative;
    display: inline-block;
}

/* Problem card styles are now in Style.css */

/* Right Sidebar - 20% */
.right-sidebar {
    width: 20%;
    position: relative;
    right: 0;
    padding: 20px;
    height: auto;
}


/* Mobile Sidebar Styles */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 90px;
    left: 15px;
    z-index: 1001;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sidebar-toggle:hover {
    background-color: #9DC45F;
    transform: scale(1.1);
}

.sidebar-toggle.active {
    background-color: #dc3545;
    z-index: 1002;
    /* Above overlay and sidebar */
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Ensure sidebar is above overlay but not blurred */
.left-sidebar {
    z-index: 1000;
    /* Above overlay */
}

.left-sidebar.mobile-open {
    z-index: 1000;
    /* Keep above overlay */
    filter: none;
    /* Prevent blur effect */
}

/* Dropdown Toggle Styles */
.dropdown-toggle {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 8px;
}

.dropdown-toggle:hover {
    background-color: #9DC45F;
}

.dropdown-toggle.active {
    background-color: #9DC45F;
    border-radius: 6px 6px 0 0;
}





.dropdown-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 13px;
    color: var(--text-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: rgba(133, 169, 71, 0.1);
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

.activity-day {
    background-color: #4ee98a !important;
    border: 2px solid #57bfbc !important;
    border-radius: 4px;
    font-weight: bold;
    position: relative;
    color: #000 !important;
}

.activity-day::after {
    content: '•';
    color: #4ca5af;
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
}

.with-check::before {
    content: "✔️ ";
   
}

/* Responsive Styles */
@media (max-width: 992px) {
    .problems-page-container {
        flex-direction: column;
    }

    .left-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        background-color: var(--card-bg);
        border-right: 1px solid var(--border-color);
        padding-top: 80px;
    }

    .left-sidebar.mobile-open {
        left: 0;
    }

    .main-content-area {
        width: 100%;
        margin-left: 0;
        padding: 15px;
    }

    .right-sidebar {
        width: 100%;
        position: static;
        height: auto;
    }

    .ad-container {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ad-box {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .left-sidebar {
        width: 260px;
    }

    .sidebar-toggle {
        top: 140px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .main-content-area {
        padding: 10px;
    }

    .filter-bar {
        flex-direction: column;
        gap: 15px;
    }

    .filter-dropdowns {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .problem-card {
        padding: 12px 16px;
    }

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

    .problem-right {
        gap: 12px;
    }

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

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

    .selected-tags {
        margin-left: 50px;
    }
}

@media (max-width: 480px) {
    .problem-topics {
        display: none;
    }

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