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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
}

.container {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.app-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f4f8;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1A1A2E;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

h1 span {
  color: #2E86AB;
}

.tagline {
  font-size: 14px;
  color: #888;
  margin: 0;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
  margin-top: 14px;
}

label:first-of-type {
  margin-top: 0;
}

input[type="text"],
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #1A1A2E;
  background: #fafafa;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  appearance: none;
}

input[type="text"]:focus,
select:focus {
  border-color: #2E86AB;
  background: white;
}

input::placeholder {
  color: #bbb;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: #1A1A2E;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  background: #2E86AB;
}

.btn-primary:active {
  transform: scale(0.98);
}

#message {
  margin-top: 1rem;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: none;
}

#message.success {
  display: block;
  background: #EAF3DE;
  color: #3B6D11;
  border: 1px solid #C0DD97;
}

#message.error {
  display: block;
  background: #FCEBEB;
  color: #A32D2D;
  border: 1px solid #F7C1C1;
}

.habits-section {
  border-top: 2px solid #f0f4f8;
  padding-top: 1.5rem;
}

.habits-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.habits-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1A1A2E;
}

.btn-secondary {
  padding: 7px 16px;
  background: transparent;
  color: #2E86AB;
  border: 1.5px solid #2E86AB;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: auto;
  margin-top: 0;
}

.btn-secondary:hover {
  background: #2E86AB;
  color: white;
}

#habits {
  list-style: none;
  padding: 0;
  margin: 0;
}

#habits li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fafafa;
  transition: border-color 0.2s;
}

#habits li:hover {
  border-color: #2E86AB;
}

.habit-info {
  display: flex;
  flex-direction: column;
}

.habit-name {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A2E;
}

.habit-freq {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
  text-transform: capitalize;
}

.btn-delete {
  padding: 5px 12px;
  background: transparent;
  color: #A32D2D;
  border: 1px solid #F7C1C1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: auto;
  margin-top: 0;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: #A32D2D;
  color: white;
  border-color: #A32D2D;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #bbb;
  font-size: 14px;
}
