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

body {
  font-family: 'Segoe UI', -apple-system, Roboto, sans-serif;
  background: radial-gradient(circle at top left, #1b1f3b 0%, #0a0c1b 70%);
  color: #f2f2f7;
  min-height: 100vh;
  padding: 24px;
}

.topbar {
  max-width: 1400px;
  margin: 0 auto 20px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar h1 {
  font-size: 22px;
  background: linear-gradient(90deg, #ff6b6b, #ffb86b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.topbar .stats {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,107,107,0.15);
  border: 1px solid rgba(255,107,107,0.4);
  padding: 8px 16px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.container {
  display: flex;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  height: calc(100vh - 100px);
}

.panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.left-panel { flex: 0 0 300px; overflow-y: auto; }
.right-panel { flex: 1; overflow-y: auto; }

h2 {
  font-size: 15px;
  margin-bottom: 16px;
  display:flex;
  align-items:center;
  gap:8px;
  color:#e6e6f0;
  text-transform:uppercase;
  letter-spacing:1px;
}

.add-task-form { display:flex; gap:8px; margin-bottom:18px; }

.add-task-form input {
  flex:1;
  padding:11px 14px;
  border:1px solid rgba(255,255,255,0.15);
  border-radius:10px;
  background:rgba(255,255,255,0.06);
  color:#fff;
  font-size:14px;
}

.add-task-form input:focus { outline:none; border-color:#ff6b6b; }
.add-task-form input::placeholder { color:rgba(255,255,255,0.35); }

.add-task-form button {
  padding:11px 18px;
  background:linear-gradient(135deg,#ff6b6b,#ff9245);
  border:none;
  border-radius:10px;
  color:#fff;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
  transition: transform .2s;
}

.add-task-form button:hover { transform: translateY(-2px); }

.task-item {
  background: rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.12);
  padding:13px;
  border-radius:12px;
  margin-bottom:10px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  transition: all .25s;
}

.task-item:hover { background: rgba(255,255,255,0.09); }
.task-item.active { background: rgba(255,107,107,0.18); border:2px solid #ff6b6b; }
.task-item.done { background: rgba(76,217,123,0.14); border-color:#4cd97b; }

.task-name { font-size:14px; font-weight:500; flex:1; }

.delete-btn {
  background:none;
  border:none;
  color:rgba(255,255,255,0.35);
  cursor:pointer;
  font-size:13px;
  padding:4px 8px;
}

.delete-btn:hover { color:#ff6b6b; }

.tasks-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(230px,1fr));
  gap:16px;
}

.task-block {
  background: rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  padding:18px;
  transition: all .3s;
}

.task-block.burning {
  background: rgba(255,107,107,0.1);
  border:2px solid #ff6b6b;
  box-shadow: 0 0 26px rgba(255,107,107,0.25);
  animation: flicker 2.2s infinite;
}

@keyframes flicker {
  0%,100% { box-shadow: 0 0 26px rgba(255,107,107,0.25); }
  50% { box-shadow: 0 0 40px rgba(255,107,107,0.45); }
}

.task-block.done {
  background: rgba(76,217,123,0.14);
  border:2px solid #4cd97b;
  box-shadow: 0 0 18px rgba(76,217,123,0.25);
}

.task-block-title {
  font-size:14px;
  font-weight:700;
  margin-bottom:10px;
  display:flex;
  align-items:center;
  gap:8px;
}

.flame-wrap {
  position: relative;
  height: 26px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.flame {
  width: 6px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, #ffd166, #ff6b6b 60%, #ff3b3b);
  animation: flameMove 0.8s ease-in-out infinite alternate;
  transform-origin: bottom center;
}

.flame:nth-child(1) { height: 14px; animation-delay: 0s; }
.flame:nth-child(2) { height: 22px; animation-delay: 0.15s; }
.flame:nth-child(3) { height: 12px; animation-delay: 0.3s; }
.flame:nth-child(4) { height: 18px; animation-delay: 0.45s; }

@keyframes flameMove {
  0% { transform: scaleY(1) scaleX(1) rotate(-2deg); opacity: 0.85; }
  50% { transform: scaleY(1.25) scaleX(0.85) rotate(2deg); opacity: 1; }
  100% { transform: scaleY(0.9) scaleX(1.1) rotate(-1deg); opacity: 0.9; }
}

.time-display {
  font-size: 26px;
  font-weight:800;
  margin-bottom:10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.time-display.burning { color:#ff8a8a; }

.duration-display { font-size:11px; color:rgba(255,255,255,0.5); margin-bottom:10px; }

.progress-bar {
  width:100%;
  height:7px;
  background:rgba(255,255,255,0.08);
  border-radius:4px;
  margin-bottom:14px;
  overflow:hidden;
}

.progress-fill {
  height:100%;
  background:linear-gradient(90deg,#ff6b6b,#ffb86b);
  width:0%;
  transition: width .4s;
}

.duration-label {
  font-size:10px;
  color:rgba(255,255,255,0.4);
  margin-bottom:5px;
  text-transform:uppercase;
  letter-spacing:0.5px;
}

.duration-slider {
  width:100%;
  height:4px;
  border-radius:2px;
  background:rgba(255,255,255,0.1);
  outline:none;
  -webkit-appearance:none;
  margin-bottom:12px;
}

.duration-slider::-webkit-slider-thumb {
  -webkit-appearance:none;
  width:15px;
  height:15px;
  border-radius:50%;
  background:#ff6b6b;
  cursor:pointer;
  border:2px solid rgba(255,255,255,0.3);
}

.duration-slider:disabled::-webkit-slider-thumb { background:#555; }

.controls { display:flex; gap:8px; }

.control-btn {
  flex:1;
  padding:9px;
  border:1px solid rgba(255,255,255,0.2);
  background:rgba(255,255,255,0.06);
  color:#fff;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
  transition: all .2s;
}

.control-btn:hover { background:rgba(255,255,255,0.14); }
.control-btn.start { background:#ff6b6b; border-color:#ff6b6b; font-weight:700; }
.control-btn.pause { background:#4a4e6b; border-color:#4a4e6b; font-weight:700; }

.empty-state {
  text-align:center;
  color:rgba(255,255,255,0.35);
  font-size:13px;
  padding:40px 10px;
}

::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.15); border-radius:3px; }
