/* ==========================================================================
   যত্ন প্রাতঃভ্রমণ (Jatno Morning Walk Tracker) — Mobile PWA Stylesheet
   ========================================================================== */

:root {
  --primary-teal: #0d9488;
  --primary-teal-dark: #0f766e;
  --primary-teal-light: #14b8a6;
  --accent-gold: #f59e0b;
  --accent-amber: #fbbf24;
  --bg-dark: #090d16;
  --card-dark: #131b2e;
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger-red: #ef4444;
  --success-green: #10b981;
  --font-bangla: 'Hind Siliguri', 'Inter', -apple-system, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 20px);
}

/* বেস এবং মোবাইল ফ্রেম */
body.fitness-app-body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-bangla);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}

.fitness-container {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: calc(75px + var(--safe-bottom));
  background: radial-gradient(circle at top right, rgba(13, 148, 136, 0.15), transparent 45%),
              radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.08), transparent 40%),
              var(--bg-dark);
}

/* হাই কনট্রাস্ট ডে মোড (আউটডোর মোড) */
body.outdoor-mode {
  --bg-dark: #f8fafc;
  --card-dark: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
}
body.outdoor-mode .fitness-container {
  background: #f1f5f9;
}

/* শীর্ষ অ্যাপ বার */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(19, 27, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-teal), #047857);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.app-logo-badge img {
  width: 24px;
  height: 24px;
}

.app-title-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  line-height: 1.2;
}

.app-title-text span {
  font-size: 0.72rem;
  color: var(--accent-amber);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gps-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.gps-badge.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.gps-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.gps-badge.active .pulse-dot {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.header-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* অ্যাক্টিভিটি টাইপ পিল সেলেক্টর */
.activity-selector-row {
  display: flex;
  gap: 8px;
  padding: 12px 18px 4px 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.activity-selector-row::-webkit-scrollbar {
  display: none;
}

.act-pill {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--card-dark);
  border: 1px solid var(--card-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.act-pill.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.25), rgba(20, 184, 166, 0.15));
  border-color: var(--primary-teal);
  color: #2dd4bf;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.2);
}

/* প্রধান বড় মেট্রিক্স ডিসপ্লে */
.metrics-hero-card {
  margin: 12px 16px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(19, 27, 46, 0.95), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.metrics-hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.25), transparent 70%);
  pointer-events: none;
}

.main-stat-display {
  text-align: center;
  padding: 10px 0;
}

.distance-value-large {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.distance-unit-label {
  font-size: 0.95rem;
  color: var(--accent-amber);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.timer-speed-row {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sub-metric-box {
  text-align: center;
  flex: 1;
}

.sub-metric-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sub-metric-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* চার কলাম সেকেন্ডারি মেট্রিক্স গ্রিড */
.secondary-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 16px 12px 16px;
}

@media (max-width: 380px) {
  .secondary-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.zone-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.stat-pill-card {
  background: var(--card-dark);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-pill-icon {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.stat-pill-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-pill-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* লাইভ ম্যাপ উইজেট */
.map-section {
  margin: 0 16px 16px 16px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  height: 250px;
  background: #1e293b;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 10;
}

.map-controls-floating {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-btn-float {
  width: 36px;
  height: 36px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  color: #f8fafc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.map-btn-float.active {
  background: var(--primary-teal);
  color: #ffffff;
}

/* অ্যাকশন কন্ট্রোল বাটন এরিয়া */
.workout-controls-area {
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: auto;
  margin-bottom: 10px;
}

.btn-workout-main {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: none;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
  position: relative;
}

.btn-workout-main:active {
  transform: scale(0.92);
}

.btn-start {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.btn-pause {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
}

.btn-resume {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.btn-stop {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.45);
}

/* বটম ফিক্সড নেভিগেশন বার */
.bottom-app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 500px;
  margin: 0 auto;
  background: rgba(19, 27, 46, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px calc(6px + var(--safe-bottom)) 6px;
  z-index: 1050;
}

.nav-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 4px 12px;
  border-radius: 10px;
}

.nav-tab-item i {
  font-size: 1.25rem;
}

.nav-tab-item.active {
  color: var(--primary-teal-light);
  font-weight: 700;
}

/* ভয়েস ও ওয়েক-লক ইনফো পিল */
.status-floating-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 16px 8px 16px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* কাস্টম মার্কার ও পালস */
.pulse-user-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0d9488;
  border: 3px solid #ffffff;
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.8);
  position: relative;
}

.pulse-user-marker::after {
  content: '';
  position: absolute;
  top: -7px;
  left: -7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.35);
  animation: marker-pulse 1.8s infinite;
}

@keyframes marker-pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* সামারি কার্ড ও মডাল */
.modal-content-fitness {
  background: var(--card-dark);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
}

.modal-header-fitness {
  border-bottom: 1px solid var(--card-border);
  padding: 16px 20px;
}

.workout-share-card {
  background: linear-gradient(145deg, #090e1a, #131b2e);
  border: 2px solid var(--primary-teal);
  border-radius: 16px;
  padding: 20px;
  color: white;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.share-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.share-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.share-stat-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
}

.share-stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #2dd4bf;
}

.share-stat-lbl {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* লিডারবোর্ড ব্যাজ ও কার্ড */
.leader-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-dark);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  margin-bottom: 8px;
}

.leader-rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.rank-1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #000; box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5); }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #000; }
.rank-3 { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }
.rank-other { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }

/* ===== AMOLED পকেট মোড / স্ক্রিন সেভার স্টাইলস ===== */
.pocket-mode-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000 !important;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.pocket-time-display {
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Inter', monospace;
  letter-spacing: -1px;
}

.pocket-metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

.pocket-metric-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.pocket-unlock-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pocket-unlock-btn {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pocket-unlock-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pocket-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 6;
}

.pocket-ring-progress {
  fill: none;
  stroke: #10b981;
  stroke-width: 6;
  stroke-dasharray: 276.46;
  stroke-dashoffset: 276.46;
  transition: stroke-dashoffset 0.05s linear;
}

.pocket-unlock-inner {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pocket-unlock-btn:active .pocket-unlock-inner {
  background: rgba(16, 185, 129, 0.3);
  transform: scale(0.95);
}

