:root {
  --bg: #0c0c12;
  --bg-light: #161622;
  --card: #1e1e2e;
  --card-hover: #252538;
  --text: #ffffff;
  --text-dim: #8888aa;
  --positive: #7BE495;
  --negative: #FF8B8B;
  --accent: #6BCBFF;
  --warning: #FFB86B;
  --purple: #C9A0FF;
  --ring-bg: #2a2a3e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

html {
  position: fixed;
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overscroll-behavior: none;
  user-select: none;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  touch-action: pan-y pinch-zoom;
  -webkit-touch-callout: none;
}

/* Title Bar */
.title-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 1000;
  -webkit-app-region: drag;
}

.title-controls {
  display: flex;
  gap: 4px;
  padding-right: 8px;
  -webkit-app-region: no-drag;
}

.title-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.title-btn:hover {
  background: var(--card);
  color: var(--text);
}

.title-btn.close:hover {
  background: var(--negative);
  color: var(--text);
}

/* Health Risks Background */
.health-risks-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.health-risk-word {
  position: absolute;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #4a6670;
  white-space: nowrap;
  text-transform: uppercase;
  transition: opacity 1s ease;
}

.health-risk-word.hidden {
  opacity: 0;
}

/* Background Waves */
.bg-waves {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 0;
  animation: waveFadeOut 2s ease-out 1s forwards;
}

.wave {
  fill: var(--accent);
  opacity: 0.1;
  animation: waveRise 1.5s ease-out forwards;
}

.wave-1 { animation-delay: 0s; }
.wave-2 { animation-delay: 0.2s; opacity: 0.07; }
.wave-3 { animation-delay: 0.4s; opacity: 0.04; }

@keyframes waveRise {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes waveFadeOut {
  to { opacity: 0; }
}

/* App Container */
.app {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  height: 100%;
  height: 100dvh;
  padding-top: 36px;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Web mode - use safe area instead of title bar space */
.web-mode .app {
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Views */
.view {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s;
  overflow-y: auto;
}

.view.active {
  display: flex;
  opacity: 1;
}

/* View Header */
.view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.back-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--card);
  color: var(--text);
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.back-btn:hover {
  background: var(--card-hover);
  transform: scale(1.05);
}

.view-title {
  font-size: 14px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Goal Banner */
.goal-banner {
  background: linear-gradient(135deg, var(--card) 0%, var(--bg-light) 100%);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--card-hover);
  transition: padding 0.3s ease;
}

.goal-banner.collapsed {
  padding: 12px 16px;
}

.goal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.goal-summary {
  display: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.goal-banner.collapsed .goal-summary {
  display: block;
}

.goal-toggle {
  font-size: 12px;
  color: var(--text-dim);
  transition: transform 0.3s;
}

.goal-banner.collapsed .goal-toggle {
  transform: rotate(-90deg);
}

.goal-details {
  max-height: 300px;
  overflow: visible;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.goal-banner.collapsed .goal-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.goal-weights {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.goal-current {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
}

.goal-arrow {
  font-size: 24px;
  color: var(--accent);
  margin: 0 4px;
}

.goal-target {
  font-size: 36px;
  font-weight: 800;
  color: var(--positive);
}

.goal-unit {
  font-size: 14px;
  color: var(--text-dim);
  margin-left: 4px;
}

.goal-eta {
  text-align: center;
  margin-bottom: 12px;
}

.goal-eta-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.goal-eta-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.goal-progress-bar {
  height: 8px;
  background: var(--ring-bg);
  border-radius: 4px;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--positive));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.goal-target.draggable {
  cursor: ns-resize;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.goal-target.draggable:hover {
  background: rgba(123, 228, 149, 0.15);
}

.goal-target.draggable.dragging {
  background: rgba(123, 228, 149, 0.25);
}

/* Goal Slider */
.goal-slider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.goal-slider-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  min-width: 50px;
  text-align: right;
}

.goal-slider-unit {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: lowercase;
}

#goal-slider {
  width: 100%;
  height: 6px;
  margin-top: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--ring-bg);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

#goal-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(107, 203, 255, 0.4);
  transition: transform 0.2s;
}

#goal-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

#goal-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

#goal-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(107, 203, 255, 0.4);
}

/* Date Navigation */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.nav-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

.nav-btn:hover {
  color: var(--text);
  background: var(--card);
}

.date-display {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-width: 140px;
  text-align: center;
}

/* Calorie Row - Ring with stats on sides */
.calorie-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

/* Calorie Ring */
.calorie-ring-container {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.calorie-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--ring-bg);
  stroke-width: 10;
}

