*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f2f2f7;
  color: #1c1c1e;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrap {
  flex-grow: 1;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

.logo {
  font-weight: 700;
  font-size: 1.4rem;
  color: #1a1a1a;
}

.logo span {
  color: #28a745;
}

.balance {
  background-color: #28a745;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 16px;
}

.progress-container {
  padding: 20px;
  max-width: 450px;
  margin: 0 auto;
  transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  overflow: hidden;
  height: auto;
  opacity: 1;
}

.progress-bar {
  width: 100%;
  background-color: #e5e5ea;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
}

.progress-bar-inner {
  width: 0%;
  height: 100%;
  background-color: #28a745;
  border-radius: 10px;
  transition: width 0.4s ease;
}

.progress-container span {
  display: block;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: #636366;
  margin-top: 8px;
}

#app-container {
  max-width: 450px;
  margin: 0 auto;
  padding: 20px 16px;
  overflow: hidden;
  transition: padding-top 0.3s ease;
}

.view-container {
  display: none;
  animation: fadeIn 0.4s ease;
}

.view-container.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.headline {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c1c1e;
  text-align: center;
  margin-bottom: 20px;
}

.video-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.video-container iframe,
.video-container .video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 500;
  color: #636366;
  background-color: #e5e5ea;
  height: 200px;
  width: 100%;
  position: relative;
  padding-top: 56.25%;
}

.button-container {
  margin-top: 24px;
  display: none;
}

.btn {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  position: relative;
}

.btn:hover {
  opacity: 0.85;
}

.btn:active {
  transform: scale(0.98);
}

.btn.btn-like {
  background-color: #28a745;
  color: white;
}

.btn.disabled {
  background-color: #e5e5ea;
  color: #aEaEaE;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn .btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
}

.btn.loading .btn-spinner {
  display: block;
}

.pix-form-info {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.pix-headline {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 16px;
}

.pix-form-info p {
  font-size: 0.95rem;
  color: #636366;
  line-height: 1.5;
  margin-bottom: 12px;
}

.pix-form-info p:last-child {
  margin-bottom: 0;
}

.pix-form-info .pix-cta {
  font-weight: 600;
  color: #1c1c1e;
  margin-top: 16px;
}

.pix-form {
  background-color: #ffffff;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.pix-form label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #1c1c1e;
  margin-bottom: 12px;
}

.pix-type-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.toggle-btn {
  flex: 1;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  border-radius: 12px;
  border: 1px solid #dcdcdc;
  background-color: #ffffff;
  color: #1c1c1e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn .check-icon {
  display: none;
  margin-left: 5px;
}

.toggle-btn.active {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
}

.toggle-btn.active .check-icon {
  display: inline;
}

.input-wrapper {
  position: relative;
  margin-bottom: 24px;
}

#pix-key-input {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f2f2f7;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  transition: all 0.2s ease;
}

#pix-key-input:focus {
  outline: none;
  border-color: #28a745;
  background-color: #fff;
}

#pix-key-input.error {
  border-color: #ff3b30;
  background-color: #ffeded;
}

#pix-key-input.success {
  border-color: #28a745;
  background-color: #e9f7ea;
}

.pix-error-message {
  display: none;
  color: #ff3b30;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  margin-top: -16px;
  margin-bottom: 16px;
}

.pix-error-message.active {
  display: block;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 22px;
  text-align: center;
  width: 90%;
  max-width: 350px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-check-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #28a745;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 auto 16px auto;
}

.modal-content .modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.modal-subtitle-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #555;
  margin-top: 16px;
}

.inline-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e5ea;
  border-top: 2px solid #28a745;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

.validation-card {
  border-radius: 20px;
  padding: 24px 10px;
  text-align: center;
}

.validation-headline {
  color: #28a745;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.validation-subheadline {
  color: #1c1c1e;
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.validation-text {
  text-align: left;
  color: #636366;
  font-size: 0.95rem;
  line-height: 1.6;
}

.validation-text p {
  margin-bottom: 16px;
}

.validation-text p:last-child {
  margin-bottom: 0;
}

.validation-text strong {
  color: #1c1c1e;
  font-weight: 600;
}

.validation-button {
  margin-top: 24px;
}

footer {
  padding: 30px 20px 20px 20px;
  text-align: center;
  border-top: 1px solid #e5e5ea;
  margin-top: 30px;
  width: 100%;
}

footer p {
  font-size: 0.75rem;
  color: #8a8a8e;
  margin: 0 0 8px 0;
  line-height: 1.5;
}

footer p:last-child {
  margin-bottom: 0;
}

.terms-link {
  color: #28a745;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

.terms-content {
  max-height: 300px;
  overflow-y: auto;
  text-align: left;
  border-top: 1px solid #eee;
  margin-top: 15px;
  padding-top: 15px;
}

.terms-content p {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}