/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins-Regular';
}

/* Header and Footer additionall styling */
header, footer {
    margin: 0px 144px;
}

/* Scores and Lessons Title */
.scores_title, .lessons_title {
    color: #FE6D00;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Main Layout */
main {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: start;
    margin: 10px 144px 100px 144px;
    gap: 30px;
}

.scores, .lessons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Progress Bar Circle */
.progress_bar_hours {
    width: 100px;
    height: 100px;
    position: relative;
}
  
.outer {
    height: 100px;
    width: 100px;
    padding: 10px;
    box-shadow: 6px 6px 10px -1px rgba(0, 0, 0, 0.15), -6px -6px 10px -1px rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}
  
.inner {
    height: 80px;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 4px 4px 6px -1px rgba(0, 0, 0, 0.2), inset -4px -4px 6px -1px rgba(255, 255, 255, 0.7),
      -0.5px -0.5px 0px rgba(255, 255, 255, 1), 0px 6px 5px -5px rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}
  
#progress_percentage {
    font-weight: 600;
    color: #232360;
    font-size: 1.5rem;
}
  
circle {
    fill: none;
    stroke: url(#GradientColor);
    stroke-width: 10px;
    transition: stroke-dashoffset 0.025s linear;
}
  
.svg_hours_stat {
    position: absolute;
    top: 0;
    left: 0;
}

/* Recommended Hours Section */
.recommended_hours {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    background-color: #F6F6F8;
    padding: 30px 20px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    gap: 20px;
}

.hours_title {
    color: #232360;
    font-size: 1.8rem;
    font-weight: bold;
}

.hours_amount {
    color: #768396;
    font-size: 1.4em;
    padding-top: 10px;
}

/* Stat Elements */
.stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: auto;
}

.parallel_parking, .perpendicular_parking, .driving_at_night, .driving_on_a_motorway {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    text-align: center;
}

.stat_image {
    width: 20%;
    min-width: 30px;
    max-width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.stat_image > img {
    width: 100%;
    height: auto;
}

.stat_info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.stat {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px;
}

.stat_title {
    color: #232360;
    font-size: 1.5rem;
}

.stat_amount {
    color: #768396;
    font-size: 1.5rem;
}

.stat_progress {
    width: 100%;
    height: 20px;
    padding: 0px 10px;
}

#parallel_progressBar, #perpendicular_progressBar, #night_progressBar, #motorway_progressBar {
    transition: width 0.2s linear;
}


#parallel_progressBar {
    fill: url(#parallelGradient);
}

#perpendicular_progressBar {
    fill: url(#perpendicularGradient);
}

#night_progressBar {
    fill: url(#nightGradient);
}

#motorway_progressBar {
    fill: url(#motorwayGradient);
}

/* Lesson Details */
.lesson {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #F6F6F8;
    border-radius: 10px;
    padding: 20px 40px;
}

.lesson_date {
    font-size: 0.8rem;
}

.lesson_date_and_assessment {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 20px;
}

.lesson_date_circle{
    width: 60px;
    height: 60px;
    border: 5px solid #232360;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.assessment_title {
    font-size: 1.4rem;
}

.star, .star2 {
    font-size: 1.5rem;
    color: #e0e0e0;
}

.star2 {
    cursor: pointer;
}

.star.selected, .star2.selected {
    color: #ffa500;
}

/* Add Lesson Button */
.add_lesson {
    background-color: #7DD8FF;
    color: #004085;
    font-size: 1rem;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0px 0px 0px;
}

.add_lesson:hover {
    background-color: #004085;
    color: #7DD8FF;
}

/* Lessons Container */
#lessonsContainer {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    max-height: 440px;
    overflow-y: auto;
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 2;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
}


.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


.add_lesson_heading {
    font-size: 1.5rem;
    color: #232360;
    font-family: 'Poppins-Bold';
}

.add_lesson_subheading {
    font-size: 1rem;
    color: #6F6C90;
    font-family: 'Poppins-Light';
}

.add_lesson_date, .add_lesson_stats {
    font-size: 1rem;
    color: #232360;
}

.add_lesson_date {
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    gap: 10px;
}

.add_stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
}

