/* ================= GLOBAL STYLES ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #f8fafc;
  color: #1f2937;
  line-height: 1.5;
}

/* ================= HEADER ================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: #3498db;
  color: white;
  font-weight: bold;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.logo {
  cursor: pointer;
}

header nav a {
  color: white;
  margin-left: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: #f1c40f;
}

/* ================= HERO / TIMER ================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(to bottom, #ffffff, #eef2ff);
}

.hero-content {
  text-align: center;
  max-width: 700px;
  width: 100%;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero p {
  margin-top: 0.6rem;
  color: #6b7280;
  font-size: 1.05rem;
}

/* ================= PROGRESS RING ================= */
.progress-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 2.5rem auto;
}

.progress-ring circle {
  fill: none;
  stroke-width: 10;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-bg {
  stroke: #e5e7eb;
}

.progress {
  stroke: #2563eb;
  stroke-linecap: round;
  stroke-dasharray: 628;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

/* ================= TIMER CENTER ================= */
.timer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* TIMER PULSE ANIMATION */
@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.timer.pulse {
  animation: pulse 1.2s ease-in-out infinite;
}

/* ================= CONTROLS ================= */
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.controls button {
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#toggle.start {
  background: #2563eb;
  color: white;
}
#toggle.start:hover { background: #1d4ed8; transform: translateY(-1px); }

#toggle.pause {
  background: #dc2626;
  color: white;
}
#toggle.pause:hover { background: #b91c1c; transform: translateY(-1px); }

#toggle.resume {
  background: #16a34a;
  color: white;
}
#toggle.resume:hover { background: #15803d; transform: translateY(-1px); }

#reset {
  background: #e5e7eb;
  color: #1f2937;
  font-weight: 500;
}
#reset:hover { background: #d1d5db; transform: translateY(-1px); }

/* ================= MODES ================= */
.modes {
  margin-top: 1rem;
}

.modes button {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.5rem 1.3rem;
  margin: 0.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.modes button:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.modes button.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* ================= CONTENT ================= */
.content {
  padding: 4rem 2rem;
  background: white;
}

.content-wrapper {
  max-width: 800px;
  margin: auto;
  text-align: left;
}

.content h2 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.content p, .content li {
  color: #4b5563;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* ================= CONTENT LINKS ================= */
/* Make all internal links visible */
.content a,
.content-wrapper a,
.related-timers a {
  color: #2563eb !important;
  text-decoration: underline !important;
  font-weight: 600;
  transition: color 0.3s ease;
}

.content a:hover,
.content-wrapper a:hover,
.related-timers a:hover {
  color: #1d4ed8 !important;
}

/* ================= FOOTER ================= */
footer {
  background: #1a252f;
  color: #b0bec5;
  padding: 20px 30px;
  text-align: center;
  font-size: 0.9rem;
  border-top: 3px solid #f39c12;
}

footer a {
  color: #90caf9;
  margin: 0 12px;
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
  color: #ffb74d;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .timer { font-size: 2.2rem; }
  .progress-container { width: 180px; height: 180px; }
  .controls { flex-direction: column; align-items: center; }
  #toggle, #reset { width: 100%; max-width: 260px; }
  .modes button { width: 100%; max-width: 260px; }
}