/* Gateman Liveness Frontend Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #0061fe 0%, #005ae6 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #0061fe;
}

.container {
  background: white;
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(0, 97, 254, 0.15);
  padding: 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.6s ease-out;
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-container {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  width: 48px;
  height: 48px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.logo.loaded {
  opacity: 1;
}

.brand-title {
  color: #0061fe;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

h1 {
  color: #0061fe;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

h2 {
  color: #0061fe;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.subtitle {
  color: #666;
  font-size: 16px;
  margin-bottom: 40px;
  line-height: 1.5;
}

.instructions {
  background: #f8faff;
  border: 1px solid #e8f0fe;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 40px;
  text-align: left;
}

.instruction-list {
  list-style: none;
}

.instruction-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  color: #4a4a4a;
  font-size: 14px;
  line-height: 1.6;
}

.instruction-list li::before {
  content: "✓";
  background: #0061fe;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  margin-right: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

.btn {
  background: linear-gradient(135deg, #0061fe, #005ae6);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 97, 254, 0.3);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 97, 254, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.footer {
  margin-top: 32px;
  color: #999;
  font-size: 12px;
}

.loading {
  display: none;
  margin-top: 20px;
  align-items: center;
  justify-content: center;
}

.loading.show {
  display: flex;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e8f0fe;
  border-top: 2px solid #0061fe;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

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

/* Challenge Screen Styles */
.challenge-container {
  max-width: 460px;
}

.video-container {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  margin-bottom: 24px;
  overflow: hidden;
}

#video {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 15px;
}

.countdown {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: #0061fe;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.1rem;
}

.status {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 97, 254, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.direction-prompt {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 97, 254, 0.95);
  color: white;
  padding: 1rem 2rem;
  border-radius: 20px;
  font-size: 2rem;
  font-weight: bold;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.5);
  animation: directionPulse 0.5s ease-in-out;
  display: none;
}

@keyframes directionPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.direction-arrows {
  display: inline-block;
  margin-left: 0.5rem;
}

.result {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 15px;
  font-weight: 600;
}

.result.success {
  background: rgba(76, 175, 80, 0.3);
  border: 2px solid rgba(76, 175, 80, 0.8);
  color: #2e7d32;
}

.result.failure {
  background: rgba(244, 67, 54, 0.3);
  border: 2px solid rgba(244, 67, 54, 0.8);
  color: #c62828;
}

.success-icon {
  font-size: 4rem;
  margin: 2rem 0 1.5rem 0;
  animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.hidden {
  display: none !important;
}

/* Notification Dropdown Styles */
.notification-dropdown {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 12px 16px;
  max-width: 320px;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid #ef4444;
}

.notification-dropdown.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.notification-dropdown.success {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.notification-dropdown.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.notification-dropdown.info {
  border-left-color: #0061fe;
  background: #f8faff;
}

.notification-dropdown.error {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.notification-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-message {
  color: #374151;
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
}

.notification-dropdown.success .notification-message {
  color: #065f46;
}

.notification-dropdown.warning .notification-message {
  color: #92400e;
}

.notification-dropdown.info .notification-message {
  color: #1e40af;
}

.notification-dropdown.error .notification-message {
  color: #991b1b;
}

/* Session ID preloading indicator */
.session-status {
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  background: #f8faff;
  border: 1px solid #e8f0fe;
  color: #0061fe;
}

.session-status.loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #e8f0fe;
  border-top: 2px solid #0061fe;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.session-status.ready {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
  color: #2e7d32;
}

.session-status.ready::before {
  content: "✓";
  margin-right: 8px;
  font-weight: bold;
}

/* Mobile notification adjustments */
@media (max-width: 520px) {
  .notification-dropdown {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    transform: translateY(-100%);
  }

  .notification-dropdown.show {
    transform: translateY(0);
  }
}

/* Mobile optimizations */
@media (max-width: 520px) {
  .container {
    padding: 32px 24px;
    margin: 10px;
  }

  h1 {
    font-size: 24px;
  }

  .instructions {
    padding: 24px;
  }

  #video {
    height: 240px;
  }
}

/* Processing Screen Styles */
.loading-phase {
  text-align: center;
  padding: 20px 0;
}

.loading-phase.hidden {
  display: none;
}

.loading-icon {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}



/* Processing Steps */
.processing-steps {
  margin-top: 32px;
  text-align: left;
}

.step {
  display: flex;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  background: #f8faff;
  border-radius: 12px;
  border: 1px solid #e8f0fe;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.step.active {
  opacity: 1;
  background: rgba(0, 97, 254, 0.1);
  border-color: rgba(0, 97, 254, 0.3);
  transform: translateX(8px);
}

.step-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.step-text {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.step.active .step-text {
  color: #0061fe;
  font-weight: 600;
}