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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h2 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5rem;
}

.input {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.3s;
}

.input:focus {
  outline: none;
  border-color: #667eea;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-success:hover {
  background: #38a169;
}

.btn-danger {
  background: #f56565;
  color: white;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-danger:hover {
  background: #e53e3e;
}

.btn-secondary {
  background: #718096;
  color: white;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  background: #4a5568;
}

.random-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  margin-bottom: 20px;
}

.random-result {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.random-result h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #333;
}

.random-result.hidden {
  display: none;
}

.category-badge {
  display: inline-block;
  padding: 6px 12px;
  background: #667eea;
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-transform: capitalize;
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

textarea.input {
  margin-bottom: 15px;
  resize: vertical;
  font-family: inherit;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.list-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.list-controls .input {
  width: auto;
  min-width: 150px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.item-card {
  background: #f7fafc;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: transform 0.2s;
}

.item-card:hover {
  transform: translateX(5px);
}

.item-card.completed {
  opacity: 0.7;
  border-left-color: #48bb78;
}

.item-info {
  flex: 1;
}

.item-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.item-card.completed .item-title {
  text-decoration: line-through;
  color: #718096;
}

.item-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 5px;
}

.item-notes {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-top: 8px;
}

.item-actions {
  display: flex;
  gap: 10px;
}

.empty-state {
  text-align: center;
  color: #999;
  padding: 40px;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .random-controls {
    grid-template-columns: 1fr;
  }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-controls {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
  }

  .list-controls .input {
    width: 100%;
  }

  .item-card {
    flex-direction: column;
    gap: 15px;
  }

  .item-actions {
    width: 100%;
  }
}
