/* Modals & Backdrops */
#scheduleAdjustModalBackdrop,
#dayAdjustModalBackdrop {
    z-index: 5600; /* Higher z-index than the main schedule modal (5500) */
}

#scheduleSetupModal {
    max-width: 80vw; /* Slightly wider for better layout */
    width: 90%;
    padding: 0; /* Padding will be handled by step content */
}


#scheduleSetupModal .modal-progress-bar {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#scheduleSetupModal .modal-progress-container {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    margin-bottom: 25px;
    overflow: hidden;
}

#scheduleSetupModal .schedule-step-nav {
    width: 100%; /* CRITICAL: Forces the nav bar to take full width */
    max-width: 500px;
    margin: 20px auto 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    display: flex;
    justify-content: space-between; /* Now this will work correctly */
    align-items: center;
}

#scheduleSetupModal h2 {
    font-size: 1.6em;
    margin-bottom: 12px;
}

#scheduleViewModal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent; /* Background is now on the backdrop */
    padding: 0; /* THE FIX: This removes the unwanted space/border */

    /* Override the default modal open/close animation for a fullscreen fade */
    opacity: 0;
    transform: none; /* No scaling */
    transition: opacity 0.4s ease-out;
}

#scheduleViewModal .schedule-modal-close {
    top: 25px;
    right: 25px;
    z-index: 100; /* Ensure it's on top of all content */
}

#scheduleViewModal .schedule-view-header-bar {
    padding-top: 25px; 
    background: #181622; /* A slightly different shade for the header area */
}

#scheduleViewModalBackdrop {
    background-color: #12101c; /* Solid dark background */
    backdrop-filter: none; /* Remove blur for performance and solid feel */
    -webkit-backdrop-filter: none;
    align-items: stretch; /* Allow child to fill height */
    justify-content: stretch; /* Allow child to fill width */
}

#scheduleViewModalBackdrop:not(.hidden) #scheduleViewModal {
    opacity: 1;
}


  .schedule-modal {
      background: linear-gradient(145deg, #1e1e2f, #2a2a3e);
      padding: 30px 35px;
      border-radius: 16px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #e0e0e0;
      max-width: 500px;
      width: 90%;
      position: relative;
      text-align: center;
      transform: scale(0.95);
      opacity: 0;
      transition: transform 0.3s ease, opacity 0.3s ease;
      display: flex; /* Ensure flexbox layout */
    flex-direction: column; /* Stack header, content, footer vertically */
    max-height: 90vh; /* Crucial: a maximum height relative to the screen */
    }

     .schedule-modal h2 {
      margin-top: 0;
      margin-bottom: 20px;
      font-size: 1.6em;
      font-weight: 600;
      color: #fff;
    }


    .schedule-modal p {
      margin-bottom: 15px;
      color: #ccc;
      font-size: 1.0em;
    }

    .schedule-modal-close {
    position: absolute;
    top: 32px; /* Vertically align with progress bar */
    right: 25px;
    background: transparent;
    border: none;
    color: #A0A0B0; /* Initial subtle color */
    width: auto;
    height: auto;
    border-radius: 0;
    font-size: 28px;
    padding: 5px; /* Add padding to increase clickable area */
    cursor: pointer;
    transition: color 0.2s ease; /* Only transition the color for a subtle effect */
    z-index: 10;
}

.schedule-modal-close:hover {
      background: rgba(255, 255, 255, 0.2);
      color: #fff;
    }



.schedule-modal-content-scrollable {
    flex-grow: 1; /* Allows this div to expand and fill available space */
    overflow-y: auto; /* The magic: enables vertical scrolling when content overflows */
    padding: 10px 5px 20px 0; /* Add some padding, especially on the right for the scrollbar */
    
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(167, 139, 250, 0.4) transparent;
}
.schedule-modal-content-scrollable::-webkit-scrollbar { 
    width: 6px; 
}
.schedule-modal-content-scrollable::-webkit-scrollbar-track { 
    background: transparent; 
}
.schedule-modal-content-scrollable::-webkit-scrollbar-thumb { 
    background-color: rgba(167, 139, 250, 0.5); 
    border-radius: 3px; 
}

.schedule-view-footer {
      margin-top: 20px;
      padding-top: 15px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      display: flex;
      justify-content: flex-end;
      gap: 15px;
    }

    .schedule-view-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding: 0 10px;
    }

    


    .schedule-view-header h2 {
      margin: 0;
      font-size: 1.5em;
      flex-grow: 1;
      text-align: center;
    }

    .schedule-view-header-bar {
    display: flex;
    flex-direction: column; /* Stack title and controls vertically */
    align-items: center;   /* Center them horizontally */
    padding: 18px 25px 15px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 18, 38, 0.7);
    flex-shrink: 0;
    gap: 15px; /* Space between title and the control row */
}


.schedule-view-modal {
      max-width: 900px;
      max-height: 90vh;
      display: flex;
      flex-direction: column;
    }

#scheduleLaunchBtn {
  position: relative;
  overflow: hidden; /* Ensures SVG corners don't stick out */
}

#scheduleLaunchBtn.is-generating .generating-border-path {
  /* ...start the animation */
  animation: draw-border 120s linear forwards; /* 120s = 2 minutes */
}


#scheduleLaunchBtn.is-generating .generating-border-svg {
  opacity: 1; /* Make the SVG visible */
}

/* Mini Calendar */


.mini-cal-day {
    /* FIX: Set an equal width and height */
    width: 32px;
    height: 32px;
    
    /* FIX: Use flexbox for perfect centering */
    display: flex;
    align-items: center;
    justify-content: center;

    /* REMOVE PADDING: Replaced by fixed width/height and flex centering */
    /* padding: 8px 0; */ 
    
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.9em;
    margin: 0 auto; /* Center the circle within its grid cell */
}

