﻿:root {
  --bg: #0c0c0e;
  --surface: rgba(24, 24, 27, 0.85);
  --surface-hover: rgba(39, 39, 42, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e4e4e7;
  --text-dim: #a1a1aa;
  --text-faint: rgba(161, 161, 170, 0.4);
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.25);
  --success: #34d399;
  --radius-card: 28px;
  --radius-card-compact: 24px;
  --radius-input: 20px;
  --radius-btn: 20px;
  --radius-pill: 9999px;
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.min-h-screen { min-height: 100vh; }

.page-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }
.block { display: block; }
.hidden { display: none; }
.inline-block { display: inline-block; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-underline { text-decoration: none; }
.gap-1 { gap: 4px; }
.gap-1\\.5 { gap: 6px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.samsung-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
}
.samsung-card--compact {
  padding: 14px 18px;
  border-radius: var(--radius-card-compact);
}

.samsung-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.samsung-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 14px 18px;
  color: #f4f4f5;
  font-size: 15px;
  width: 100%;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}
.samsung-input:focus {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(255, 255, 255, 0.08);
}
.samsung-input::placeholder { color: rgba(255, 255, 255, 0.25); }
select.samsung-input { appearance: auto; }

.samsung-btn {
  border-radius: var(--radius-btn);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
  font-family: inherit;
}
.samsung-btn--primary {
  background: var(--accent);
  color: white;
}
.samsung-btn--primary:hover {
  background: #2563eb;
}
.samsung-btn--danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #fca5a5;
}
.samsung-btn--danger:hover {
  background: rgba(239, 68, 68, 0.2);
}
.samsung-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.samsung-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.samsung-back-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.samsung-back-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #f4f4f5;
}

.samsung-icon-btn--sm {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s;
}

.diet-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.diet-menu-panel {
  width: 100%;
  max-width: 464px;
  background: rgba(19, 19, 20, 0.93);
  backdrop-filter: blur(40px);
  border-radius: 28px 28px 0 0;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 20px));
  max-height: 90dvh;
  overflow-y: auto;
  box-sizing: border-box;
}
.diet-menu-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  animation: spin 0.8s linear infinite;
}
