:root {
  --pri: #003D99;
  --priD: #000B52;
  --sec: #4A93FF;
  --MainTextColor: #FFFFFF;
  --lite: #fff;
  /*Dark*/
  --priDark: #0E0081;
  --priDDark: #000064;
  --secDark: #1F4379;
  --MainTextColorDark: #FFFFFF;
  --liteDark: #B5B5B5;
  --BoxBack: #000;
  --BoxBackD: #68A4F3;
}

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

body {
  overflow-x: hidden;
  overflow-y: scroll;
  font-family: 'Roboto', sans-serif;
  font-size: 4vw;
  background-color: #FFFFFF;
}

.Year_Container {
  width: 90vw;
  margin: 8vw auto;
  border-radius: 5vw;
  background: linear-gradient(to right, var(--pri), #0054D2);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
  color: #FFF;
}

.dark .Year_Container {
  box-shadow: 0 10px 18px rgba(360, 360, 360, 0.2);
}

#GPA_interface,
#CGPA_interface {
  display: grid;
  align-items: left;
  font-size: 6vw;
  padding: 40vw 5vw;
  background-color: transparent;
}

#numberOfCourseContainer,
#level {
  width: 100%;
  height: 15vh;
  white-space: nowrap;
  /* Prevents text wrapping */
  overflow: hidden;
  /* Hides overflowed text */
  animation: typing 2s steps(30, end);
  background-color: transparent;
}

input {
  width: 18vw;
  font-size: 4vw;
  text-align: center;
  border-style: none;
  border-bottom-style: solid;
  border-color: #000;
  background-color: inherit;
  animation: appear 1.5s;
}

#TableContainer {
  width: 100vw;
  margin: 1vh auto 1vh auto;
  padding: 4vh 0vw;
  overflow: hidden;
}

#Calculator,
#CCGPA_Container,
.TableContainers {
  display: none;
}

#CGPA_Container {
  margin-top: 2vh;
}

.Results_Table {
  margin: 2vw auto auto 5vw;
  padding: 0rem;
  width: 85vw;
  font-size: 5vw;
  border-style: solid;
  border-color: var(--pri);
  border-radius: 1rem;
  border-width: 0.5rem;
  background-color: #FFFFFF;
  color: #000;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.dark .Results_Table {
  box-shadow: 5px 5px 15px rgba(360, 360, 360, 0.6);
  background: #020017;
}

.Results_Table h4 {
  text-decoration: underline;
}

.Year_Container {
  animation: appear 0.2s;
}

.TableContainers {
  width: 90%;
}

.Year_Container .TableContainers {
  height: 300vh;
  position: absolute;
  top: 10%;
}

.Year_Container .Results_Table {
  width: 85vw;
  position: relative;
  top: -4vh;
  right: 4vw;
  z-index: 0;
  margin: auto;
}

#CGPA_Container .TableContainers::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #fffb;
  z-index: 0;
}

.dark #CGPA_Container .TableContainers::before {
  background-color: #000b;
}

.Year_Title {
  display: grid;
  grid-template-columns: 29fr 1fr;
}

.SemeTitle {
  display: grid;
  grid-template-columns: 50fr 1fr;
}

.Semester_Title {
  font-size: 4vw;
}

.headRow {
  margin-bottom: 1.6rem;
}

.headRow * {
  font-size: 5vw;
  font-weight: 700;
  text-align: center;
}

.headRow .Credit_Unit {
  overflow-wrap: break-word;
}

.tableRow,
.headRow {
  margin: 0.7rem 0rem;
  padding: 0.2rem 0rem;
  display: grid;
  grid-template-columns: 0.3fr 1fr 1.1fr 1fr;
  animation: appear 1.5s;
}

.tableRow {
  border-top: solid 0.1px var(--priDDark);
}

.tableRow>*,
.headRow>* {
  text-align: center;
  height: 5vh;
  margin: auto;
}

.noResult {
  display: none;
  color: #FF1600;
  font-size: 1.4vh;
}

.Course_Title {
  width: 50vw;
}

.Course_Title input {
  font-size: 3.5vw;
}

.Grade {
  width: 60vw;
}

.Credit_Unit {
  font-size: 6vw;
}

.deleter {
  height: 5vh;
  width: 5vh;
  overflow-x: hidden;
  position: relative;
  left: 8vh;
  bottom: 4.7vh;
  z-index: 0;
  border-style: solid;
  border-width: 0.3rem;
  border-radius: 45%;
  border-color: #FF0007;
  border-top-style: none;
  opacity: 700;
  padding: 0px;
  background-color: #fff;
  animation: appear 3.1s;
}

.Add_Row {
  display: block;
  margin: 0.3rem auto 0px 1rem;
  width: 9vh;
  height: 9vh;
  border-radius: 1.2rem;
  background-color: var(--sec);
  color: #fff;
  margin: 0px;
  margin-left: 1vw;
  font-size: 4vh;
  text-align: center;
  font-weight: 600;
  position: relative;
  bottom: 5.3vh;
  left: 1vw;
  z-index: 1;
}