.mini-cal-day.other-month { color: #505060; cursor: default; }


.mini-cal-day.selected { background-color: #A78BFA; color: #1C1B22; font-weight: 600; }


.mini-cal-day.today { border: 1px solid #A78BFA; }
.mini-cal-day:hover:not(.other-month) { background-color: rgba(255,255,255,0.1); }

.mini-cal-days-header, .mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }


.mini-cal-days-header { font-size: 0.8em; color: #A0A0B0; margin-bottom: 8px; }

.mini-cal-grid { gap: 5px; }



.mini-cal-month-display { font-size: 1.1em; font-weight: 500; }

.mini-cal-nav-btn { background: none; border: none; color: #C0C0C8; font-size: 1.5em; cursor: pointer; }

.mini-calendar-container {
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 15px;
    margin: 25px 0;
}
.mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Setup Steps */

#schedule-step-1 .schedule-step-nav {
    justify-content: center;
}


#schedule-step-3 .step-header-content,
#schedule-step-3 .custom-playlist-section,
#schedule-step-3 .schedule-step-nav {
    flex-shrink: 0; 
}

#schedule-step-3.schedule-step-content {
    display: flex;
    flex-direction: column;
    height: 100%; /* Crucial: makes the step fill the modal's available height */
}


#schedule-step-exam-date input[type="date"] {
    padding: 16px 20px;
    font-size: 1.1rem;
    color-scheme: dark;
}

#schedule-step-path-selection > h2,
#schedule-step-path-selection > p,
#schedule-step-path-selection > .path-selection-list {
    max-width: 480px; /* Set a comfortable, focused width */
    margin-left: auto;
    margin-right: auto;
    width: 100%; /* Ensure it doesn't shrink on small screens */
}

#schedule-step-path-selection h2 {
    font-size: 1.85rem;
    color: #FFFFFF;
}
#schedule-step-path-selection p {
    font-size: 1.05rem;
    color: #A0A0B0;
}


#schedule-step-playlist {
    display: flex;
    flex-direction: column;
}

#schedule-step-playlist .custom-playlist-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 25px 30px;
    max-width: 500px; /* Give it a max-width for centering */
}

#schedule-step-playlist .custom-playlist-section input[type="text"] {
    padding: 14px 18px;
    background-color: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
    font-size: 1rem;
}



#schedule-step-playlist .custom-playlist-section label {
    font-weight: 500;
    color: #E0E0E5;
}


#schedule-step-playlist .playlist-suggestions-wrapper {
    justify-content: center; /* Center the pills */
    padding-bottom: 25px;
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Add separator line */
}


#schedule-step-playlist .schedule-step-nav {
    margin-top: auto; /* Push to the bottom */
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


#schedule-step-playlist .scrollable-playlist-grid {
    flex-grow: 1; /* This is the magic: it will expand and push other elements */
    min-height: 200px; /* Ensure it has a minimum height to be visible */
}


#schedule-step-playlist .step-form-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically before a selection is made */
    gap: 20px;
    min-height: 0; /* Important for flex-grow to work with scrolling */
}

#schedule-step-progress #schedule-current-topic {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 1rem;
    color: #E0E0E5;
}
#schedule-step-progress #schedule-current-topic:focus {
    border-color: #A78BFA;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
}

#schedule-step-progress .slider-container {
    padding-top: 10px;
}
#schedule-step-progress .slider-container span {
    flex-basis: 120px;
    flex-shrink: 0;
}
#schedule-step-progress .slider-container span:first-child { text-align: left; }
#schedule-step-progress .slider-container span:last-child { text-align: right; }


 #scheduleCourseSelection {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-bottom: 25px;
    }

    #schedule-file-input { display: none; }

    #schedule-file-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    text-align: left;
}

#schedule-file-list li {
    background-color: rgba(255,255,255,0.07);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #C0C0C8;
}

#schedule-file-upload-area {
    background-color: rgba(0,0,0,0.15);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

#schedule-file-upload-area:hover, #schedule-file-upload-area.dragover {
    border-color: #A78BFA;
    background-color: rgba(167, 139, 250, 0.05);
}
#schedule-file-upload-area.dragover {
    border-style: solid;
}

#schedule-file-upload-area:hover .prompt-icon-stack .icon-bg-1 { 
    transform: translate(-50%, -50%) rotate(8deg);
}
#schedule-file-upload-area:hover .prompt-icon-stack .icon-bg-2 { 
    transform: translate(-50%, -50%) rotate(-20deg);
}

#schedule-file-upload-area:hover .prompt-icon-stack .icon-main { 
    transform: translate(-50%, -55%) rotate(-5deg) scale(1.03);
}

#schedule-generating-loader { /* If you keep this specific loader */
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #A78BFA;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
}

/* Override for elements that should be full-width */
.schedule-step-content .modal-progress-container,
.schedule-step-content .schedule-step-nav,
.schedule-step-content .step-header-content,
#schedule-playlist-recommendations {
    max-width: 100%;
}

#schedule-playlist-recommendations.scrollable-playlist-grid {
    flex-grow: 1;      /* This is the magic. It expands to fill the empty space. */
    overflow-y: auto;  /* This makes it scrollable when its content overflows. */
    min-height: 0;     /* A necessary flexbox fix to enable scrolling correctly. */
    padding-right: 10px; /* Space for the scrollbar. */
    margin-bottom: 20px; /* Space between the grid and the input field below it. */
}

.schedule-upload-prompt {
    color: #A0A0B0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none; /* Clicks go through to parent */
}

.schedule-upload-prompt h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #E0E0E5;
    margin: 0;
}
.schedule-upload-prompt p {
    font-size: 0.9rem;
    color: #A0A0B0;
    margin: 0 !important;
}

.prompt-icon-stack {
    position: relative;
    width: 120px; /* Wider to allow more separation */
    height: 90px;
    margin-bottom: 15px;
}

.prompt-icon-stack .icon-main {
    font-size: 60px;
    color: #EC7063; /* The prominent reddish-orange color */
    z-index: 3;
    top: 50%;
    left: 45%; /* Positioned slightly to the left of center */
    transform: translate(-50%, -50%) rotate(-8deg);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}
