body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  padding: 30px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.header {
  text-align: center;
  display: flex;
  justify-content: space-around;
}

.header img {
  width: 100%;
  max-width: 100px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-text {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

h2 {
  color: #2c3e50;
  font-weight: 600;
  margin: 0;
}

.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab {
  padding: 12px 20px;
  background: #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #555;
}

.tab:hover {
  background: #d0d0d0;
  transform: translateY(-2px);
}

.tab.active {
  background: #4285f4;
  color: white;
  box-shadow: 0 3px 8px rgba(66, 133, 244, 0.3);
}

.tab-content {
  display: none;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.tab-content.active {
  display: block;
}

textarea {
  padding: 12px;
  margin-top: 15px;
  width: 100%;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

textarea:focus {
  border-color: #4285f4;
  outline: none;
  box-shadow: 0 0 5px rgba(66, 133, 244, 0.2);
}

button {
  padding: 12px;
  margin-top: 15px;
  width: 100%;
  font-size: 16px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #3267d6;
}

.output {
  margin-top: 15px;
  font-weight: 600;
  font-size: 16px;
  font-style: italic;
  color: #2ecc71; /* Green for the "Mã xác thực" text */
  max-width: 100%; /* Không vượt quá chiều rộng cha */
  overflow-wrap: break-word; /* Ngắt từ nếu quá dài */
  word-break: break-all; /* Ngắt ký tự nếu cần */
  white-space: normal; /* Cho phép xuống dòng */
  overflow: hidden;
}

.output::after {
  content: attr(data-code); /* Add the code part dynamically */
  color: #e74c3c; /* Red for the code */
  font-style: normal; /* Code not italic */
  margin-left: 5px;
}

.spinner {
  margin: 15px auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4285f4;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  animation: spin 1s linear infinite;
  display: none;
}

.rainbow-blink {
  display: block;
  margin: 20px 0;
  font-weight: bold;
  font-size: 16px;
  animation: blinkColors 3s infinite;
}

.rainbow-blink a {
  color: inherit;
  text-decoration: underline;
  font-style: italic;
}

@keyframes blinkColors {
  0% {
    color: #ff4d4d;
  }
  25% {
    color: #4285f4;
  }
  50% {
    color: #9b59b6;
  }
  75% {
    color: #f1c40f;
  }
  100% {
    color: #ff4d4d;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.contact-links {
  margin: 0 0 20px 0;
  display: block;
  text-align: center;
  font-size: 16px;
}

.contact-links a {
  color: #4285f4;
  text-decoration: none;
  font-style: italic;
  transition: color 0.3s ease;
}

.contact-links a:hover {
  color: #3267d6;
  text-decoration: underline;
}

.tab-content p {
  margin: 0 0 15px;
  line-height: 1.6;
}

.tab-content strong {
  color: #2c3e50;
}

.tab-content span[style*="color: red"] {
  color: #e74c3c !important;
  font-weight: 500;
}

.tab-content span[style*="color: blue"] {
  color: #4285f4 !important;
  font-style: italic;
}

.domainmail-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.group_create_email {
  display: flex;
  justify-content: left;
  align-items: center;
  margin-bottom: 12px;
}

.create-email-link {
  display: inline-block;
  padding: 8px 16px;
  color: white;
  background-color: #2563eb;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease;
}

.create-email-link:hover {
  background-color: #1d4ed8;
  cursor: pointer;
}

.group-result_create_email {
  display: flex;
  align-items: center;
  font-size: 18px;
  margin-left: 24px;
}

.result_create_email.loading-dots::after {
  content: "";
  display: inline-block;
  animation: dots 1.2s steps(3, end) infinite;
  font-weight: bold;
  font-size: 16px;
  margin-left: 4px;
}

@keyframes dots {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  100% {
    content: "...";
  }
}
