/* ===== Pomodoro page styles ===== */
.pomodoro-page {
  background: #f4f4f8;
  min-height: calc(100vh - 62px);
  padding: 40px 16px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  font-family: 'Cairo', sans-serif;
}

/* Page title */
.pom-title {
  text-align: center;
  direction: rtl;
}
.pom-title h1 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 6px;
}
.pom-title p {
  font-size: 0.95rem;
  color: #6b7280;
}

/* Session badge */
.pom-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.4s ease;
  direction: rtl;
}
.pom-badge.ready  { background: #fef3c7; border: 2px solid #f59e0b; color: #92400e; }
.pom-badge.study  { background: #ede9fe; border: 2px solid #651fff; color: #4c1d95; }
.pom-badge.break  { background: #d1fae5; border: 2px solid #10b981; color: #065f46; }

/* Duration selector */
.pom-durations {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.dur-btn {
  padding: 10px 22px;
  border-radius: 12px;
  border: 2px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  direction: rtl;
}
.dur-btn:hover:not(:disabled) {
  border-color: #651fff;
  color: #651fff;
  transform: translateY(-1px);
}
.dur-btn.active {
  background: #651fff;
  border-color: #651fff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(101,31,255,0.35);
}
.dur-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Timer card */
.pom-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 420px;
}

/* SVG circle */
.timer-wrap {
  position: relative;
  width: 240px;
  height: 240px;
}
.timer-svg {
  width: 240px;
  height: 240px;
  transform: rotate(-90deg);
}
.timer-track    { fill: none; stroke: #f3f4f6; stroke-width: 10; }
.timer-arc      {
  fill: none;
  stroke: #651fff;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s linear, stroke 0.5s ease;
}
.timer-arc.is-break { stroke: #10b981; }

.timer-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.timer-time {
  font-size: 3rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
  font-family: 'Cairo', sans-serif;
}
.timer-sublabel {
  font-size: 0.82rem;
  color: #9ca3af;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
}

/* Controls */
.pom-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.pom-btn {
  padding: 12px 26px;
  border-radius: 12px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
  direction: rtl;
}
.pom-btn-start {
  background: linear-gradient(135deg, #651fff, #9c27b0);
  color: #fff;
  box-shadow: 0 4px 16px rgba(101,31,255,0.4);
}
.pom-btn-start:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(101,31,255,0.5); }
.pom-btn-pause {
  background: #f5f3ff;
  color: #651fff;
  border: 2px solid #ddd6fe;
}
.pom-btn-pause:hover { background: #ede9fe; }
.pom-btn-reset {
  background: #f9fafb;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}
.pom-btn-reset:hover { background: #f3f4f6; color: #374151; }

/* Session dots */
.pom-dots-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #9ca3af;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
}
.pom-dots { display: flex; gap: 7px; }
.pom-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #e5e7eb;
  transition: background 0.3s, transform 0.3s;
}
.pom-dot.done {
  background: #651fff;
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(101,31,255,0.45);
}

/* Tip card */
.pom-tip {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px 28px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  direction: rtl;
}
.pom-tip h3 {
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #651fff;
  margin-bottom: 10px;
}
.pom-tip p {
  font-family: 'Cairo', sans-serif;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.9;
}

/* Alert overlay */
.pom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.pom-overlay.show { opacity: 1; visibility: visible; }
.pom-alert {
  background: #fff;
  border-radius: 22px;
  padding: 38px 30px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  direction: rtl;
}
.pom-overlay.show .pom-alert { transform: translateY(0) scale(1); }
.pom-alert-icon  { font-size: 3rem; margin-bottom: 12px; }
.pom-alert-title {
  font-family: 'Cairo', sans-serif;
  font-size: 1.3rem; font-weight: 800;
  color: #111827; margin-bottom: 8px;
}
.pom-alert-msg {
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem; color: #6b7280;
  margin-bottom: 24px; line-height: 1.75;
}
.pom-alert-btn {
  padding: 13px 28px;
  border-radius: 12px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #651fff, #9c27b0);
  color: #fff;
  width: 100%;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(101,31,255,0.35);
}
.pom-alert-btn:hover { transform: translateY(-1px); }
.pom-alert-btn.green {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

@media (max-width: 480px) {
  .timer-wrap { width: 210px; height: 210px; }
  .timer-svg  { width: 210px; height: 210px; }
  .timer-time { font-size: 2.6rem; }
  .pom-card   { padding: 28px 20px; }
}