.prompt-icon-stack .icon-bg {
    font-size: 56px;
    /* THE FIX: Dark, desaturated, semi-transparent color for background feel */
    color: rgba(60, 56, 82, 0.6); 
    z-index: 2;
}
.prompt-icon-stack .icon-bg-1 {
    top: 35%;
    left: 20%; /* Pushed further left */
    transform: translate(-50%, -50%) rotate(15deg);
}
.prompt-icon-stack .icon-bg-2 {
    top: 60%;
    left: 80%; /* Pushed further right */
    transform: translate(-50%, -50%) rotate(-15deg);
    z-index: 1;
}

.date-picker-group,
.weekday-picker-group,
.custom-playlist-section,
#schedule-file-upload-area,
.custom-instructions-section {
    text-align: left;
}


.custom-instructions-section label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #C0C0C8;
    margin-bottom: 10px;
}


.custom-instructions-section textarea {
    width: 100%;
    min-height: 80px; /* Adjust as needed */
    padding: 14px 18px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #E0E0E5;
    font-size: 1rem;
    font-family: 'Rubik', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    resize: vertical; /* Allow vertical resizing */
}


.custom-instructions-section textarea::placeholder {
    color: #707080;
}

.custom-instructions-section textarea:focus {
    border-color: #A78BFA;
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.custom-playlist-section {
    width: 80%;
    /* Replaced align-self with margin auto for robust centering */
    margin: 20px auto 0 auto;
    background: rgba(45, 43, 68, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

.date-picker-group label,
.weekday-picker-group > label, /* Target only the direct label of the group */
.custom-playlist-section > label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #C0C0C8; /* Slightly lighter label */
    margin-bottom: 10px;
}


.custom-playlist-section input[type="text"] {
    padding: 12px 16px;
    border-radius: 8px; /* Slightly softer corners for the input */
    font-size: 0.95rem;
    background-color: rgba(0, 0, 0, 0.3); /* Darker input background for contrast */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-playlist-section input[type="text"]:focus {
    border-color: #A78BFA;
    background-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.3);
}

.custom-playlist-section label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #E0E0E5;
    margin-bottom: 12px;
}

.date-day-picker-container {
    display: flex;
    gap: 25px; /* Increased gap */
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.date-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #C0C0C8;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem; /* Slightly larger icon */
    cursor: pointer;
    transition: all 0.2s ease;
}
.date-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    transform: scale(1.05);
}

.date-nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* Prevent shrinking */
}

.date-picker-group,
.weekday-picker-group {
    flex: 1;
    min-width: 200px; /* Ensure they don't get too squished */
}


.schedule-course-dropdown,
.custom-playlist-section input[type="text"],
.date-picker-group input[type="date"] {
    width: 100%;
    padding: 14px 18px; /* Increased padding */
    background-color: rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px; /* Softer radius */
    color: #E0E0E5;
    font-size: 1rem;
    font-family: 'Rubik', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.date-picker-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8); /* Make calendar icon lighter */
    cursor: pointer;
}

.schedule-course-dropdown:focus,
.custom-playlist-section input[type="text"]:focus,
.date-picker-group input[type="date"]:focus {
    border-color: #A78BFA; /* Accent color on focus */
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.modal-progress-bar {
    height: 100%;
    width: 0%;
    background: #ffff;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


.modal-progress-container {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    margin: 15px 0 25px 0;
    overflow: hidden;
}


.modal-step {
    /* The active step will be controlled by JS (display: block) */
}

.path-choice-btn {
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease-out;
    text-align: left;
    color: #E0E0E5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.path-choice-btn i {
    font-size: 2.5em;
    color: #A78BFA;
}

.path-choice-btn small {
    font-size: 0.9em;
    line-height: 1.5;
    color: #A0A0B0;
}

.path-choice-btn span {
    font-size: 1.1em;
    font-weight: 600;
}

.path-choice-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.path-choice-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease-out; /* Subtle hover */
}

.path-choice-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

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

.path-item-chevron {
    font-size: 1.5rem;
    color: #505060; /* Subtle chevron color */
    margin-left: 15px;
}

.path-item-desc {
    font-size: 0.9rem;
    color: #A0A0B0; /* Secondary text */
    line-height: 1.4;
}

.path-item-icon {
    font-size: 1.6rem;
    color: #A0A0B0; /* Changed to match secondary text */
    margin-right: 20px;
}

.path-item-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 2px;
}

.path-item-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: #E0E0E5; /* Primary text */
}

.path-selection-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    width: 100%;
    margin-top: 20px;
}

.path-selection-container {
    display: none; /* This will be removed, but good to have */
}

.path-selection-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px; /* Constrain width for focus */
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#playlist-cards-container { /* <-- THE FIX IS THIS SELECTOR */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 15px;
    padding-top: 10px;
    /* No margin-bottom needed here as the parent's padding handles spacing */
}

