/* ═══════════════════════════════════════════════════
   DogCare Pedometer PWA — Dark Neon Glassmorphism
   ═══════════════════════════════════════════════════ */

:root {
  --bg-dark: #080c14;
  --bg-card: rgba(17, 24, 39, 0.6);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-hover: rgba(46, 196, 182, 0.2);
  --glass-shadow: rgba(0, 0, 0, 0.4);
  --neon-teal: #2ec4b6;
  --neon-teal-dim: rgba(46, 196, 182, 0.15);
  --neon-yellow: #f59e0b;
  --neon-orange: #ff3c38;
  --neon-blue: #38bdf8;
  --text-primary: #f3f4f6;
  --text-muted: rgba(255, 255, 255, 0.55);
  --text-light-muted: rgba(255, 255, 255, 0.4);
  --bottom-nav-h: 64px;
}

body {
  font-family: 'Outfit', 'Gaegu', 'Malgun Gothic', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  padding-bottom: var(--bottom-nav-h);
  transition: background 0.6s ease;
}

/* Weather theme overrides */
body.weather-sunny { background: linear-gradient(160deg, #0f2027 0%, #0b3d2e 50%, #080c14 100%); }
body.weather-rainy { background: linear-gradient(160deg, #0c1445 0%, #0f172a 50%, #080c14 100%); }
body.weather-hot   { background: linear-gradient(160deg, #3b0d0d 0%, #1a0800 50%, #080c14 100%); }
body.weather-cold  { background: linear-gradient(160deg, #082f49 0%, #0c1631 50%, #080c14 100%); }

/* ── Typography ── */
.brand-text {
  font-family: 'Gaegu', cursive;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 40%, #9ca3af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-icon {
  animation: tailWag 1s ease-in-out infinite alternate;
}

.fs-sm  { font-size: 0.88rem; }
.fs-xs  { font-size: 0.75rem; }

/* ── Glass Cards ── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--glass-shadow);
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 14px 40px rgba(46, 196, 182, 0.06);
}

.btn-glass-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-glass-round:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  color: var(--neon-yellow);
}

/* ── Dog Interactive Area ── */
.dog-display-area {
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.speech-bubble {
  position: absolute;
  top: -5px;
  background: rgba(255,255,255,0.95);
  color: #1f2937;
  padding: 8px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  max-width: 80%;
  animation: bounce 0.6s ease infinite alternate;
  font-family: 'Gaegu', cursive;
  font-size: 1.1rem;
  z-index: 10;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: rgba(255,255,255,0.95) transparent;
  display: block;
  width: 0;
}

.dog-level-badge span {
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* ── Circular Progress Ring ── */
.step-circle-container {
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-ring {
  position: absolute;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 10px;
}

.ring-progress {
  fill: none;
  stroke-width: 12px;
  stroke-linecap: round;
  stroke-dasharray: 596.9;
  stroke-dashoffset: 596.9;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 10px rgba(46, 196, 182, 0.5));
  animation: ringPulse 2.5s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(46, 196, 182, 0.4)); }
  50%      { filter: drop-shadow(0 0 18px rgba(46, 196, 182, 0.7)); }
}

.ring-progress.goal-reached {
  animation: ringGoalBurst 1.5s ease-in-out infinite;
}

@keyframes ringGoalBurst {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5)); }
  50%      { filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.9)); }
}

.step-count-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#step-count {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.step-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

/* ── Stats Boxes ── */
.stat-box {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.stat-val {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neon-teal);
}

.stat-lbl {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ── Walk Timer ── */
.walk-timer-display {
  font-family: 'Outfit', monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--neon-teal);
  text-shadow: 0 0 12px rgba(46, 196, 182, 0.4);
}

.walk-timer-display.active {
  animation: timerGlow 1s ease-in-out infinite;
}

@keyframes timerGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(46, 196, 182, 0.3); }
  50%      { text-shadow: 0 0 20px rgba(46, 196, 182, 0.7); }
}

/* ── Quick Care Log Buttons ── */
.care-btn {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s ease;
  cursor: pointer;
  color: white;
}

.care-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: var(--glass-border-hover);
}

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

.care-btn i { font-size: 1.3rem; }
.care-btn span { font-size: 0.6rem; color: var(--text-muted); }

.care-btn.logged {
  background: rgba(46, 196, 182, 0.12);
  border-color: rgba(46, 196, 182, 0.3);
}

/* ── Timeline ── */
.timeline-item {
  padding-left: 20px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  position: relative;
  margin-bottom: 12px;
}

.timeline-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-teal);
  position: absolute;
  left: -5px;
  top: 4px;
  box-shadow: 0 0 6px var(--neon-teal);
}

/* ── Charts ── */
.chart-canvas-container {
  position: relative;
  height: 180px;
}

/* ── Weekly Bar Chart (Legacy) ── */
.weekly-chart {
  height: 110px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  margin: 0 3px;
  position: relative;
}

