:root {
  --bg: #0E1117;
  --card: #161B22;
  --accent: #00E8F0;
  --accent-2: #7C5CFF;
  --text: #E8ECF3;
  --muted: #9AA6BF;
  --danger: #FF4B4B;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(0,0,0,.25);
}

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

body {
  font-family: Inter, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 90px;
}

/* MENU */
.menu {
  position: fixed; top:0; left:0; right:0;
  backdrop-filter: blur(12px);
  background: rgba(0,0,0,0.3);
  padding: 14px 20px;
  display: flex; justify-content: center; gap: 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.menu a {
  text-decoration: none;
  padding:8px 16px;
  border-radius: 8px;
  font-weight:600;
  color: var(--text);
}
.menu a.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08121F;
}

/* Layout container */
.wrap { width: min(850px, 92vw); }

/* Card block */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* Controls */
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

label { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: block; }

input, select {
  width: 100%; padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.15);
  background: #0F141C;
  color: var(--text);
}
input:focus, select:focus { border-color: var(--accent); outline: none; }

.btn {
  padding: 12px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: .25s;
}
#start { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #08121F; }
#pause { background: #2B3444; color: var(--text); }
#reset { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Display section */
.display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}
.tile {
  background: #121821;
  padding: 28px 14px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
}
.num { font-size: 54px; font-weight: 800; }
.label { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* Progress bar */
.progress {
  margin-top: 22px; background: #0F141C;
  border-radius: 999px; height: 8px; overflow: hidden;
}
.bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .6s linear;
}

/* Footer (MỚI) */
footer {
  width: 100%;
  text-align: center;
  padding: 24px 0 40px;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0D1016;
  color: var(--muted);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* Mobile */
@media (max-width: 640px) {

  body { padding-top: 70px; }

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

  .controls .btn {
    grid-column: span 2;
    padding: 15px;
    font-size: 16px;
  }

  .num { font-size: 42px; }

  select, input { font-size: 17px; }
}