.playlist-choice-btn {
    background-color: rgba(45, 43, 68, 0.75); /* Base background for the card */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    border-radius: 14px; /* Rounded corners for the card */
    padding: 0; /* NO PADDING on the button itself */
    text-align: left;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                background-color 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; /* CRITICAL: This clips the thumbnail to the card's rounded corners */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.playlist-choice-btn .playlist-creator {
    font-size: 0.75rem; /* Slightly smaller font */
    color: #A0A0B8; 
    line-height: 1.3;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-choice-btn .playlist-title {
    font-weight: 600;
    font-size: 0.9rem; /* Slightly smaller font */
    color: #EAEAEA; 
    margin-bottom: 3px; /* Reduced margin */
    line-height: 1.3;
    display: block; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-choice-btn.selected {
    background-color: #A78BFA;
    border-color: #c5affd; /* Slightly lighter border for selected state */
    box-shadow: 0 5px 15px rgba(167, 139, 250, 0.4), 0 0 0 2px #A78BFA; /* Added an outline effect */
    transform: translateY(-2px); /* Keep a slight lift */
}

.playlist-choice-btn.selected .playlist-title,
.playlist-choice-btn.selected .playlist-creator {
    color: #131120; /* Dark text for contrast on light purple */
}

.playlist-choice-btn.selected .playlist-redirect-icon {
    background-color: rgba(28, 27, 34, 0.6);
    color: #131120;
    opacity: 0.9;
}

.playlist-choice-btn:hover {
    background-color: rgba(55, 53, 78, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px); /* Lift effect */
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.playlist-choice-btn:hover .playlist-redirect-icon {
    background-color: rgba(50, 48, 68, 0.85);
    color: #FFFFFF;
    opacity: 1;
    transform: scale(1.12);
}

.playlist-choice-btn:hover .playlist-thumbnail-container img {
    transform: scale(1.05); /* Subtle zoom effect on the image when card is hovered */
}

.playlist-info-container {
    padding: 12px 14px; /* Reduced padding for a more compact look */
    padding-bottom: 38px; /* Reduced bottom padding */
    flex-grow: 1; 
}

.playlist-redirect-icon {
    position: absolute; 
    bottom: 8px; /* Adjusted position */
    right: 10px; /* Adjusted position */
    width: 28px; /* Slightly smaller */
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(30, 28, 48, 0.65); 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 50%; 
    font-size: 14px; /* Smaller icon */
    color: #C8C8D8; 
    transition: all 0.2s ease-in-out;
    opacity: 0.75;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    z-index: 2; 
}

.playlist-suggestion-pill {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #d0c8e8;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap; /* Prevents text from wrapping */
    flex-shrink: 0; /* Prevents pills from shrinking */
}

.playlist-suggestion-pill:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Active state for the currently selected pill */
.playlist-suggestion-pill.active {
    background-color: rgba(167, 139, 250, 0.2); ;
    color: #e1dde7;
    border-color: #e1dde7;
    box-shadow: 0 2px 10px rgba(251, 194, 235, 0.25);
}

.playlist-suggestions-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 5px 0 15px 0; /* Add padding for scrollbar visibility */
    margin-top: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(167, 139, 250, 0.4) transparent;
}
.playlist-suggestions-wrapper::-webkit-scrollbar { 
    height: 6px; 
}
.playlist-suggestions-wrapper::-webkit-scrollbar-track { 
    background: transparent; 
}
.playlist-suggestions-wrapper::-webkit-scrollbar-thumb { 
    background-color: rgba(167, 139, 250, 0.5); 
    border-radius: 3px; 
}

.playlist-thumbnail-container {
    width: 100%;
    aspect-ratio: 16 / 9; /* This is the key change to enforce correct proportions */
    background-color: rgba(0,0,0,0.3);
    overflow: hidden; /* Keep this to maintain rounded corners from the parent */
    border-radius: 0; /* The parent button handles the rounding */
}

.playlist-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 'cover' is fine now that the aspect ratio matches */
    display: block;
    transition: transform 0.3s ease-out;
}

.schedule-choice-btn {
      padding: 12px 25px;
      font-size: 1.0em;
      border: 1px solid #555;
      background-color: #3a3a52;
      color: #eee;
      border-radius: 8px;
      cursor: pointer;
      transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    }

    .schedule-choice-btn:hover {
      background-color: #4a4a65;
      border-color: #777;
      transform: translateY(-2px);
    }

    

    .schedule-choice-btn.selected {
      background-color: #a18cd1;
      border-color: #c0a7f1;
      color: #1e1e2f;
      font-weight: 600;
    }


.schedule-course-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 14px 18px;
  color: #E0E0E5;
  font-size: 1rem;
  font-family: 'Rubik', sans-serif;
  cursor: text;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.schedule-course-input::placeholder {
    color: #707080;
    opacity: 0.8;
}

.schedule-course-input:focus {
  border-color: #A78BFA;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
}


.schedule-cta-btn,
.schedule-secondary-btn {
    padding: 12px 28px; /* Uniform padding */
    font-size: 1rem;
    font-weight: 500;
    border-radius: 25px; /* Pill shape */
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.schedule-cta-btn {
    background: #fff; /* Changed from purple to white */
    color: #1C1B22;
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.2);
    /* Add transition for a smooth hover effect */
    transition: all 0.25s ease; 
}
.schedule-cta-btn i, .schedule-secondary-btn i {
    font-size: 1.2em;
}

.schedule-cta-btn.hidden {
      display: none;
    }

    .schedule-cta-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.schedule-cta-btn:hover:not(:disabled) {
    background: #f7f5ff; /* A very light, purple-tinged off-white */
    color: #443C8B; /* A deep, elegant purple for the text */
    transform: translateY(-2px) scale(1.02); /* Subtle lift and grow effect */
    box-shadow: 0 7px 20px rgba(167, 139, 250, 0.35); /* Soft, intensified purple glow */
}


 .schedule-error-msg {
      color: #ff8a80;
      font-size: 0.9em;
      margin-top: 15px;
    }

    .schedule-error-msg.hidden {
      display: none;
    }

.schedule-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    width: 100%;
    justify-items: center;
    margin-top: 10px;
}


.schedule-header-actions {
    display: flex;
    gap: 10px;
}

.schedule-header-controls-row {
    display: flex;
    justify-content: center; /* Horizontally center the date controls and view toggle */
    align-items: center;
    gap: 30px; /* Gap between date controls and view toggle, adjust as needed */
    padding-top: 5px; /* Optional: small space from the title */
    width: 100%;
}


.schedule-header-right-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px; /* Adjust spacing between control groups */
    width: 100%;
    flex-wrap: wrap; /* Allow controls to wrap on smaller screens */
}

.schedule-header-top-left-nav {
    position: absolute;
    top: 25px; /* Matches header padding */
    left: 25px; /* Matches header padding */
    display: flex;
    gap: 10px;
    z-index: 100; /* Ensure it's above header bar content */
}

  .schedule-icon-btn {
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: #e0e0e0;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      cursor: pointer;
      transition: background-color 0.2s ease, transform 0.2s ease;
      backdrop-filter: blur(5px);
    }

    .schedule-icon-btn:hover {
      background: rgba(255, 255, 255, 0.2);
      transform: scale(1.1);
    }

    
    .schedule-nav-btn {
      background: none;
      border: none;
      color: #b5a7d8;
      font-size: 28px;
      cursor: pointer;
      padding: 5px;
      border-radius: 50%;
      transition: background-color 0.2s ease;
      line-height: 1;
    }

    .schedule-nav-btn:hover {
      background-color: rgba(255, 255, 255, 0.1);
    }


