/* Apply the theme variables */
body {
  font-family: "Source Sans Pro", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition:
    background-color 0.3s,
    color 0.3s;

  -webkit-font-smoothing: subpixel-antialiased;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.navbar {
  height: 44px;
  box-shadow: 0px 5px 12px 0px rgba(46, 51, 51, 0.18);
  border-radius: 4px;
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
}

.navbar .right-section {
  display: flex;
  align-items: center;
  gap: 8px; 
}

#themeToggleButton{
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

#themeToggleButton:hover {
  transform: scale(1.8); /* 悬停时放大 */
}

#themeIcon {
  font-size: 18px; /* 设置图标大小 */
  color: var(--text-color); /* 根据主题动态调整颜色 */
  transition: color 0.3s ease; /* 平滑的颜色变化 */
}

/* Light Theme Navbar */
.light .navbar {
  background-color: var(--navbar-color);
  color: var(--text-color);
  border-bottom: 2px solid #ced4da;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark Theme Navbar */
.dark .navbar {
  background-color: var(--navbar-color);
  color: var(--text-color);
  border-bottom: 2px solid #495057;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar_title {
  font-weight: bold;
  font-size: 24px;
  margin-left: 10px;
}

.navbar_value {
  font-weight: bold;
  font-size: 16px;
  margin-right: 10px;
  background: #ff4d4d;
  padding: 5px 10px;
  border-radius: 4px;
}

.course_card_list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 10px;
  padding: 10px;
}

.course_card_container {
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0px 1px 10px 0px rgba(46, 51, 51, 0.18);
  background: var(--bg-color);
}

.course_card_container:hover {
  border-color: #ddd;
  transition:
    background,
    border-color 300ms;
  transform: scale(1.1);

}

.grade_input {
  margin-left: 5px;
  padding-left: 5px;
}
.course_card_anchor {
  text-decoration: none;
  color:  var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.course_card_image {
  width: 115px;
  height: 195px;
  border-radius: 8px;
  object-fit: contain;
}

.course_card_name,
.course_card_price,
.course_atc_button {
  margin-top: 10px;
}

.course_card_name {
  font-weight: bold;
}

.course_atc_button {
  width: auto;
  height: 44px;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  background: #dd2c00;
  color: var(--bg-color);
  transition: background 300ms;
  font-weight: bold;
}

.course_atc_button:hover {
  background: #ddd;
  background: #c41c00;
}

.course_detail_container {
  padding: 10px;
  cursor: pointer;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.course_detail_image {
  height: 30vh;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 5px;
  box-sizing: border-box;
}

.loading_spinner_container {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.loading_spinner {
  border-radius: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid #333;
  border-top-color: #fff;
  animation: loading_spinner_animation 1s infinite linear;
}

@keyframes loading_spinner_animation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading_spinner_text {
  margin-top: 10px;
}

.button-28 {
  appearance: none;
  background-color: var(--bg-color);
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  box-sizing: border-box;
  color: var(--text-color);
  cursor: pointer;
  display: inline-block;
  font-family:
    Roobert,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol";
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  margin: 0;
  min-height: 20px;
  min-width: 0;
  outline: none;
  padding: 4px 12px;
  text-align: center;
  text-decoration: none;
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  width: auto;
  will-change: transform;
}

.button-28:disabled {
  pointer-events: none;
}

.button-28:hover {
  color: #fff;
  background-color: #1a1a1a;
  box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
  transform: translateY(-2px);
}

.button-28:active {
  box-shadow: none;
  transform: translateY(0);
}

.gpa-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.home-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 300px;
}

.generate-button {
  position: absolute;
  left: 50%;   
  margin: 30px auto;
}

/* Default light theme */
.light {
  --bg-color: #ffffff;
  --navbar-color: #d9e6f2;
  --text-color: #000000;
}

/* Dark theme */
.dark {
  --bg-color: #42404b;
  --navbar-color: #52667a;
  --text-color: #ffffff;
}


button {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.container {
  text-align: center;
  margin-top: 50px;
}

