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

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow-x: hidden;
}

.container {
  background: white;
  border-radius: 16px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.07),
    0 10px 20px rgba(0, 0, 0, 0.04);
  max-width: 580px;
  width: 100%;
  padding: 48px;
  animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  text-align: center;
  margin-bottom: 36px;
}

.header-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: fadeIn 0.6s ease-out 0.2s both;
}

.header-icon i {
  color: white;
  font-size: 28px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.header h1 {
  color: #1f2937;
  font-size: 26px;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header p {
  color: #6b7280;
  font-size: 15px;
  line-height: 1.5;
}

.instruction-box {
  background: #f3f4f6;
  border-left: 3px solid #3b82f6;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 32px;
  animation: slideInLeft 0.5s ease-out 0.3s both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.instruction-box p {
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.instruction-box i {
  color: #3b82f6;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 10px;
  margin-bottom: 32px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
}

.tasks-container {
  margin-bottom: 32px;
}

.task-item {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.5s ease-out both;
}

.task-item:nth-child(1) {
  animation-delay: 0.4s;
}
.task-item:nth-child(2) {
  animation-delay: 0.5s;
}
.task-item:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.task-item.completed {
  border-color: #10b981;
  background: #f0fdf4;
}

.task-item.active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.task-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.task-status {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: white;
}

.task-item.completed .task-status {
  background: #10b981;
  border-color: #10b981;
}

.task-item.completed .task-status i {
  color: white;
}

.task-item.active .task-status {
  border-color: #3b82f6;
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.task-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  flex: 1;
}

.task-description {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
  padding-left: 40px;
}

.task-button {
  width: 100%;
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #3b82f6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.task-button:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.task-button:active:not(:disabled) {
  transform: translateY(0);
}

.task-button:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.task-button.in-progress {
  background: #000000;
}

.task-button.in-progress:hover {
  background: #000000;
}

.timer-display {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #3b82f6;
  margin-top: 12px;
  padding: 8px;
  background: #eff6ff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.timer-display i {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.download-section {
  text-align: center;
  animation: fadeIn 0.5s ease-out 0.7s both;
}

.download-button {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.3px;
}

.download-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.3);
}

.download-button:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.download-button.ready {
  animation: successPulse 2s ease-in-out infinite;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

@keyframes successPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
  }
}

.footer {
  margin-top: 40px;
  text-align: center;
  animation: fadeIn 0.5s ease-out 0.8s both;
}

.footer p {
  color: #9ca3af;
  font-size: 13px;
}

.footer a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #2563eb;
}

.error-screen {
  display: none;
  text-align: center;
  padding: 48px;
}

.error-screen.active {
  display: block;
}

.error-icon {
  width: 80px;
  height: 80px;
  background: #fee2e2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.error-icon i {
  color: #dc2626;
  font-size: 36px;
}

.error-screen h2 {
  color: #dc2626;
  font-size: 22px;
  margin-bottom: 12px;
  font-weight: 600;
}

.error-screen p {
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}
