:root {
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --primary-glow: #4ade80;
  --background: #000000;
  --card: #171717;
  --card-2: #0a0a0a;
  --border: #262626;
  --text: #ffffff;
  --muted: #a3a3a3;
  --success: #22c55e;
  --error: #f87171;
  --warning: #fbbf24;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100dvh;
  background: #000000;
}

html {
  background-color: #000000;
  color-scheme: dark;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 90%;
  max-width: 480px;
  margin: 0 auto;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.5rem;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(34, 197, 94, 0.35), transparent 70%);
  filter: blur(40px);
  z-index: -1;
  border-radius: 9999px;
}

.hero img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(34, 197, 94, 0.35));
}

h1 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1rem 1rem 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-glow));
}

.card h3 {
  padding-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

button {
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 1rem;
  background: linear-gradient(to right, var(--primary), var(--primary-glow));
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.55);
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  color: var(--muted);
  font-family: Consolas, ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 0.5rem;
  padding-left: 1rem;
}

#notificationsList {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notification-card h3 {
  color: var(--primary);
}

.notification-card p {
  padding-left: 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-line;
  word-break: break-word;
}

.whatsapp-fallback {
  display: block;
  text-align: center;
  padding: 0.95rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(to right, var(--primary), var(--primary-glow));
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

.btn-whatsapp {
  margin-top: 0.75rem;
  background: linear-gradient(to right, #25d366, #128c7e);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55);
}

.wa-prompt {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.wa-prompt span {
  color: var(--text);
  font-size: 0.9rem;
}

.wa-prompt button {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: linear-gradient(to right, #25d366, #128c7e);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.success {
  color: var(--success);
}

.error {
  color: var(--error);
}

.warning {
  color: var(--warning);
}

.info {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.btn-install {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  padding: 0.75rem 1.1rem;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 9999px;
  background: linear-gradient(to right, var(--primary), var(--primary-glow));
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.45);
  z-index: 998;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-install:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(34, 197, 94, 0.6);
}

.btn-install:active {
  transform: scale(0.97);
}

.btn-install svg {
  flex-shrink: 0;
}

.btn-notification {
  position: fixed;
  right: 10px;
  top: calc(10px + env(safe-area-inset-top));
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  width: auto;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--card);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 998;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

html.notif-granted .btn-notification {
  display: none !important;
}

.btn-notification svg {
  flex-shrink: 0;
}

.btn-notification:hover {
  background: var(--card-2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.btn-notification:active {
  transform: scale(0.97);
}

.ios-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: ios-fade-in 0.18s ease-out;
}

.ios-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ios-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(135deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  animation: ios-slide-up 0.22s ease-out;
}

.ios-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ios-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  box-shadow: 0 6px 14px rgba(34, 197, 94, 0.35);
}

.ios-modal-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.ios-modal-header p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
}

.ios-modal-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
}

.ios-modal-close:hover {
  color: var(--text);
}

.ios-modal-steps {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ios-modal-steps li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.35;
}

.ios-modal-steps li svg {
  flex-shrink: 0;
  vertical-align: middle;
}

.ios-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--primary), var(--primary-glow));
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.ios-modal-btn {
  width: 100%;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 1rem;
  background: linear-gradient(to right, var(--primary), var(--primary-glow));
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.45);
}

@keyframes ios-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ios-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 600px) {
  .ios-modal {
    align-items: center;
  }
}

@media (max-width: 768px) {
  .hero img {
    width: 84px;
    height: 84px;
  }

  textarea {
    min-height: 140px;
  }
}