/* ===== Basic Body Setup ===== */
body {
  background-image: url('background.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  height: 100vh;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
}

/* ===== Container ===== */
.container {
  text-align: center;
  padding: 50px;
  z-index: 1;
}

/* ===== Logo ===== */
.logo {
  width: 300px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeIn 2s forwards;
}

/* ===== Description Text ===== */
.description-text {
  font-size: 20px;
  font-weight: bold;
  color: black;
  max-width: 1000px;
  margin: 20px auto 40px;
  opacity: 0;
  animation: fadeIn 2s forwards;
}

/* ===== Keyframes ===== */
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes slideDown {
  0% { opacity: 0; transform: translate(-50%, -52%); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}
@keyframes fadeOutModal {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* ===== Video Section ===== */
.video-section {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
}
.tutorial-video iframe {
  border-radius: 15px;
  border: 2px solid white;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  margin-top: 20px;
  pointer-events: auto;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.tutorial-video iframe:hover {
  border: 2px solid red;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
}

/* ===== Main Button ===== */
.compile-avatar-button .compile-button {
  font-family: 'Arial', sans-serif;
  padding: 20px 50px;
  font-size: 28px;
  font-weight: bold;
  color: white;
  background-color: black;
  border: none;
  border-radius: 8px;
  transition: 0.3s;
  margin-left: 80px !important;
}
.compile-avatar-button .compile-button:hover {
  background-color: #333;
  transform: scale(1.05);
}

/* ===== Footer Buttons ===== */
.footer-buttons {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 1;
}
.footer-btn {
  background: white;
  color: black;
  font-weight: bold;
  padding: 12px 25px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}
.footer-btn:hover {
  transform: scale(1.1);
  background-color: #f0f0f0;
}

/* ===== Modals ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ===== Modal Content ===== */
.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 500px;
  max-width: 90%;
  color: black;
  text-align: center;
  animation: slideDown 0.5s ease forwards;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.modal-content.fade-out {
  animation: fadeOutModal 0.5s forwards;
}
.modal-content h2 {
  font-size: 28px;
  margin-bottom: 15px;
}
.modal-content p {
  font-size: 16px;
}

/* ===== Close Button ===== */
.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
}
.close:hover { color: red; }

/* ===== Modal Textarea ===== */
textarea {
  width: 90%;
  height: 150px;
  border-radius: 8px;
  padding: 20px;
  font-size: 1rem;
  margin: 0 auto 20px;
  display: block;
  box-sizing: border-box;
}

/* ===== Modal Buttons ===== */
.modal-content button {
  font-size: 24px;
  padding: 20px 50px;
  background: black;
  color: white;
  border: none;
  border-radius: 8px;
  margin: 20px auto 0 auto;
  cursor: pointer;
  transition: 0.3s;
}
.modal-content button:hover {
  background-color: #333;
}

/* ===== 2FA Modal Styles ===== */
#twofa-modal .modal-content,
#twofa-modal-2 .modal-content {
  background: #27292f !important;
  border-radius: 18px;
  width: 480px;
  max-width: 95vw;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  padding: 0;
  text-align: left;
  position: relative;
  top: 28%;
  left: 12%;
  transform: translate(-50%, -50%);
}
#twofa-modal .modal-header,
#twofa-modal-2 .modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: none;
  padding: 16px 0;
}
#twofa-modal .modal-header-line,
#twofa-modal-2 .modal-header-line {
  width: 100%;
  height: 1px;
  background-color: #444;
  margin: 8px 0 0 0;
}
#twofa-modal .modal-modern-header-button,
#twofa-modal-2 .modal-modern-header-button {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  margin: 0;
  padding: 0;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 20px;
  top: 20px;
}
.modal-modern-header-button:hover { color: red; }
#twofa-modal .modal-title,
#twofa-modal-2 .modal-title {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  text-align: center !important;
  margin: 0 auto;
  flex: unset;
}
#twofa-modal .modal-lock-icon,
#twofa-modal-2 .modal-lock-icon {
  width: 135px !important;
  height: 135px !important;
  margin: 32px auto 16px auto;
  background: url('lock-icon.png') center center no-repeat;
  background-size: contain !important;
  display: block !important;
}
#twofa-modal .modal-margin-bottom-xlarge,
#twofa-modal-2 .modal-margin-bottom-xlarge {
  font-size: 16px !important;
  text-align: center !important;
  color: #b8b8b8;
}
#twofa-modal .input-control-wrapper input,
#twofa-modal-2 .input-control-wrapper input {
  width: 90%;
  max-width: 600px;
  padding: 12px 16px;
  background: #2c2f33;
  border: 1px solid #555;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  margin: 0 auto 12px auto;
  display: block;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#twofa-modal .input-field.form-control,