.ring-progress {
  fill: none;
  stroke: var(--positive);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s;
}

.ring-progress.over {
  stroke: var(--negative);
}

.ring-progress.warning {
  stroke: var(--warning);
}

.ring-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.ring-value {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.ring-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Calorie Stats */
.stat {
  text-align: center;
  min-width: 60px;
}

.stat-left {
  text-align: right;
}

.stat-right {
  text-align: left;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--card);
}

/* Entries Container */
.entries-container {
  flex: 1;
  overflow-y: auto;
  margin: 0 -16px;
  padding: 0 16px;
}

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 90px;
}

/* Entry Card */
.entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  animation: slideIn 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.entry-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--entry-color, var(--accent));
}

.entry-card:hover {
  transform: scale(1.02);
  background: var(--card-hover);
}

.entry-meal {
  font-size: 18px;
  opacity: 0.7;
}

.entry-info {
  flex: 1;
  min-width: 0;
}

.entry-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-calories {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 8px;
}

/* Bottom Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 16px;
  background: linear-gradient(transparent, var(--bg) 30%);
  z-index: 100;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--card);
  color: var(--text-dim);
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--card-hover);
  color: var(--text);
  transform: scale(1.1);
}

.add-btn {
  width: 56px;
  height: 56px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-size: 32px;
  font-weight: 300;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(107, 203, 255, 0.3);
}

.add-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(107, 203, 255, 0.4);
}

/* Stats View */
.week-chart-container {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  height: 180px;
}

#week-chart {
  width: 100%;
  height: 100%;
}

.weight-section {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.weight-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.weight-current, .weight-target {
  text-align: center;
}

.weight-value {
  font-size: 28px;
  font-weight: 800;
}

.weight-unit {
  font-size: 12px;
  color: var(--text-dim);
}

.weight-arrow {
  font-size: 24px;
  color: var(--text-dim);
}

.weight-arrow.down { color: var(--positive); }
.weight-arrow.up { color: var(--negative); }

.weight-progress-bar {
  height: 6px;
  background: var(--ring-bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.weight-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s;
}

.log-weight-btn {
  width: 100%;
  padding: 10px;
  border: none;
  background: var(--bg-light);
  color: var(--text-dim);
  font-size: 13px;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.log-weight-btn:hover {
  background: var(--card-hover);
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.stat-card-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Profile View */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-row label {
  width: 70px;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: lowercase;
}

.input-group {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: 12px;
  padding: 0 12px;
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  padding: 12px 0;
  outline: none;
}

.input-unit {
  font-size: 12px;
  color: var(--text-dim);
}

.dual-input {
  gap: 8px;
}

.dual-input .small-input {
  width: 50px;
  flex: none;
  text-align: center;
}

.toggle-group {
  display: flex;
  gap: 8px;
}

.toggle-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--card);
  color: var(--text-dim);
  font-size: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--accent);
  color: var(--bg);
}

.toggle-btn:hover:not(.active) {
  background: var(--card-hover);
}

.activity-select {
  display: flex;
  gap: 8px;
}

.activity-btn {
  padding: 10px 12px;
  border: none;
  background: var(--card);
  color: var(--text-dim);
  font-size: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 2px;
}

.activity-btn.active {
  background: var(--accent);
  color: var(--bg);
}

.activity-btn:hover:not(.active) {
  background: var(--card-hover);
}

.goal-row {
  flex-wrap: wrap;
}

.calc-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--card);
  color: var(--text-dim);
  font-size: 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.calc-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.save-btn {
  margin-top: auto;
  padding: 14px;
  border: none;
  background: var(--positive);
  color: var(--bg);
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: lowercase;
}

.save-btn:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.danger-btn {
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--negative);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.danger-btn:hover {
  opacity: 1;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--card);
  border-radius: 20px;
  width: calc(100% - 32px);
  max-width: 360px;
  transform: scale(0.9);
  transition: transform 0.3s;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.small-modal {
  max-width: 280px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bg-light);
}

.modal-header span {
  font-size: 14px;
  font-weight: 600;
  text-transform: lowercase;
}

.modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-light);
  color: var(--text);
}

.modal-body {
  padding: 20px;
}

.modal-body.centered {
  text-align: center;
  padding: 30px 20px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--bg-light);
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: var(--bg-light);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: lowercase;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-btn:hover {
  background: var(--card-hover);
}

.modal-btn.confirm-btn {
  background: var(--accent);
  color: var(--bg);
}

.modal-btn.confirm-btn:hover {
  filter: brightness(1.1);
}

.modal-btn.delete-btn {
  background: transparent;
  color: var(--negative);
}

.modal-btn.danger-confirm {
  background: var(--negative);
  color: var(--text);
}

/* Entry Input */
.entry-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.entry-emoji {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.entry-emoji:empty::before {
  content: '🍽️';
  opacity: 0.4;
}

.entry-input {
  flex: 1;
  background: var(--bg-light);
  border: none;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  padding: 14px 16px;
  border-radius: 12px;
  outline: none;
  text-align: center;
}

/* Emoji Picker */
.emoji-picker {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg-light);
  border-radius: 12px;
  margin-bottom: 12px;
  justify-content: center;
}

.emoji-picker.active {
  display: flex;
}

.emoji-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.emoji-btn:hover {
  background: var(--card);
  transform: scale(1.15);
}

.emoji-btn.active {
  background: var(--accent);
}

.entry-input::placeholder {
  color: var(--text-dim);
}

.calories-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.calories-input {
  width: 120px;
  background: var(--bg-light);
  border: none;
  color: var(--text);
  font-size: 28px;
  font-family: inherit;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 12px;
  outline: none;
  text-align: center;
}

.calories-input::placeholder {
  color: var(--text-dim);
}

.cal-label {
  font-size: 14px;
  color: var(--text-dim);
}

/* Meal Select */
.meal-select {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.meal-btn {
  width: 50px;
  height: 50px;
  border: none;
  background: var(--bg-light);
  color: var(--text-dim);
  font-size: 22px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.meal-btn.active {
  background: var(--accent);
  color: var(--bg);
}

.meal-btn:hover:not(.active) {
  background: var(--card-hover);
}

/* Color Select */
.color-select {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.color-btn {
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.color-btn.active {
  border-color: var(--text);
  transform: scale(1.15);
}

.color-btn:hover:not(.active) {
  transform: scale(1.1);
}

/* Weight Input */
.weight-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.weight-input {
  width: 120px;
  background: var(--bg-light);
  border: none;
  color: var(--text);
  font-size: 32px;
  font-family: inherit;
  font-weight: 800;
  padding: 12px;
  border-radius: 12px;
  outline: none;
  text-align: center;
}

.weight-input-unit {
  font-size: 16px;
  color: var(--text-dim);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--card);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--card-hover);
}

/* Responsive */
@media (max-width: 420px) {
  .calorie-ring-container {
    width: 140px;
    height: 140px;
  }

  .ring-value {
    font-size: 28px;
  }

  .stat-value {
    font-size: 18px;
  }

  .weight-value {
    font-size: 24px;
  }
}

/* Animations */
@keyframes highlight {
  0%, 100% { background: var(--card); }
  50% { background: var(--card-hover); }
}

.entry-card.highlight {
  animation: highlight 0.6s ease;
}

.entry-card.deleting {
  background: var(--negative);
  transform: scale(0.98);
}

/* Lock Day Section */
.lock-section {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
  flex-shrink: 0;
}

.lock-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  background: var(--card);
  color: var(--text-dim);
  font-size: 13px;
  font-family: inherit;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.lock-btn:hover {
  background: var(--card-hover);
  color: var(--text);
}

.lock-btn.locked {
  background: var(--positive);
  color: var(--bg);
}

.lock-btn.locked .lock-icon {
  animation: bounce 0.3s ease;
}

.lock-btn.failed {
  background: var(--negative);
  color: var(--text);
}

.lock-icon {
  font-size: 16px;
}

.lock-text {
  text-transform: lowercase;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Celebration Effects */
.celebration {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg);
  }
}

.fail-flash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--negative);
  opacity: 0;
  pointer-events: none;
  z-index: 998;
  animation: fail-pulse 0.5s ease-out;
}

@keyframes fail-pulse {
  0% { opacity: 0.3; }
  100% { opacity: 0; }
}
