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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: linear-gradient(135deg, #e6f0ff, #dbeafe, #f0f8ff);
  color: #1f3b73;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-x: hidden;
}

.container {
  background: rgba(255, 255, 255, 0.8);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(31, 59, 115, 0.25);
  width: 100%;
  max-width: 500px;
  text-align: center;
  backdrop-filter: blur(8px);
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 25px;
  color: #1f3b73;
}

.timer {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 30px;
  letter-spacing: 2px;
  color: #0e1f47;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

button {
  padding: 14px 18px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 60px;
  height: 60px;
}

button.start { background-color: #28a745; }
button.start:hover { background-color: #34c759; }

button.reset { background-color: #dc3545; }
button.reset:hover { background-color: #e74c3c; }

button.lap { background-color: #007bff; }
button.lap:hover { background-color: #409eff; }

button i {
  margin: 0;
}

.laps-container {
  text-align: center;
  overflow-x: auto;
  animation: fadeIn 0.5s ease-in-out;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 0.95rem;
}

th, td {
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid #ccc;
}

thead th {
  background-color: #f0f4ff;
  color: #1f3b73;
  font-weight: 600;
}

tbody tr {
  animation: slideIn 0.3s ease;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1f3b73;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(-20px);
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
