/* GymDiet Master — In-App Update Modal Design (Strict Dark Neon / OLED Obsidian) */
/* Strictest rule: completely hide update modal in Telegram WebApp or browser */
html.telegram-webapp #app-update-modal-overlay,
body.telegram-webapp #app-update-modal-overlay,
.telegram-webapp #app-update-modal-overlay,
body:not(.is-native-android-app) #app-update-modal-overlay {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.update-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: updateFadeIn 0.25s ease-out forwards;
}

.update-modal-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #0d1322 0%, #080c14 100%);
  border: 1px solid rgba(0, 240, 118, 0.3);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 240, 118, 0.15);
  padding: 24px 20px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  animation: updateSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.update-modal-card::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(0, 240, 118, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 118, 0.12);
  border: 1px solid rgba(0, 240, 118, 0.35);
  color: #00f076;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.update-title {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.update-subtitle {
  font-size: 13px;
  color: #8da2b5;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.update-notes-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 20px;
  max-height: 140px;
  overflow-y: auto;
}

.update-notes-title {
  font-size: 11px;
  font-weight: 700;
  color: #00f076;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.update-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.update-notes-item {
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.update-notes-dot {
  color: #00f076;
  font-weight: 900;
  flex-shrink: 0;
}

.update-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.update-btn-primary {
  width: 100%;
  background: #00f076;
  color: #04120b;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(0, 240, 118, 0.4);
  transition: transform 0.15s ease, background-color 0.2s, box-shadow 0.2s;
}

.update-btn-primary:active {
  transform: scale(0.98);
}

.update-btn-secondary {
  width: 100%;
  background: transparent;
  color: #8da2b5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.update-btn-secondary:hover, .update-btn-secondary:active {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

@keyframes updateFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes updateSlideUp {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.update-modal-overlay--mandatory {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.92);
}

.update-modal-card--mandatory {
  border: 1.5px solid rgba(0, 240, 118, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 240, 118, 0.25);
}

.update-direct-link-box {
  margin-top: 14px;
  text-align: center;
}

.update-direct-link {
  color: #8da2b5;
  font-size: 11px;
  text-decoration: underline;
  transition: color 0.2s ease;
  cursor: pointer;
}

.update-direct-link:hover, .update-direct-link:active {
  color: #00f076;
}