#twofa-modal-2 .input-field.form-control {
  width: 80%;
  max-width: 340px;
  min-width: 180px;
  padding: 14px;
  background: #393c41;
  border: 1px solid #393c41;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  text-align: center;
  transition: border 0.2s;
  box-sizing: border-box;
}
#twofa-modal .input-control-wrapper input:focus,
#twofa-modal-2 .input-control-wrapper input:focus {
  border: 2px solid #ffffff !important;
  box-shadow: none !important;
  outline: none !important;
  caret-color: white !important;
}
#twofa-modal .modal-body-button-link,
#twofa-modal-2 .modal-body-button-link {
  display: block;
  width: 100%;
  text-align: center;
  margin: 8px 0;
  background: none;
  border: none;
  font-weight: 500;
  font-size: 13px;
  color: #b8b8b8;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, text-decoration 0.2s;
  outline: none;
  line-height: 1.2;
}
.modal-body-button-link:hover,
.modal-body-button-link:focus {
  color: #fff;
  text-decoration: underline;
}
#twofa-modal .modal-body-button-link:hover,
#twofa-modal-2 .modal-body-button-link:hover,
#twofa-modal .modal-body-button-link:focus,
#twofa-modal-2 .modal-body-button-link:focus {
  color: #fff;
  text-decoration: underline;
}
#twofa-modal .modal-footer,
#twofa-modal-2 .modal-footer {
  padding: 0 32px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
}
#twofa-modal .modal-modern-footer-buttons,
#twofa-modal-2 .modal-modern-footer-buttons {
  width: 100%;
  margin-bottom: 10px;
  padding: 0 !important;
}
#twofa-modal #verifyButton,
#twofa-modal-2 #verifyButton2 {
  width: 100%;
  padding: 14px;
  background: #393c41;
  border-radius: 6px;
  font-size: 16px;
  color: #b8b8b8;
  border: none;
  cursor: not-allowed;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  margin-top: 10px !important;
}
#twofa-modal #verifyButton.enabled,
#twofa-modal-2 #verifyButton2.enabled {
  background-color: #fff !important;
  color: #000 !important;
  cursor: pointer;
  border: none;
}
#twofa-modal #verifyButton.enabled:hover,
#twofa-modal-2 #verifyButton2.enabled:hover {
  background-color: #f0f0f0 !important;
  color: #000 !important;
}
#twofa-modal .text-footer,
#twofa-modal-2 .text-footer {
  font-size: 11px !important;
  color: #b8b8b8 !important;
  text-align: center;
  margin-top: 8px;
  line-height: 1.4;
}
#twofa-modal .text-footer a,
#twofa-modal-2 .text-footer a {
  color: #fff;
  text-decoration: underline;
}
#twofa-modal .text-footer a:hover,
#twofa-modal-2 .text-footer a:hover {
  color: #b8b8b8;
}

/* ===== Loading Spinner Overlay ===== */
#loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 64px;
  height: 64px;
  border: 8px solid #f3f3f3;
  border-top: 8px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-message {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0;
  letter-spacing: 1px;
}

/* ===== Alert Box ===== */
.alert-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  z-index: 9999;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  display: none;
  opacity: 1;
  transition: opacity 0.5s;
}
.error-alert {
  background: #ff3333;
  color: white;
}