.schedule-secondary-btn {
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: #ccc;
      padding: 8px 20px;
      font-size: 0.9em;
      border-radius: 20px;
      cursor: pointer;
      transition: background-color 0.2s ease;
    }

    .schedule-secondary-btn:hover {
      background: rgba(255, 255, 255, 0.15);
    }

    .schedule-step-content {
    padding: 30px 35px;
    box-sizing: border-box;
    flex-grow: 1; /* Allow content to fill space if modal has fixed height */
    overflow-y: auto; /* Scroll if content overflows */
}


.schedule-step-content .modal-progress-container {
    margin-bottom: 40px;
}

.schedule-step-content .schedule-step-nav {
    justify-content: space-between; /* Keeps Back/Next buttons on opposite sides */
}

.schedule-step-content > * {
    /* Apply a max-width to direct children for better centering on wide screens */
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}


.schedule-step-content h2 {
    font-size: 1.75rem; /* Slightly reduced for better balance */
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 12px 0;
}


.schedule-step-content p {
    font-size: 1rem;
    color: #A0A0B0; /* Softer secondary text */
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.schedule-step-content:first-child { /* Extra padding for first step if needed */
    padding-top: 40px;
}
.schedule-step-content:last-child { /* Extra padding for last step if needed */
    padding-bottom: 40px;
}

.schedule-step-nav {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-tooltip {
      position: absolute;
      top: 5px;
      right: 50px;
      background-color: #2c2c3e;
      color: #e0e0e0;
      padding: 10px 15px;
      border-radius: 8px;
      font-size: 13px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
      border: 1px solid #444;
      width: 180px;
      opacity: 0;
      transform: translateX(10px);
      transition: opacity 0.3s ease, transform 0.3s ease;
      pointer-events: none;
      z-index: 10;
    }

  .schedule-tooltip p {
      margin: 0;
      line-height: 1.4;
    }
    
     .schedule-tooltip-arrow {
      position: absolute;
      top: 50%;
      right: -6px;
      margin-top: -6px;
      width: 0;
      height: 0;
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
      border-left: 6px solid #2c2c3e;
    }

.schedule-tooltip-close {
      position: absolute;
      top: 2px;
      right: 5px;
      background: none;
      border: none;
      color: #aaa;
      font-size: 18px;
      cursor: pointer;
      padding: 0;
      line-height: 1;
    }

    .schedule-tooltip-close:hover {
      color: #fff;
    }


    .schedule-tooltip.hidden {
      display: none;
    }

    .schedule-tooltip:not(.hidden) {
      opacity: 1;
      transform: translateX(0);
      pointer-events: auto;
    }


     .step-content {
      max-width: 700px;
      width: 90%;
      display: flex;
      flex-direction: column;
      align-items: center;
      background: rgba(255, 255, 255, 0.04);
      padding: clamp(20px, 4vh, 30px) clamp(15px, 4vw, 35px);
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      box-shadow: 0 10px 45px rgba(0, 0, 0, 0.35);
      backdrop-filter: blur(10px);
      color: #e0e0e0;
      flex-shrink: 0;
      max-height: 90vh;
      overflow-y: auto;
      gap: 15px;
      scrollbar-width: thin;
      scrollbar-color: rgba(161, 140, 209, 0.7) rgba(255, 255, 255, 0.05);
    }


    .step-content::-webkit-scrollbar {
      width: 8px;
    }

    .step-content::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 4px;
    }

    .step-content::-webkit-scrollbar-thumb {
      background-color: rgba(161, 140, 209, 0.6);
      border-radius: 4px;
      border: 2px solid transparent;
      background-clip: content-box;
    }

    .step-content::-webkit-scrollbar-thumb:hover {
      background-color: rgba(161, 140, 209, 0.85);
    }

.step-form-content {
    width: 100%;
    max-width: 40vw;
    margin: 25px auto;
    display: flex;
    flex-direction: column;
    gap: 35px; /* Creates vertical space between form elements */
}

.step-subtitle {
    font-size: 1rem;
    color: #b0a8c9;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}

.sub-step-title {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 600;
  color: #e8e4f5;
  text-align: center;
  margin: 0;
}

 .subtitle {
      font-size: clamp(0.95rem, 2.5vw, 1.1rem);
      margin-bottom: 15px;
      max-width: 550px;
      text-align: center;
      color: #c5c5c5;
    }

.weekday-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.weekday-selector .day-label {
    display: block;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 10px 0;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    color: #B0B0BE;
    transition: all 0.25s ease;
    user-select: none;
}

.weekday-selector input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}


.weekday-selector label {
    flex: 1;
    min-width: 50px;
    position: relative;
    cursor: pointer;
}

.weekday-selector label:hover .day-label {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
/* This is the new, definitive style for the selected state */
.weekday-selector label.is-selected .day-label {
    background: rgba(167, 139, 250, 0.2);      /* Subtle purple background */
    color: #FFFFFF;                            /* Bright white text */
    border-color: rgba(167, 139, 250, 0.6);    /* Stronger purple border */
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.3); /* The classy glow */
    transform: scale(1.03);
    padding-left: 20px;
    padding-right: 20px;
}

/* --- Daily Briefing Modal --- */
#dailyBriefingModalBackdrop {
    z-index: 5700; /* Ensure it's on top of other modals */
}


.daily-briefing-modal {
    background: rgba(40, 38, 58, 0.75);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    color: #E0E0E5;
    width: 90%;
    max-width: 480px;
    padding: 30px 35px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    transform: scale(0.95) translateY(15px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.05), opacity 0.35s ease-out;
}

.modal-backdrop:not(.hidden) .daily-briefing-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.briefing-activity-icon {
    font-size: 1.6rem;
    color: #c5affd;
    flex-shrink: 0;
}