.chart-bar-val {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-bottom: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.chart-bar-container:hover .chart-bar-val {
  opacity: 1;
}

.chart-bar {
  width: 100%;
  max-width: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px 4px 0 0;
  height: 0%;
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar.goal-reached {
  background: linear-gradient(to top, var(--neon-teal), #6ee7b7);
  box-shadow: 0 0 6px rgba(46, 196, 182, 0.4);
}

/* ── Achievement Badges ── */
.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge-item.earned {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  color: var(--neon-yellow);
}

.badge-item .badge-icon { font-size: 1rem; }

/* ── Bottom Navigation Bar ── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
}

.nav-tab i { font-size: 1.3rem; transition: all 0.2s ease; }
.nav-tab span { font-size: 0.65rem; font-weight: 600; }

.nav-tab.active {
  color: var(--neon-teal);
}

.nav-tab.active i {
  filter: drop-shadow(0 0 6px rgba(46, 196, 182, 0.5));
}

.nav-tab:hover {
  color: var(--neon-teal);
}

/* ── Tab Content Sections ── */
.tab-section {
  display: none;
}

.tab-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Misc Utilities ── */
.bg-black-50 { background-color: rgba(0, 0, 0, 0.35); }
.bg-black-25 { background-color: rgba(255, 255, 255, 0.03); }
.text-light-muted { color: var(--text-light-muted); }
.text-neon { color: var(--neon-teal); }

.btn-action {
  font-family: 'Gaegu', cursive;
  font-size: 1.1rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* Glass Modal */
.glass-modal {
  background: rgba(17, 24, 39, 0.95) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.form-control, .form-select {
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.1);
}

.form-control:focus, .form-select:focus {
  background: rgba(255,255,255,0.06);
  border-color: var(--neon-teal);
  box-shadow: 0 0 0 0.2rem rgba(46, 196, 182, 0.2);
  color: white;
}

/* ── Animations ── */
@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

@keyframes tailWag {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(22deg); }
}

@keyframes earFlopLeft {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-8deg); }
}

@keyframes earFlopRight {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(8deg); }
}

@keyframes dogWalk {
  0% { transform: translateY(0) scaleX(1); }
  25% { transform: translateY(-6px) rotate(-2deg); }
  50% { transform: translateY(0) scaleX(1.02); }
  75% { transform: translateY(-6px) rotate(2deg); }
  100% { transform: translateY(0) scaleX(1); }
}

@keyframes dogJump {
  0% { transform: translateY(0) scaleY(1); }
  30% { transform: translateY(6px) scaleY(0.8); }
  50% { transform: translateY(-28px) scaleY(1.15); }
  70% { transform: translateY(-20px) rotate(3deg); }
  100% { transform: translateY(0) scaleY(1); }
}

/* Dog States */
.dog-idle #dog-svg { animation: bounce 1.8s ease-in-out infinite alternate; }
.dog-walk #dog-svg { animation: dogWalk 0.4s linear infinite; }
.dog-jump #dog-svg { animation: dogJump 0.5s ease-out; }

.dog-idle #dog-tail { transform-origin: 32px 68px; animation: tailWag 0.8s ease-in-out infinite alternate; }
.dog-walk #dog-tail { transform-origin: 32px 68px; animation: tailWag 0.3s ease-in-out infinite alternate; }

.dog-idle #dog-ear-left { transform-origin: 52px 32px; animation: earFlopLeft 1.5s ease-in-out infinite alternate; }
.dog-idle #dog-ear-right { transform-origin: 76px 32px; animation: earFlopRight 1.5s ease-in-out infinite alternate; }

/* PREMV2 */
.badge-item.earned{position:relative;overflow:hidden}.badge-item.earned::after{content:"";position:absolute;top:-50%;left:-75%;width:50%;height:200%;background:linear-gradient(to right,rgba(255,255,255,0),rgba(255,255,255,.18),rgba(255,255,255,0));transform:rotate(25deg);animation:badgeShine 3s ease-in-out infinite;pointer-events:none}@keyframes badgeShine{0%{left:-75%}55%,100%{left:130%}}.care-btn.logged{animation:careLogPulse .45s ease!important}@keyframes careLogPulse{0%{transform:scale(1)}45%{transform:scale(1.22);box-shadow:0 0 22px rgba(46,196,182,.55)}100%{transform:scale(1)}}.nav-tab.active::after{content:"";display:block;width:4px;height:4px;border-radius:50%;background:var(--neon-teal);margin:1px auto 0;box-shadow:0 0 7px rgba(46,196,182,.9)}#step-count{background:linear-gradient(135deg,#fff 20%,#2ec4b6 100%)!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;font-size:2.8rem!important}.timeline-item{animation:tlSlide .3s ease forwards;opacity:0}@keyframes tlSlide{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}.timeline-item:nth-child(1){animation-delay:.04s}.timeline-item:nth-child(2){animation-delay:.09s}.timeline-item:nth-child(3){animation-delay:.14s}.timeline-item:nth-child(n+4){animation-delay:.18s}

/* ── Community Feed Styles ── */
.post-card {
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-hover);
}

.hashtag-pill {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.hashtag-pill:hover {
  background: var(--neon-teal-dim) !important;
  border-color: var(--neon-teal) !important;
  color: var(--neon-teal) !important;
  transform: translateY(-1px);
}

.hashtag-link {
  color: var(--neon-teal);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.hashtag-link:hover {
  color: #6ee7b7;
  text-decoration: underline;
}

.comment-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 12px;
  padding-top: 12px;
}

.comment-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
}

.comment-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.comment-input-group {
  margin-top: 12px;
}

.btn-xs {
  padding: 2px 8px;
  font-size: 0.72rem;
}