.Done {
  position: relative;
  bottom: 14.3vh;
  width: 9vh;
  height: 9vh;
  font-size: 4vh;
  display: block;
  border-radius: 1.2rem;
  background-color: var(--pri);
  color: #fff;
  margin: 0px;
  text-align: center;
  font-weight: 600;
  margin: 0.3rem 1.5rem 0px auto;
  z-index: 1;
}

.checkSection {
  margin: 0.5rem auto 2vh auto;
  padding: 0px;
  display: grid;
  grid-template-columns: 30vw 30vw 30vw;
  grid-column-gap: 1rem;
  display: none;
}

.checkSection * {
  border-radius: 3vw;
  color: var(--lite);
  margin: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  overflow: hidden;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.dark .checkSection * {
  box-shadow: 0 10px 15px rgba(360, 360, 360, 0.2);
}

#addCourse,
#addYear,
#checkGPA,
#checkCGPA,
.SaveResult {
  height: 10vh;
  width: 10vh;
  margin: auto;
  background-color: var(--sec);
  color: #fff;
}

.viewSaved {
  margin: 3vh 6vw;
  width: 85vw;
  height: 8vh;
  background-color: var(--sec);
  color: #fff;
}

#addCourse,
#addYear {
  font-size: 8vh;
}

.checker,
#checkCGPA,
#checkGPA {
  background-color: var(--pri);
}

#addYear {
  margin: 0.2rem auto;
}

.CGPA_Control_i {
  margin-bottom: 17vh;
}

@keyframes smaller {
  0% {
    scale: 1;
  }
  
  100% {
    scale: -0.00000001;
  }
}

@keyframes appear {
  0% {
    scale: 0;
  }
  
  98% {
    scale: 1.02;
  }
  
  100% {
    scale: 1;
  }
}

@keyframes aware {
  0% {
    scale: 0;
  }
  
  50% {
    scale: 1.5;
  }
  
  100% {
    scale: 1;
  }
}

/* Typing effect */
@keyframes typing {
  0% {
    width: 5vw;
    /* Initial width is 0 */
  }
  
  100% {
    width: 90vw;
    /* Expand to full width of content */
  }
}

@keyframes myAdsA {
  to {
    opacity: 1;
  }
}

#startPage {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

#startPage header {
  background: #003D99;
  /*  linear-gradient(135deg, #000B52, #0E0081);*/
  color: white;
  padding: 1.5vh 0vw 5vh 2vw;
  margin-bottom: 3vh;
  text-align: left;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: 50px;
  border-bottom-right-radius: 50px;
  animation: fadeIn 1s ease forwards;
  opacity: 0;
}

#startPage header h1 {
  font-size: 5.5vh;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 3.5rem;
  margin-left: 4.5vw;
}

#startPage header p {
  font-size: 5vw;
  font-weight: 400;
  margin: 2vh 0px;
  margin-left: 5vw;
}

#startPage .btn {
  background: #FFC600;
  color: white;
  padding: 2vh 2.5vw;
  margin: 0px;
  margin-left: 60%;
  text-decoration: none;
  border-radius: 7vw;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: 7vw;
  font-weight: 700;
}

#startPage .btn:hover {
  background: #FFCC1C;
  transform: translateY(-2px);
  /* Slight floating effect */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#startPage section {
  padding: 60px 20px;
  text-align: center;
}

#startPage #features {
  padding: 6vh 8vw;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: -50px;
  /* Overlap for visual appeal */
}

#startPage .feature-list {
  display: grid;
  margin-top: 3vh;
}

#startPage .feature {
  width: 70vw;
  padding: 10vw;
  margin: 3vh auto;
  border-radius: 5vw;
  background: linear-gradient(to right, var(--pri), #2377F4);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
  color: #FFF;
  opacity: 0;
  transform: translateY(20px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#startPage .feature:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

#startPage .feature h3 {
  margin: 10px 0;
  font-size: 5vh;
  font-weight: 600;
}

#startPage .feature p {
  font-size: 5vw;
  font-weight: 300;
  margin-top: 5px;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    /* Fade to visible */
  }
}

@keyframes slideIn {
  to {
    opacity: 1;
    /* Fade to visible */
    transform: translateY(0);
    /* End at original position */
  }
}

#startPage .feature-list .feature:nth-child(1) {
  animation: slideIn 0.5s ease forwards;
  animation-delay: 0.4s;
}

#startPage .feature-list .feature:nth-child(2) {
  animation: slideIn 0.5s ease forwards;
  animation-delay: 0.5s;
}

#startPage .feature-list .feature:nth-child(3) {
  animation: slideIn 0.5s ease forwards;
  animation-delay: 0.6s;
}

#startPage .feature-list .feature:nth-child(4) {
  animation: slideIn 0.5s ease forwards;
  animation-delay: 0.7s;
}

#startPage footer {
  text-align: center;
  padding: 20px;
  background: var(--priDark);
  color: white;
}

#startPage footer a {
  color: #57A9FA;
}

#startPage a {
  text-decoration: none;
  color: inherit;
}

@media screen and (orientation: landscape) {
  #startPage .feature-list {
    grid-template-columns: 1fr 1fr;
  }
  
  #startPage .feature {
    width: 40vh;
  }
  
  .tableRow {
    padding-top: 3vh;
    margin: 3vh auto;
  }
}