.briefing-activity-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.briefing-activity-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.briefing-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.briefing-activity-title {
    font-size: 1rem;
    font-weight: 500;
    color: #E0E0E5;
}

.briefing-content .briefing-intro-text {
    font-size: 1rem;
    color: #b0a8c9;
    text-align: center;
    margin: 0 0 20px 0;
}

.briefing-cta-btn {
    background: #FFFFFF;
    color: #1C1B22;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
}

.briefing-cta-btn:hover {
    background: #f0f0f5;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.2);
}

.briefing-cta-btn i {
    font-size: 1.2rem;
    transition: transform 0.25s ease;
}

.briefing-cta-btn:hover i {
    transform: translateX(3px);
}

.briefing-footer {
    margin-top: 15px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.briefing-header {
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 5px;
}

.briefing-header i {
    font-size: 2.5rem;
    color: #fbc2eb;
    margin-bottom: 10px;
}

.briefing-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    color: #FFFFFF;
}

.briefing-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #A0A0B0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.briefing-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    transform: scale(1.05) rotate(90deg);
}



/* Right Pane Content */
.activity-action-btn-lg { /* CTA button within an activity */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08); /* THE FIX: Changed to a subtle dark background */
    color: #E0E0E5; /* THE FIX: Changed to a light text color */
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15); /* THE FIX: Added a subtle border */
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* THE FIX: Darker shadow */
}

.activity-action-btn-lg:hover {
    background: rgba(255, 255, 255, 0.15); /* THE FIX: Brighter on hover */
    color: #FFFFFF; /* THE FIX: Fully white text on hover */
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); /* THE FIX: Darker shadow */
}
.activity-action-btn-lg i { font-size: 1.2em; }

.activity-body-centered-action {
    width: 100%;
    text-align: center;
}

.activity-content-display {
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    width: 80%;
    min-width: 320px;
    max-width: 700px;
    box-sizing: border-box;
}

.activity-content-display .activity-header {
    display: flex;
    align-items: center;
    gap: 14px; /* Consistent gap */
    margin-bottom: 18px; /* Space before content */
}
.activity-content-display .activity-icon-lg {
    font-size: 1.8rem; /* Adjusted for balance */
    color: #fff; /* Your primary accent */
    line-height: 1; /* Ensure icon aligns well */
}
.activity-content-display .activity-title-lg {
    font-size: 1.35rem; /* Clear, but not overly large */
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.3;
}

.activity-content-display .video-embed {
    width: 100%;
    max-width: 640px; /* Limit video width */
    aspect-ratio: 16 / 9;
    border-radius: 12px; /* Softer radius */
    border: 1px solid rgba(255,255,255,0.1); /* Subtle border for embedded content */
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.concept-chunk-text-area {
    height: 180px; /* Fixed height for the text area */
    /* For more flexibility, you could use max-height, but fixed height ensures no jump */
    /* max-height: 200px; */
    overflow-y: auto;
    padding-right: 8px; /* Space for scrollbar if it appears, to prevent content jump */
    margin-bottom: 20px; /* Space before navigation */
    color: #C8C8D0; /* Slightly softer than pure white for body text */
    font-size: 0.95rem; /* Good reading size */
    line-height: 1.65; /* Comfortable line spacing */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent; /* Subtle scrollbar */
}


.concept-chunk-text-area a {
    color: #7C9AFF; /* Apple-like link blue */
    text-decoration: none;
}
.concept-chunk-text-area a:hover {
    text-decoration: underline;
}

.concept-chunk-text-area blockquote {
    border-left: 3px solid #A78BFA;
    margin-left: 0;
    padding-left: 1.2em;
    color: #A0A0A7; /* Softer for blockquotes */
    font-style: italic;
}

.concept-chunk-text-area code {
    background-color: rgba(255, 255, 255, 0.08); /* Subtle code background */
    padding: 0.15em 0.35em;
    border-radius: 5px;
    font-size: 0.88em;
    color: #D8D8DD;
    font-family: "SF Mono", Monaco, Consolas, "Courier New", monospace;
}

.concept-chunk-text-area p {
    margin: 0 0 1em 0;
}
.concept-chunk-text-area p:last-child {
    margin-bottom: 0;
}
.concept-chunk-text-area strong {
    color: #E9E9ED; /* Brighter for emphasis */
    font-weight: 500;
}

.concept-chunk-text-area::-webkit-scrollbar {
    width: 6px;
}
.concept-chunk-text-area::-webkit-scrollbar-track {
    background: transparent; /* Make track invisible */
}
.concept-chunk-text-area::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.25); /* Subtle scroll thumb */
    border-radius: 3px;
}
.concept-chunk-text-area::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.concept-nav {
    display: flex;
    align-items: center;
    margin-top: 20px; /* Spacing after text area */
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider */
}

.concept-nav .completed-activity-btn {
    background: rgba(40, 167, 69, 0.2) !important;
    border-color: rgba(40, 167, 69, 0.4) !important;
    color: #58D68D !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    cursor: default !important;
}

.concept-nav .completed-activity-btn:hover {
    background: rgba(40, 167, 69, 0.25) !important;
    border-color: rgba(40, 167, 69, 0.5) !important;
}

.concept-nav .concept-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #C0C0C8;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Rubik', sans-serif;
}

/* Style for circular icon buttons (like Next/Prev) */
.concept-nav .concept-nav-btn.icon-only-btn {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.4rem;
    padding: 0;
}

.concept-nav .concept-nav-btn:hover:not(:disabled):not(.completed-activity-btn) {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

.concept-nav .concept-nav-btn:not(.icon-only-btn) {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 7px 18px;
    font-size: 0.9rem;
    font-weight: 500;
}

.concept-nav .icon-only-btn { /* Assuming .concept-nav-btn also has .icon-only-btn */
    background: rgba(255, 255, 255, 0.06); /* Even more subtle for nav controls */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #A8A8B0;
    border-radius: 50%; /* Circular for classic Apple nav chevrons */
    width: 34px;
    height: 34px;
    font-size: 1.4rem; /* Icon size */
}
.concept-nav .icon-only-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}
.concept-nav .icon-only-btn:disabled {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255,255,255,0.25);
    border-color: rgba(255, 255, 255, 0.08);
}


