:root {
  /* Colors */
  --red-accent: #E53935;
  --surface-color: #121212;
  --background-color: #000000;
  --text-color: #E0E0E0;

  /* Spacing/Layout */
  --max-width: 900px;
  --border-radius: 16px;

  /* Shadows */
  --soft-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --deep-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

.calorie-ring {
  width: 8rem; /* 32 */
  height: 8rem;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--red-accent) var(--percentage), #333 0);
}

.calorie-ring-inner {
  width: 7rem; /* 28 */
  height: 7rem;
  border-radius: 50%;
  background-color: var(--surface-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.weekly-trend-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Insight Banner */
.insight-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: auto;
}

.insight-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.4;
}

.insight-text.muted {
  color: rgba(255, 255, 255, 0.4);
}

.insight-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.insight-refresh {
  background: none;
  border: none;
  font-size: 14px;
  padding: 4px;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease, color 0.2s ease;
}

.insight-refresh:hover {
  transform: rotate(45deg);
  color: var(--red-accent, #E53935);
}

.insight-refresh.animating {
  animation: spin 1s linear infinite;
  pointer-events: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Text Calculation Section */
.text-calc-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 24px 0;
}

.text-calc-divider::before,
.text-calc-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.text-calc-divider:not(:empty)::before {
  margin-right: .25em;
}

.text-calc-divider:not(:empty)::after {
  margin-left: .25em;
}

.text-calc-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
}

.text-calc-title {
  font-size: 14px;
  font-weight: bold;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.text-calc-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  margin-bottom: 12px;
}

.text-calc-input {
  width: 100%;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #FFFFFF;
  font-size: 13px;
  transition: all 0.2s ease;
  resize: none;
}

.text-calc-input:focus {
  border-color: var(--red-accent, #E53935);
  outline: none;
  box-shadow: 0 0 0 1px rgba(229, 57, 53, 0.3);
}

.text-calc-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-weight: bold;
  font-size: 13px;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.text-calc-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.text-calc-loading {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: 10px;
}

/* Premium Locked Tabs & Upsell Banner */
.method-tab.locked {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

.text-calc-button.locked {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: rgba(229, 57, 53, 0.3);
  color: rgba(255, 255, 255, 0.6);
}

.insight-banner.premium-upsell {
  border-color: rgba(229, 57, 53, 0.3);
  background: rgba(229, 57, 53, 0.05);
}

.insight-upgrade-link {
  background: linear-gradient(135deg, var(--red-accent, #E53935), #B71C1C);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  margin-left: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.insight-upgrade-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

/* Custom Bounded Dark Mode Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 59, 48, 0.4);
}


