* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.Form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .Form:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  }
}

textarea {
  height: 10rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #2d3748;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 15px 20px;
  margin: 10px auto;
  font-size: 1rem;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #2d3748;
}

input::placeholder,
textarea::placeholder {
  color: #a0aec0;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin-top: 10px;
}

@media (hover: hover) and (pointer: fine) {
  button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  }
}

button:active {
  transform: scale(0.98);
}

@media (max-width: 600px) {
  .Form {
    padding: 30px 25px;
  }

  input,
  button,
  textarea {
    padding: 12px 18px;
    font-size: 0.95rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .top-buttons {
    top: 10px;
    right: 10px;
  }

  .top-buttons button {
    min-width: 180px;
    padding: 10px 15px;
    font-size: 0.9rem;
  }

}

@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  }

  .Form {
    background: rgba(45, 55, 72, 0.95);
  }

  input,
  textarea {
    background: rgba(26, 32, 44, 0.6);
    border-color: rgba(102, 126, 234, 0.3);
    color: #e2e8f0;
  }

  h2 {
    color: #e2e8f0;
  }

  input::placeholder,
  textarea::placeholder {
    color: #718096;
  }

  input:focus,
  textarea:focus {
    background: rgba(26, 32, 44, 0.8);
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
  }

  button {
    color: white;
  }

  .section-title {
    color: #e2e8f0;
  }

  .task-item {
    background: rgba(45, 55, 72, 0.95);
    border-color: #4a5568;
  }

  .task-item.completed {
    background: rgba(26, 32, 44, 0.95);
    border-color: #2d3748;
  }

  .task-description {
    color: #e2e8f0;
  }

  .task-description.completed {
    color: #a0aec0;
  }

  .task-creator {
    color: #cbd5e0;
  }

  .no-tasks,
  .loading {
    color: #cbd5e0;
  }

  #message.error {
    background-color: rgba(254, 202, 202, 0.2);
    color: #fc8181;
    border-color: #c53030;
  }

  #message.success {
    background-color: rgba(198, 246, 213, 0.2);
    color: #68d391;
    border-color: #38a169;
  }
}


.top-buttons {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.top-buttons form {
  margin: 0;
}

.top-buttons button {
  width: auto;
  min-width: 240px;
  padding: 12px 20px;
  font-size: 0.95rem;
  margin-top: 0;
}

.tasks-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
}

.section-title {
  font-size: 24px;
  margin: 20px 0 10px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #4CAF50;
  color: #2d3748;
}

.section-title.completed {
  border-bottom: 2px solid #888;
}

.task-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.task-item.completed {
  background: #f5f5f5;
  border-color: #ccc;
}

.task-content {
  flex: 1;
}

.task-description {
  font-size: 16px;
  margin-bottom: 5px;
  color: #2d3748;
}

.task-description.completed {
  text-decoration: line-through;
  color: #888;
}

.task-creator {
  font-size: 12px;
  color: #666;
}

.task-checkbox {
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-left: 15px;
}

.no-tasks {
  text-align: center;
  padding: 20px;
  color: #999;
  font-style: italic;
  background: transparent;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  background: transparent;
}

.tasks-section {
  margin-bottom: 30px;
}

.task-count {
  font-size: 14px;
  color: #666;
  margin-left: 10px;
}

#message {
  margin: 15px 0;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
}

#message:empty {
  display: none;
  padding: 0;
  margin: 0;
}

#message.error {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

#message.success {
  background-color: #efe;
  color: #3c3;
  border: 1px solid #cfc;
}