:root {
  --purple: #E8DEF8;
  --yellow: #FFF4CC;
  --blue: #D3E4FD;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --primary: #007aff;
  --primary-hover: #0051d5;
  --border: rgba(0, 0, 0, 0.08);
  --error: #ff3b30;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

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

html {
  font-size: 15px;
  font-family: var(--sans);
  line-height: 1.4;
  color: var(--text);
  background: #f5f5f7;
}

body {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 17px;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--sans);
}

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

.btn--primary {
  background: var(--primary);
  color: white;
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--outline {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--outline:hover {
  background: rgba(0, 0, 0, 0.06);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text);
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: all 0.2s;
  font-family: var(--sans);
}

.form-control:focus {
  background: white;
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.hidden {
  display: none;
}

.header {
  padding: 24px 0 32px 0;
  margin-bottom: 20px;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.header-content h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

.header-controls {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.reset-btn {
  font-size: 13px;
  padding: 6px 12px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.progress-percentage {
  color: var(--primary);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.4s;
  border-radius: 9999px;
}

.main-content {
  padding-bottom: 32px;
}

.task-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .task-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.task-column {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 16px;
  min-height: 300px;
  transition: all 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.task-column:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.06);
}

.task-column--large {
  background: var(--purple);
  border-color: rgba(0, 0, 0, 0.05);
}

.task-column--medium {
  background: var(--yellow);
  border-color: rgba(0, 0, 0, 0.05);
}

.task-column--small {
  background: var(--blue);
  border-color: rgba(0, 0, 0, 0.05);
}

.column-header {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column-header h2 {
  font-size: 17px;
  font-weight: 600;
}

.task-limit {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.task-input-container {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.task-input {
  flex: 1;
  min-height: 36px;
  font-size: 13px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
}

.add-task-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  padding: 0;
  font-size: 20px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.add-task-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  transition: all 0.2s;
  animation: slideDown 0.2s;
}

.task-item:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.task-item.completed {
  opacity: 0.5;
}

.task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gray-400);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s;
}

.task-checkbox:hover {
  border-color: var(--gray-500);
}

.task-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.task-checkbox.checked::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: 600;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.task-text {
  flex: 1;
  font-size: 13px;
  word-break: break-word;
}

.task-delete {
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: 6px;
  font-size: 17px;
  opacity: 0;
  transition: all 0.2s;
}

.task-item:hover .task-delete {
  opacity: 1;
}

.task-delete:hover {
  color: var(--error);
}

.motivational-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: slideIn 0.3s;
}

.message-content h3 {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 700;
}

.message-content p {
  font-size: 15px;
  color: var(--text-secondary);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.03);
}

.add-task-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .header-content h1 {
    font-size: 24px;
  }
  
  .task-grid {
    grid-template-columns: 1fr;
  }
  
  .task-column {
    min-height: 250px;
  }
  
  .motivational-message {
    padding: 24px;
  }
  
  .message-content h3 {
    font-size: 20px;
  }
}