:root{
  --bg:#020617;
  --panel:rgba(18,24,38,.9);
  --border:#1f2937;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --accent:#3b82f6;
}

*{box-sizing:border-box;font-family:Inter,system-ui,sans-serif}

body{margin:0;color:var(--text);height:100vh}

/* SPACE */
.space-bg{
  position:fixed;
  inset:0;
  z-index:-1;
  background:radial-gradient(ellipse at bottom,#0d1b2a 0%,#020617 70%);
}

.stars{
  position:absolute;
  width:1px;height:1px;background:white;
  box-shadow:100px 200px white,300px 400px white,500px 600px white,
  700px 800px white,900px 200px white,1100px 500px white;
  animation:moveStars 80s linear infinite;
}
.stars2{opacity:.6;animation-duration:120s}
.stars3{opacity:.3;animation-duration:180s}

@keyframes moveStars{
  from{transform:translateY(0)}
  to{transform:translateY(-2000px)}
}

/* LAYOUT */
.app{display:grid;grid-template-columns:240px 1fr;height:100vh}

.sidebar{
  background:var(--panel);
  border-right:1px solid var(--border);
  padding:14px;
  overflow-y:auto;
}

.sidebar h1{font-size:1.1rem;margin-bottom:12px}

.sidebar button{
  width:100%;
  margin-bottom:8px;
  padding:8px;
  background:none;
  border:1px solid var(--border);
  color:var(--text);
  border-radius:6px;
  cursor:pointer;
}

/* TASKS */
.tasks{
  margin-top:14px;
}

.tasks h3{
  font-size:.9rem;
  margin-bottom:6px;
  color:var(--muted);
}

.tasks input{
  width:100%;
  padding:6px;
  background:#020617;
  border:1px solid var(--border);
  color:var(--text);
  border-radius:6px;
}

.tasks ul{
  list-style:none;
  padding:0;
  margin-top:6px;
  font-size:.85rem;
}

.tasks li{
  display:flex;
  justify-content:space-between;
  padding:4px 0;
  border-bottom:1px solid var(--border);
}

/* MAIN */
.main{padding:14px;display:grid;grid-template-rows:auto 1fr auto}

.header h2{margin:0}

.grid{
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:12px;
  margin-top:10px;
}

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
}

/* TIMER */
.timer{text-align:center;font-size:2.6rem;margin:10px 0}

.duration{
  display:flex;gap:6px;justify-content:center;flex-wrap:wrap;
}

.duration button,
.duration input{
  background:none;
  border:1px solid var(--border);
  color:var(--text);
  padding:4px 8px;
  border-radius:6px;
}

.controls{
  display:flex;justify-content:center;gap:6px;
}

.controls button{
  background:var(--accent);
  border:none;
  color:white;
  padding:6px 10px;
  border-radius:6px;
}

/* STATS */
.stats{
  display:flex;
  justify-content:space-between;
  margin-bottom:8px;
}

.history{
  font-size:.85rem;
}

.history li{
  display:flex;
  justify-content:space-between;
  padding:4px 0;
  border-bottom:1px solid var(--border);
}

/* FOOTER */
footer{
  text-align:center;
  border-top:1px solid var(--border);
  padding-top:8px;
  font-size:.8rem;
  color:var(--muted);
}

.socials{
  display:flex;
  justify-content:center;
  gap:12px;
  margin-top:6px;
}

.socials svg{
  width:20px;
  fill:var(--muted);
}

.email{display:none;margin-top:6px;color:var(--text)}

@media(max-width:900px){
  .app{grid-template-columns:1fr}
  .sidebar{display:none}
  .grid{grid-template-columns:1fr}
}
