:root {
  --bg-main: #f4f4f9;
  --text-main: #333;
  --panel-bg: #fff;
  --header-bg: #2196F3;
  --button-bg: #2196F3;
  --button-hover: #1976D2;
  --footer-bg: #2196F3;
  --task-hover: #f0f4ff;
}

body.dark {
  --bg-main: #121212;
  --text-main: #ddd;
  --panel-bg: #1e1e1e;
  --header-bg: #333;
  --button-bg: #555;
  --button-hover: #777;
  --footer-bg: #333;
  --task-hover: #1a1a1a;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  display: flex;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main);
}

header {
  background-color: var(--header-bg);
  height: 80px;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

nav {
  position: absolute;
  right: 10vw;
  line-height: 80px;
}

nav ul {
  display: flex;
  gap: 50px;
  margin-right: 150px;
}

nav li {
  display: flex;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 16px;
}

.menu {
  display: none;
}

h1 {
  color: white;
  position: absolute;
  top: 0;
  left: 20%;
  transform: translateX(-50%);
  line-height: 80px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mode_toggle {
  position: absolute;
  right: 20px;
  top: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: white;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.mode_toggle:hover {
  opacity: 1;
}

footer {
  background-color: var(--footer-bg);
  height: 80px;
  width: 100%;
  position: absolute;
  bottom: 0;
}

footer p {
  color: #bdbdbd;
  font-size: 13px;
  position: absolute;
  top: 0;
  line-height: 80px;
  left: 50%;
  transform: translateX(-50%);
}

.operation_panel {
  position: absolute;
  top: 100px;
  background-color: var(--panel-bg);
  width: 50vw;
  padding: 30px;
  margin-top: 50px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.input_area {
  display: flex;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.text_bar {
  flex-grow: 1;
  border: none;
  background-color: #eef2f7;
  padding: 10px 15px;
  outline: none;
  font-size: 16px;
}

.button {
  background-color: var(--button-bg);
  border: none;
  color: white;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: var(--button-hover);
}

.list {
  list-style-type: none;
  padding: 20px 0;
}

.list li {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
  align-items: center;
  animation: fadeIn 0.4s ease;
}

.list li:hover {
  background-color: var(--task-hover);
  transition: background-color 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.list label {
  flex-grow: 1;
  font-size: 16px;
  transition: color 0.3s ease;
}

.check_box {
  margin-right: 15px;
  cursor: pointer;
  transform: scale(1.2);
}

.trash_can {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  font-size: 18px;
  transition: opacity 0.3s ease;
}

.trash_can:hover {
  opacity: 1;
  color: #f44336;
}
/* 响应式设计语法 */
@media   (max-width: 768px) {
  header {
    height: 80px;
  }

  /* .menu {
    display: block;
    background-color: transparent;
    color: white;
    font-size: 25px;
    border: none;
    position: absolute;
    left: 20px;
    top: 23px;
    z-index: 1000;
    cursor: pointer;
  } */

  h1 {
    font-size: 25px;
    left: 30%;
    display:  flex;
    align-items: center;
    height: 80px;
  }
  
  nav ul {
    gap: 20px;
    margin-right: 50px;
    /* display:  flex;
    align-items: center;
    height: 80px; */
    display: none;
  }
  
  .operation_panel {
    width: 90%;
    padding: 20px;
    top: 80px;
  }
  
  .mode_toggle {
    right: 15px;
    margin-top: 0;
    top: 25px;
    font-size: 20px;
  }

  .list {
    padding: 20px 0;
  }

  footer {
    display: fixed;
  }

  footer p {
    font-size: 12px;
    line-height: 80px;
  }
}