* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  min-height: 100vh;
  background: #f0f2f5;
  color: #333;
}

/* ---- HEADER ---- */
header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 0;
}

.top-nav {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px 0;
}

#motiveLink {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.08);
}

#motiveLink:hover {
  background: rgba(255, 255, 255, 0.2);
}

#up {
  padding: 40px 20px;
  text-align: center;
  color: white;
}

#up h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
}

.subtitle {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.85;
}

/* ---- FORM SECTION ---- */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px;
}

#Q {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

#h-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#newHabit {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
}

#newHabit:focus {
  border-color: #667eea;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-group legend {
  font-size: 14px;
  color: #555;
  margin-right: 4px;
}

.radio-label {
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

#start {
  align-self: flex-start;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: #667eea;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#start:hover {
  background: #5568d3;
}

/* ---- LISTS ---- */
#allList {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
}

#List, #List2 {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex: 1;
  min-width: 280px;
}

#List > span, #List2 > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #667eea;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f2f5;
}

ul {
  list-style: none;
}

li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 15px;
  flex-wrap: wrap;
}

li:last-child {
  border-bottom: none;
}

li input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

li button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.5;
}

li button:hover {
  opacity: 1;
}

#Space {
  margin-left: auto;
  font-size: 12px;
  color: #e67e22;
  font-weight: 600;
}

/* ---- FOOTER ---- */
footer {
  padding: 24px 0;
}

#l {
  display: flex;
  justify-content: center;
}

#logout {
  padding: 8px 28px;
  font-size: 14px;
  color: #999;
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
}

#logout:hover {
  color: #e74c3c;
  border-color: #e74c3c;
}

@media (max-width: 768px) {
  #allList {
    flex-direction: column;
  }

  .top-nav {
    justify-content: center;
  }
}
