/* ========================================
   Tech Connect AR Experience - Styles
   ======================================== */

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

body {
  margin: 0;
  overflow: hidden;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.example-container {
  overflow: hidden;
  position: absolute;
  width: 100%;
  height: 100%;
}

/* ========================================
   ローディング画面
   ======================================== */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a1a, #1a1a3a);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  color: white;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(0, 212, 255, 0.3);
  border-top-color: #00d4ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  margin-top: 20px;
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.8;
}

/* ========================================
   スキャンオーバーレイ
   ======================================== */
#scan-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 997;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.scan-frame {
  width: 55vw;
  max-width: 260px;
  aspect-ratio: 0.705;
  border: 3px solid rgba(0, 212, 255, 0.8);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), inset 0 0 30px rgba(0, 212, 255, 0.1);
  animation: pulse-frame 2s ease-in-out infinite;
  overflow: hidden;
}

.flyer-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  border-radius: 9px;
}

@keyframes pulse-frame {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), inset 0 0 30px rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.8);
  }

  50% {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.7), inset 0 0 50px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 1);
  }
}

.scan-frame::before,
.scan-frame::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: #00d4ff;
  border-style: solid;
  z-index: 2;
}

.scan-frame::before {
  top: -3px;
  left: -3px;
  border-width: 4px 0 0 4px;
  border-radius: 8px 0 0 0;
}

.scan-frame::after {
  top: -3px;
  right: -3px;
  border-width: 4px 4px 0 0;
  border-radius: 0 8px 0 0;
}

.scan-corner-bl,
.scan-corner-br {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: #00d4ff;
  border-style: solid;
  z-index: 2;
}

.scan-corner-bl {
  bottom: -3px;
  left: -3px;
  border-width: 0 0 4px 4px;
  border-radius: 0 0 0 8px;
}

.scan-corner-br {
  bottom: -3px;
  right: -3px;
  border-width: 0 4px 4px 0;
  border-radius: 0 0 8px 0;
}

.scan-line-overlay {
  position: absolute;
  left: 5%;
  width: 90%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  box-shadow: 0 0 15px #00d4ff, 0 0 30px rgba(0, 212, 255, 0.5);
  animation: scan-move 2s ease-in-out infinite;
  z-index: 3;
}

@keyframes scan-move {
  0% {
    top: 10%;
  }

  50% {
    top: 85%;
  }

  100% {
    top: 10%;
  }
}

.scan-text {
  margin-top: 30px;
  color: white;
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  animation: blink-text 1.5s ease-in-out infinite;
}

@keyframes blink-text {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.scan-icon {
  font-size: 24px;
  margin-bottom: 10px;
  animation: bounce-icon 1s ease-in-out infinite;
}

@keyframes bounce-icon {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* ========================================
   ユーティリティ
   ======================================== */
.hidden {
  display: none !important;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