.parallel_parking2, .perpendicular_parking2 {
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.stat2 {
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.stat_title2, .assessment_title2 {
    font-size: 1rem;
    font-family: 'Poppins-Medium';
}

.stat_amount_counter {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
}

.counterButton {
    width: 30px;
    font-size: 1.3rem;
    padding: 0px 0px;
    margin: 0px 15px;
    border-radius: 5px;
    border: none;
    background-color: transparent;
    color: #004085;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.counterButton:hover {
    background-color: #004085;
    color: #7DD8FF;
}

#counterSection {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

#counterValue {
    font-size: 20px;
    margin: 0 10px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nightdrivestat > img, .motorwaystat > img {
    width: 30px;
    height: auto;
    margin-right: 10px;
}

.nightdrivestat, .motorwaystat {
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    text-align: center;
}

.yesNoButton {
    width: 70px;
    font-size: 1rem;
    padding: 3px 6px;
    margin: 5px;
    border-radius: 50px;
    border: none;
    background-color: #7DD8FF;
    color: #004085;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
}

.yesNoButton.selected {
    background-color: #004085;
    color: #7DD8FF;
}

.yesNoButton:hover {
    background-color: #004085;
    color: #7DD8FF;
}

#submitLessonBtn {
    all: unset;
    display: block; 
    margin: 0px auto;
    width: 200px;
    height: 40px;
    font-size: 1.2rem;
    font-weight: 400;
    padding: 3px 6px;
    border-radius: 50px;
    border: none;
    background-color: #7DD8FF;
    color: #004085;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
}

#submitLessonBtn:hover {
    background-color: #004085;
    color: #7DD8FF;
}

/* Responsive Styles */
@media (max-width: 1080px) {
    header, footer {
        margin: 0px 20px;
    }

    .driving_on_a_motorway {
        margin-bottom: 40px;
    }

    .modal-content {
        top: 250px;
        max-height: 80vh;
    }
}

@media (max-width: 768px) {
    /* Adjustments for smaller screens */
    .driving_on_a_motorway {
        margin-bottom: 0px;
    }

    .add_lesson {
        margin: 0px 0px 100px 0px;
    }

    .scores_title, .lessons_title {
        font-size: 2rem;
        text-align: center;
    }

    main {
        flex-direction: column;
        margin: 50px 20px;
        align-items: center;
    }

    .scores, .lessons {
        width: 90%;
    }

    .add_lesson_heading {
        font-size: 1.2rem;
        text-align: center;
    }

    .add_lesson_subheading {
        font-size: 1rem;
        text-align: center;
    }

    .hours_amount, .stat_amount {
        font-size: 1.2rem;
    }

    .stat_title, .assessment_title {
        font-size: 1.2rem;
    }

    .lesson {
        padding: 15px;
        margin: 10px auto;
    }

    .lesson_date_and_assessment {
        gap: 15px;
    }

    .stat_image > img {
        width: 30px;
    }

    .add_stats {
        gap: 10px;
    }

    .counterButton {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }

    #submitLessonBtn {
        width: 150px;
        height: 40px;
        font-size: 0.9rem;
    }

    .modal-content {
        max-width: 90%;
        padding: 15px;
        transform: translateY(-50%);
    }

    .star2 {
        font-size: 20px;
    }

    .add_lesson {
        font-size: 0.9rem;
        padding: 5px 10px;
        gap: 10px;
    }


    #lessonsContainer {
        flex-direction: column;
        justify-content: start;
        align-items: start;
        max-height: 240px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    /* Extra small screen adjustments */
    
    .recommended_hours {
        padding: 15px 0px;
    }

    .scores_title, .lessons_title {
        font-size: 1.8rem;
    }

    .add_lesson_heading {
        font-size: 1rem;
    }

    .add_lesson_subheading {
        font-size: 0.9rem;
    }

    .hours_title {
        font-size: 1rem;
    }

    .hours_amount, .stat_amount {
        font-size: 1rem;
    }

    .stat_title, .assessment_title {
        font-size: 0.9rem;
    }

    #submitLessonBtn {
        width: 130px;
        height: 35px;
        font-size: 0.8rem;
    }

    .counterButton {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    #lessonsContainer {
        flex-direction: column;
        justify-content: start;
        align-items: start;
        max-height: 240px;
        max-width: 90%;
    }

    .star{
        font-size: 1rem;
    }

    .modal-content {
        max-height: 60vh;
    }
}

@media (max-width: 375px) {
    .assessment_title {
        font-size: 0.7rem;
    }
}