/* 리셋 및 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: linear-gradient(180deg, rgba(84, 27, 29, 0.00) 25.22%, #541B1D 96.69%);
  color: #333;
}


/* 컨테이너 */
.app-link-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  min-height: 550px;
  /* 최소 높이 설정 */
  padding: 64px 20px 40px 20px;
  /* 상:64, 하:40, 좌우:20 고정 */
  background-image: url('../../assets/applink_bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-sizing: border-box;
  overflow-y: auto;
  /* 화면 작을 때 스크롤 */
}

/* 앱 아이콘 */
.app-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
  border-radius: 22.5%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.app-icon img {
  width: 100%;
  height: 100%;
  border-radius: 22.5%;
  object-fit: cover;
}

.app-icon-top {
  position: static;
  margin: 0 auto;
  transform: none;
  width: 176px;
  height: 28px;
  flex-shrink: 0;
}

/* 메인 텍스트 래퍼 */
/* 메인 텍스트 래퍼 */
.main-text-wrapper {
  position: static;
  margin-top: 4vh;
  /* 가변 간격 축소 */
  width: 100%;
  text-align: left;
  z-index: 5;
  flex-shrink: 0;
}

.main-text-wrapper p:first-child {
  color: #FFF;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  line-height: 48px;
  margin-bottom: 8px;
}

.main-text-wrapper p:last-child {
  color: rgba(255, 255, 255, 0.72);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 24px;
}

/* 앱 정보 */
.app-info {
  text-align: center;
  margin-bottom: 32px;
  color: #fff;
}

.app-info h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.app-info p {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.5;
}

/* 버튼 래퍼 */
.button-wrapper {
  position: relative;
  margin-top: auto;
  /* 하단으로 밀착 */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

/* 링크 퍼슨 이미지 */
.link-person {
  position: absolute;
  top: 0;
  /* 래퍼 상단(버튼 상단) 기준 */
  right: 22px;
  width: 140px;
  height: auto;
  margin-bottom: 0;
  z-index: 0;
  transform: translateY(-85%);
  /* 이미지의 85%만큼 위로 이동 (15%는 버튼 뒤에) */
}

/* 버튼 */
.app-link-button {
  width: 100%;
  position: relative;
  z-index: 1;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--Semantic-Secondary-Gradient-Normal, linear-gradient(90deg, #DA022E 0%, #E86933 100%));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  gap: 12px;
  /* align-self: stretch; -> wrapper 내에서는 width: 100% 사용 */
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.app-link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.app-link-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-download-button {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  margin-top: 12px;
  color: white;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

/* 외부 브라우저 안내 메시지 */
.external-browser-message {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 24px;
  max-width: 320px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.external-browser-message p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 8px;
}

.external-browser-message p:last-child {
  margin-bottom: 0;
}

.external-browser-message strong {
  color: #333;
}

/* 데스크톱 메시지 박스 */
.message-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.message-box h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 12px;
}

.message-box p {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
  .app-info h1 {
    font-size: 24px;
  }

  .app-info p {
    font-size: 14px;
  }

  .app-link-button {
    padding: 14px 40px;
    font-size: 16px;
  }

  .app-icon {
    width: 80px;
    height: 80px;
    font-size: 40px;
  }
}

/* 로딩 애니메이션 (옵션) */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}