@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap');

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #6366f1 0%, #f472b6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', Arial, sans-serif;
}

.mini-container {
  background: rgba(30, 32, 38, 0.85);
  border-radius: 18px;
  box-shadow: 0 8px 32px 0 #00000033;
  padding: 1.2rem 0.7rem 1rem 0.7rem;
  width: 260px;
  max-width: 96vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: popIn 0.6s cubic-bezier(.68,-0.55,.27,1.55);
  backdrop-filter: blur(10px);
  border: 1.5px solid #6366f1;
  position: relative;
  overflow: visible;
}

@keyframes popIn {
  from { transform: scale(0.8) translateY(40px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* Glowing Gradient Ring */
.mini-timer {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.7rem;
  position: relative;
}
.mini-timer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 0;
  background: conic-gradient(
    #6366f1 0% 25%,
    #f472b6 25% 50%,
    #fbbf24 50% 75%,
    #34d399 75% 100%
  );
  filter: blur(10px) brightness(1.2);
  opacity: 0.7;
  transition: opacity 0.3s;
}
.mini-display {
  position: relative;
  z-index: 1;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  background: rgba(30,32,38,0.92);
  border-radius: 50%;
  width: 155px;
  height: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 10px #6366f122, 0 0 0 3px rgba(99,102,241,0.08);
  border: 2.5px solid #fff3;
  user-select: none;
  animation: fadeIn 0.7s;
  transition: box-shadow 0.3s, border 0.3s;
  text-shadow: 0 2px 8px #6366f1cc, 0 0px 2px #000a;
  overflow: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.mini-btns {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  justify-content: center;
  width: 100%;
}

.mini-btn {
  background: linear-gradient(135deg, #6366f1 40%, #f472b6 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  width: 2.1rem;
  height: 2.1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px #6366f133;
  transition: background 0.18s, color 0.18s, transform 0.13s, box-shadow 0.18s;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.mini-btn:active {
  background: linear-gradient(135deg, #f472b6 40%, #6366f1 100%);
  color: #fff;
  transform: scale(0.96);
}
.mini-btn:hover {
  background: linear-gradient(135deg, #fbbf24 40%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 16px #6366f155;
  transform: translateY(-2px) scale(1.04);
}
.mini-btn[disabled] {
  background: #232526;
  color: #444a6d;
  cursor: not-allowed;
  box-shadow: none;
}

/*  Rotate animation for reset button */
.rotate {
  animation: spin 0.6s linear;
}

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

.mini-laps {
  list-style: none;
  margin: 0.3rem 0 0.1rem 0;
  max-height: 4.5rem;
  overflow-y: auto;
  background: rgba(99,102,241,0.07);
  border-radius: 8px;
  padding: 0.2rem 0.2rem 0.1rem 0.2rem;
  width: 100%;
  transition: background 0.2s;
  animation: fadeIn 0.5s;
  box-shadow: 0 2px 8px #6366f122;
}
.mini-laps::-webkit-scrollbar {
  width: 2px;
}
.mini-laps::-webkit-scrollbar-thumb {
  background: #6366f1;
  border-radius: 2px;
}
.mini-laps li {
  border-bottom: 1px solid #232526;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.18rem 0.1rem;
  font-size: 0.92rem;
  color: #a5b4fc;
  animation: fadeIn 0.4s;
}
.mini-laps li:last-child {
  border-bottom: none;
}
.mini-laps .mini-del {
  background: linear-gradient(135deg, #f472b6 0%, #6366f1 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.08rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 0.3rem;
  box-shadow: 0 2px 8px #6366f133;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.mini-laps .mini-del:hover {
  background: linear-gradient(135deg, #ef4444 0%, #f472b6 100%);
  color: #fff;
   box-shadow: 0 4px 12px #ef444488;
}

.mini-empty {
  text-align: center;
  color: #a5b4fc;
  border-radius: 0.5rem;
  background: rgba(99,102,241,0.07);
  margin-top: 0.3rem;
  padding: 0.4rem;
  font-size: 0.92rem;
  letter-spacing: 1px;
  animation: fadeIn 0.7s;
}
.hidden {
  display: none;
}

@media (max-width: 400px) {
  .mini-container {
    width: 99vw;
    padding: 0.5rem 0.1rem 0.5rem 0.1rem;
  }
  .mini-timer {
    width: 100px;
    height: 100px;
  }
  .mini-display {
    font-size: 0.8rem;
    width: 70px;
    height: 70px;
    padding: 0.2rem 0.1rem;
  }
  .mini-btn {
    font-size: 0.8rem;
    width: 1.3rem;
    height: 1.3rem;
    padding: 0.1rem 0.1rem;
  }
}