.pwa-install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pwa-install-overlay.pwa-visible {
  opacity: 1;
  visibility: visible;
}

.pwa-install-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.pwa-install-overlay.pwa-visible .pwa-install-modal {
  transform: translateY(0) scale(1);
}

.pwa-install-header {
  background: linear-gradient(135deg, #1565c0, #1a73e8, #4285f4);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.pwa-install-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.pwa-install-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.25);
  padding: 8px;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
}

.pwa-install-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pwa-install-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  position: relative;
  z-index: 1;
}

.pwa-install-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8125rem;
  margin: 0;
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

.pwa-install-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.pwa-install-platform-badge svg {
  width: 14px;
  height: 14px;
}

.pwa-install-body {
  padding: 1.25rem 1.5rem;
}

.pwa-install-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pwa-install-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #333;
  line-height: 1.4;
}

.pwa-install-feature-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: #e8f0fe;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-install-feature-icon svg {
  width: 16px;
  height: 16px;
  color: #1a73e8;
}

.pwa-install-feature strong {
  color: #111;
  font-weight: 600;
}

.pwa-install-actions {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pwa-install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.pwa-install-btn-primary {
  background: linear-gradient(135deg, #1565c0, #1a73e8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
}

.pwa-install-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.45);
  transform: translateY(-1px);
}

.pwa-install-btn-primary:active {
  transform: translateY(0);
}

.pwa-install-btn-secondary {
  background: transparent;
  color: #666;
  padding: 0.5rem 1rem;
}

.pwa-install-btn-secondary:hover {
  color: #333;
  background: #f5f5f5;
}

.pwa-install-btn svg {
  width: 18px;
  height: 18px;
}

.pwa-install-ios-guide {
  padding: 1.25rem 1.5rem;
  display: none;
}

.pwa-install-ios-guide.pwa-ios-visible {
  display: block;
}

.pwa-install-guide-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111;
  margin: 0 0 0.75rem;
}

.pwa-install-note {
  font-size: 0.6875rem;
  color: #888;
  margin: 0.75rem 0 0;
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.pwa-install-note strong {
  color: #555;
}

.pwa-install-ios-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pwa-install-ios-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #333;
  line-height: 1.5;
}

.pwa-install-ios-num {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-install-ios-step strong {
  color: #111;
  font-weight: 600;
}

.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 99998;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.pwa-install-banner.pwa-visible {
  transform: translateY(0);
}

.pwa-install-banner-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: #e8f0fe;
  padding: 4px;
}

.pwa-install-banner-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pwa-install-banner-text {
  flex: 1;
  min-width: 0;
}

.pwa-install-banner-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.pwa-install-banner-desc {
  font-size: 0.75rem;
  color: #666;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-install-banner-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s ease;
}

.pwa-install-banner-btn:hover {
  background: #1565c0;
}

.pwa-install-banner-close {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.pwa-install-banner-close:hover {
  background: #f5f5f5;
  color: #666;
}

.pwa-install-banner-close svg {
  width: 18px;
  height: 18px;
}

@media (prefers-color-scheme: dark) {
  .pwa-install-modal {
    background: #1e1e1e;
  }

  .pwa-install-feature {
    color: #ccc;
  }

  .pwa-install-feature strong {
    color: #eee;
  }

  .pwa-install-feature-icon {
    background: rgba(26, 115, 232, 0.15);
  }

  .pwa-install-btn-secondary {
    color: #aaa;
  }

  .pwa-install-btn-secondary:hover {
    color: #ddd;
    background: #2a2a2a;
  }

  .pwa-install-ios-step {
    color: #ccc;
  }

  .pwa-install-ios-step strong {
    color: #eee;
  }

  .pwa-install-ios-num {
    background: rgba(26, 115, 232, 0.2);
  }

  .pwa-install-guide-title {
    color: #eee;
  }

  .pwa-install-note {
    background: #2a2a2a;
    color: #999;
  }

  .pwa-install-note strong {
    color: #bbb;
  }

  .pwa-install-banner {
    background: #1e1e1e;
    border-top-color: #333;
  }

  .pwa-install-banner-title {
    color: #eee;
  }

  .pwa-install-banner-desc {
    color: #999;
  }

  .pwa-install-banner-icon {
    background: rgba(26, 115, 232, 0.15);
  }

  .pwa-install-banner-close {
    color: #777;
  }

  .pwa-install-banner-close:hover {
    background: #2a2a2a;
    color: #bbb;
  }
}