.chunk-progress-bar {
    flex-grow: 1;
    height: 5px; /* Slightly thicker for better visibility */
    background-color: rgba(255, 255, 255, 0.12); /* Track color */
    border-radius: 2.5px;
    margin: 0 18px; /* Spacing around the bar */
    overflow: hidden; /* Important for the fill animation */
}
.chunk-progress-fill {
    height: 100%;
    width: 0%; /* Initial width, JS will update */
    background: #fff; /* Primary accent for fill */
    border-radius: 2.5px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth animation */
}

.course-content-pane::-webkit-scrollbar { width: 6px; }
.course-content-pane::-webkit-scrollbar-thumb { background-color: rgba(167, 139, 250, 0.4); border-radius: 3px; }
.course-content-pane::-webkit-scrollbar-track { background-color: rgba(255, 255, 255, 0.03); }

.course-nav-header-overview h3 {
    font-size: 1.4rem;
    color: #FFFFFF;
    margin: 0 0 8px 0;
}
.course-nav-header-overview p {
    font-size: 0.95rem;
    color: #A0A0B0;
    margin: 0 0 25px 0;
    line-height: 1.5;
}

.course-nav-pane {
    width: 320px; /* Fixed width for nav */
    flex-shrink: 0;
    background: rgba(20, 18, 38, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    overflow-y: auto; /* Scrollable */
    box-sizing: border-box;
    scrollbar-width: thin;
    /* This sets the thumb and track color for Firefox */
    scrollbar-color: #fff rgba(20, 18, 38, 0.5);
}

.course-nav-pane::-webkit-scrollbar { width: 6px; }

.course-nav-pane::-webkit-scrollbar-track {
    /* This sets the track color for Chrome/Safari to match the pane background */
    background-color: rgba(20, 18, 38, 0.5); 
}
.course-nav-pane::-webkit-scrollbar-thumb { 
  background-color: rgba(167, 139, 250, 0.4); 
  border-radius: 3px; }

  .course-progress-bar-fill {
    height: 100%;
    width: 0%; /* Default to 0% */
    background: linear-gradient(90deg, #a18cd1 0%, #fbc2eb 100%);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-progress-bar-track {
    width: 100%;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.course-progress-container {
    margin-top: 15px;
    margin-bottom: 10px;
}

.course-progress-label {
    display: block;
    font-size: 0.9em;
    font-weight: 500;
    color: #A0A0B0;
    margin-bottom: 8px;
}

.course-title-display {
    text-align: center;
    width: 100%;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #FFFFFF;
}

.course-view-container {
    display: flex;
    flex-grow: 1; /* Fill remaining space in modal */
    overflow: hidden; /* Key for two-pane layout */
}

.current-date-month-display {
    font-size: 1.05rem;
    font-weight: 500;
    color: #C0C0C8;
    min-width: 150px; /* Ensure enough space for date */
    text-align: center;
}

.nav-pane-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 15px;
    padding: 20px;
    box-sizing: border-box;
}

.nav-pane-loader .loading-spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
    border-top-color: #A78BFA;
}

.nav-pane-loader p {
    font-size: 0.95em;
    color: #A0A0B0;
    text-align: center;
}

 .schedule-calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 8px;
      flex-grow: 1;
      overflow-y: auto;
      padding: 5px;
      max-height: calc(90vh - 200px);
      scrollbar-width: thin;
      scrollbar-color: rgba(161, 140, 209, 0.6) rgba(255, 255, 255, 0.05);
    }

    .schedule-calendar-grid-header {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      text-align: center;
      color: #aaa;
      font-size: 0.85em;
      font-weight: 500;
      padding-bottom: 8px;
      margin-bottom: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

.schedule-calendar-grid::-webkit-scrollbar {
      width: 6px;
    }

    .schedule-calendar-grid::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 3px;
    }

    .schedule-calendar-grid::-webkit-scrollbar-thumb {
      background-color: rgba(161, 140, 209, 0.5);
      border-radius: 3px;
    }

    .schedule-calendar-grid::-webkit-scrollbar-thumb:hover {
      background-color: rgba(161, 140, 209, 0.8);
    }

    .schedule-item {
      background-color: #3a3a52;
      border-left: 3px solid #a18cd1;
      color: #e0e0e0;
      padding: 4px 8px;
      border-radius: 4px;
      margin-top: 4px;
      font-size: 0.85em;
      line-height: 1.3;
      width: 100%;
      box-sizing: border-box;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: default;
    }

    .schedule-item:hover {
      background-color: #4a4a65;
    }

.activities-list-daily-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.activities-list-daily-nav .activity-nav-item {
    padding: 14px 18px; /* Increased padding */
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid transparent; /* Start transparent */
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
}

.activities-list-daily-nav .activity-nav-item.active {
    background: #A78BFA; /* THE FIX: Changed from #fff to the accent color */
    border-color: #A78BFA;
    transform: translateX(6px) scale(1.01);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.25);
}

.activities-list-daily-nav .activity-nav-item.active .activity-icon-sm,
.activities-list-daily-nav .activity-nav-item.active .activity-nav-title {
    color: #1C1B22;
}


.activities-list-daily-nav .activity-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.activity-nav-item .activity-icon-sm {
    font-size: 1.6rem; /* Slightly larger */
    color: #A0A0B0;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.activity-nav-item .activity-nav-title {
    font-size: 1rem;
    font-weight: 500;
    color: #D0D0D8;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.activity-nav-item:hover .activity-icon-sm {
    color: #C0C0C8;
}

.activity-nav-item:hover .activity-nav-title {
    color: #FFFFFF;
}

.calendar-day {
      background-color: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 8px;
      padding: 8px;
      min-height: 100px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      font-size: 0.9em;
      transition: background-color 0.2s ease;
      position: relative;
      overflow: hidden;
    }


    .calendar-day-cell {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    border-radius: 10px;
    min-height: 90px;
    padding: 8px;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: stretch;    /* Make children take full width */
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 3px;
}


.calendar-day-cell.generating-day {
    background-color: rgba(255, 255, 255, 0.06);
    animation: pulse-bg 2.5s infinite ease-in-out;
    cursor: not-allowed;
}


.calendar-day-cell.generating-day .calendar-day-number {
    opacity: 0.6;
}

.calendar-day-cell.other-month {
    opacity: 0.3;
    cursor: default;
    background: transparent;
    border-color: transparent;
}
.calendar-day-cell.other-month:hover { transform: none; box-shadow: none; }

.calendar-day-cell.today .calendar-day-number {
    background-color: #A78BFA;
    color: #1C1B22;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-weight: 600;
}

.calendar-day-cell:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.calendar-day-cell:hover .calendar-day-topic {
    filter: brightness(1.1); /* Makes the existing color slightly brighter on hover */
}


.calendar-day-number {
    align-self: flex-end; /* Keep it on the right */
    flex-shrink: 0; 
    font-weight: 600;
    color: #ccc;
    padding: 2px 4px;
    font-size: 0.9em;
    line-height: 1;
    /* REMOVED margin-bottom: auto; */
}

.calendar-day-topic {
    font-size: 0.75rem;
    border-left-width: 3px;
    border-left-style: solid;
    border-radius: 4px;
    padding: 5px 8px;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    transition: filter 0.2s ease;
}

.calendar-day-topic.loading {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: transparent !important;
    color: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}

.calendar-day-topic.user-test-event {
    background-color: #EC7063 !important; /* A distinct reddish-pink color */
    border-color: #F1948A !important;
    color: #FFFFFF !important;
    font-weight: 600;
}

.calendar-day.other-month {
      opacity: 0.4;
      background-color: transparent;
      border-color: transparent;
    }

    .calendar-day.other-month .day-number,
    .calendar-day.other-month .schedule-item {
      visibility: hidden;
    }

     .calendar-day.today .day-number {
      background-color: #a18cd1;
      color: #1e1e2f;
      border-radius: 50%;
      width: 20px;
      height: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }

    .calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: #808090; /* Softer header color */
    font-size: 0.85rem;
    font-weight: 500;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calendar-events-container {
    display: flex;
    flex-direction: column-reverse; /* THIS IS THE KEY: Stacks items from bottom to top */
    gap: 3px; 
    width: 100%;
    margin-top: auto; /* THIS IS THE KEY: Pushes this container to the bottom of the cell */
}

.calendar-grid-container {
    width: 100%;
    padding: 15px; /* Slightly reduced padding */
    background: rgba(255, 255, 255, 0.02); /* Very subtle background */
    border-radius: 14px;
    box-sizing: border-box;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px; /* Increased gap */
    margin-bottom: 8px;
}

 .day-number {
      font-weight: 600;
      color: #ccc;
      margin-bottom: 5px;
      align-self: flex-end;
      padding: 2px 4px;
      font-size: 0.9em;
      line-height: 1;
    }

.lesson-group { margin-bottom: 30px; }

.lesson-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lesson-number-badge {
    background: #4A4A65;
    color: #E0E0E5;
    font-weight: 600;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.lesson-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #E0E0E5;
}

.topic-item {
    position: relative;
    padding: 8px 0 18px 28px; /* Adjusted padding */
    cursor: pointer;
}

.topic-item-date {
    font-size: 0.8rem;
    color: #707080; /* Darker, less prominent date */
}

.topic-item-title {
    font-weight: 400; /* Regular weight */
    font-size: 0.95rem;
    color: #C0C0C8;
    transition: color 0.2s ease;
    display: block; /* Ensure it takes full width for ellipsis if needed */
    margin-bottom: 3px;
}

.topic-item:hover .topic-item-title, 
.topic-item.active .topic-item-title {
    color: #FFFFFF;
}


.topic-item:hover::before, 
.topic-item.active::before {
    background: #A78BFA;
    transform: scale(1.1);
    border-color: #A78BFA; /* Match dot fill on hover/active */
}

.topic-item::before {
    content: '';
    position: absolute;
    left: -10px; /* (Half of (dot width + border)) - (timeline border width / 2) */
    top: 13px; /* Adjust for vertical alignment */
    width: 10px;
    height: 10px;
    background: #3A384C; /* Dot color matches line */
    border: 3px solid #1A1826; /* Background of nav pane */
    border-radius: 50%;
    transition: all 0.2s ease;
}


.topic-timeline {
    list-style: none;
    padding-left: 2px; /* Space for the line and dot */
    margin-left: 14px; /* Align with lesson number badge center */
    border-left: 2px solid #3A384C; /* Darker, subtle line */
}

.view-mode-slider {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    border-radius: 16px;
    background: #fff; /* THE FIX: Changed back to white to match the active state */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0,0,0,0.1); /* THE FIX: Changed to a more neutral shadow */
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.view-mode-toggle {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 4px;
    flex-shrink: 0;
}

#editScheduleBtn, 
#addTestBtn, 
#deleteScheduleBtn, 
#viewPlaylistBtn {
    background: transparent;
    border: none;
    color: #C0C0C8;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#editScheduleBtn:hover, 
#addTestBtn:hover, 
#deleteScheduleBtn:hover, 
#viewPlaylistBtn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    transform: scale(1.1);
}

#deleteScheduleBtn:hover {
    background: rgba(255, 82, 82, 0.15); /* A subtle red background */
    color: #ff5252; /* A brighter red icon color */
    transform: scale(1.1);
}
#viewPlaylistBtn:hover {
    background: rgba(255, 0, 0, 0.15); /* A subtle red background */
    color: #ff4d4d; /* A brighter red icon color */
}


.adjust-form-fields { 
  display: flex; 
  flex-direction: column; 
  gap: 20px; 
  margin-bottom: 15px; 
}

.adjust-form-fields .slider-container { width: auto; /* Override default width if needed */ }




















    








