/* ============================================================
   NEW AIMAN 영상명함 페이지 스타일
   ============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #C8A032;
  --dark: #0A0A0A;
  --grey: #888;
}

html, body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Noto Sans KR", sans-serif;
  background: linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 50%, #0A0A0A 100%);
  color: white;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 12px;
  min-height: 100vh;
}

#root {
  width: 100%;
  max-width: 460px;
}

/* ─── 로딩 ─── */
#loading {
  text-align: center;
  padding: 60px 20px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(200, 160, 50, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading p { color: var(--grey); font-size: 13px; }

/* ─── 환영 (id 없을 때) ─── */
.welcome {
  text-align: center;
  padding: 60px 20px;
}
.welcome .logo-box {
  width: 88px; height: 88px;
  margin: 0 auto 24px;
  background: var(--gold);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 900;
  color: black;
  box-shadow: 0 8px 24px rgba(200, 160, 50, 0.35);
}
.welcome h1 {
  font-size: 30px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 800;
}
.welcome p {
  color: var(--grey);
  font-size: 14px;
  line-height: 1.7;
}

/* ─── 에러 ─── */
.error {
  text-align: center;
  padding: 60px 20px;
  color: var(--grey);
}
.error .icon {
  font-size: 48px;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0.7;
}
.error h2 {
  color: white;
  margin-bottom: 8px;
  font-size: 18px;
}
.error p {
  font-size: 13px;
  line-height: 1.5;
}

/* ─── 명함 카드 ─── */
.card {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

/* 등급별 효과 */
.card.grade-vip {
  animation: vip-glow 1.2s ease-in-out infinite alternate;
  border-color: #FFD700;
}
@keyframes vip-glow {
  0% {
    box-shadow: 
      0 0 14px rgba(255, 215, 0, 0.4),
      0 0 24px rgba(255, 215, 0, 0.25),
      0 8px 20px rgba(0, 0, 0, 0.5);
  }
  100% {
    box-shadow: 
      0 0 32px rgba(255, 215, 0, 1),
      0 0 48px rgba(255, 215, 0, 0.7),
      0 8px 20px rgba(0, 0, 0, 0.5);
  }
}

/* VIP 스파클 4개 */
.sparkle {
  position: absolute;
  pointer-events: none;
  fill: #FFD700;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.9));
  z-index: 5;
}
.sparkle.s1 {
  top: -12px; left: 22px;
  width: 26px; height: 26px;
  animation: sparkle-twinkle 1.2s ease-in-out infinite;
}
.sparkle.s2 {
  top: -8px; right: 26px;
  width: 22px; height: 22px;
  fill: #FFEEB0;
  animation: sparkle-twinkle 1.2s ease-in-out infinite;
  animation-delay: 0.6s;
}
.sparkle.s3 {
  top: 45px; right: -12px;
  width: 18px; height: 18px;
  animation: sparkle-twinkle 1.2s ease-in-out infinite;
  animation-delay: 0.3s;
}
.sparkle.s4 {
  bottom: 80px; left: -12px;
  width: 20px; height: 20px;
  fill: #FFEEB0;
  animation: sparkle-twinkle 1.2s ease-in-out infinite;
  animation-delay: 0.9s;
}
@keyframes sparkle-twinkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0.5) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(180deg);
  }
}
.card.grade-premium {
  animation: premium-pulse 1.8s ease-in-out infinite alternate;
  border-color: #9D8DF1;
}
@keyframes premium-pulse {
  0%   { box-shadow: 0 0 14px rgba(157, 141, 241, 0.35), 0 8px 20px rgba(0,0,0,0.5); }
  100% { box-shadow: 0 0 28px rgba(157, 141, 241, 0.9), 0 0 40px rgba(157, 141, 241, 0.5), 0 8px 20px rgba(0,0,0,0.5); }
}
.card.grade-standard {
  border-color: #4FACFE;
  box-shadow: 0 0 18px rgba(79, 172, 254, 0.55), 0 8px 20px rgba(0,0,0,0.5);
}

/* 등급 뱃지 */
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  margin-bottom: 10px;
}
.grade-badge.vip {
  background: linear-gradient(135deg, #FFD700, #C8A032);
  color: #1A1A1A;
  animation: badge-bounce 1.2s ease-in-out infinite alternate;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}
.grade-badge.premium {
  background: linear-gradient(135deg, #9D8DF1, #6A5ACD);
  color: white;
  animation: badge-bounce 1.8s ease-in-out infinite alternate;
}
.grade-badge.standard {
  background: linear-gradient(135deg, #4FACFE, #00C6FF);
  color: white;
}
@keyframes badge-bounce {
  0%   { transform: scale(0.95); }
  100% { transform: scale(1.15); }
}

/* 헤더: 사진 + 정보 + 로고 */
.head-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
}
.head-info {
  flex: 1;
  min-width: 0;
}
.logo {
  max-width: 80px;
  max-height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.name {
  font-size: calc(22px * var(--s-basic, 1));
  font-weight: 800;
  margin-bottom: 3px;
  line-height: 1.2;
}
.role-company {
  font-size: calc(13px * var(--s-basic, 1));
  color: var(--accent);
  margin-bottom: 4px;
}
.category-tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

/* 슬로건 */
.intro {
  padding: 12px 8px;
  font-size: 13.5px;
  font-style: italic;
  color: var(--text);
  opacity: 0.88;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 10px 0;
  text-align: center;
  line-height: 1.5;
}
.card[data-text-dark="true"] .intro {
  border-color: rgba(0, 0, 0, 0.12);
}

/* 영상 */
.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid var(--accent);
}
.video iframe {
  width: 100%; height: 100%;
  border: 0;
}

/* 연락처 */
.contacts {
  margin: 12px 0 4px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}
.card[data-text-dark="true"] .contact-row {
  border-color: rgba(0, 0, 0, 0.08);
}
.contact-row:last-child { border-bottom: none; }
.contact-row:hover, .contact-row:active {
  background: rgba(200, 160, 50, 0.08);
}
.contact-icon {
  width: 22px;
  text-align: center;
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
}
.contact-text {
  font-size: calc(13px * var(--s-contact, 1));
  flex: 1;
  word-break: break-all;
}

/* SNS */
.sns-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 14px 0 4px;
}
.sns-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  transition: transform 0.15s, background 0.15s;
}
.sns-icon:hover, .sns-icon:active {
  transform: translateY(-2px);
  background: var(--accent);
  color: var(--bg);
}
.sns-icon.brand-instagram { color: #E4405F; border-color: #E4405F; }
.sns-icon.brand-facebook  { color: #1877F2; border-color: #1877F2; }
.sns-icon.brand-twitter,
.sns-icon.brand-x         { color: white; border-color: white; }
.sns-icon.brand-youtube   { color: #FF0000; border-color: #FF0000; }
.sns-icon.brand-tiktok    { color: white; border-color: #FE2C55; }
.sns-icon.brand-linkedin  { color: #0A66C2; border-color: #0A66C2; }
.sns-icon.brand-naverblog { color: white; background: #03C75A; border-color: #03C75A; }
.sns-icon.brand-kakao     { color: #3C1E1E; background: #FEE500; border-color: #FEE500; }

/* vCard 다운로드 버튼 */
.vcard-btn {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: filter 0.15s, transform 0.1s;
}
.vcard-btn:hover { filter: brightness(1.08); }
.vcard-btn:active { transform: scale(0.98); }

/* 푸터 */
.brand-footer {
  text-align: center;
  margin-top: 14px;
  font-size: 11px;
  color: var(--grey);
  letter-spacing: 1px;
}
.brand-footer .brand {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 2px;
}

/* 모바일 */
@media (max-width: 460px) {
  body { padding: 10px 8px; }
  .card { padding: 18px; border-radius: 16px; }
  .name { font-size: calc(20px * var(--s-basic, 1)); }
  .photo { width: 58px; height: 58px; }
}

/* ============================================================
   🌟 메인 슬로건 + 등급 안내 (홈 + 명함 페이지 공통)
   ============================================================ */

.welcome-sub {
  margin-bottom: 28px;
}

/* 메인 슬로건 박스 */
.main-slogan {
  width: 100%;
  margin: 20px 0;
  padding: 20px 16px;
  background: linear-gradient(135deg, #1A1A1A, #0F0F0F, #1A1A1A);
  border-radius: 14px;
  border: 1.5px solid rgba(200, 160, 50, 0.4);
  box-shadow: 0 0 16px rgba(200, 160, 50, 0.15);
  text-align: center;
}

.slogan-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.slogan-text {
  color: white;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

.slogan-text strong {
  color: var(--gold);
  font-weight: 700;
}

/* 등급 안내 카드 */
.grade-guide {
  width: 100%;
  margin: 16px 0;
  padding: 14px;
  background: #1A1A1A;
  border-radius: 14px;
  border: 1px solid rgba(200, 160, 50, 0.25);
}

.grade-guide-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
}

.grade-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.2px solid;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
}

.grade-badge-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.grade-icon {
  font-size: 16px;
}

.grade-price {
  padding: 4px 8px;
  border: 1px solid;
  border-radius: 6px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.grade-arrow {
  font-size: 14px;
  font-weight: bold;
}

.grade-desc {
  flex: 1;
  min-width: 120px;
  color: white;
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 500;
}

/* 모바일: 등급 카드 세로 레이아웃 */
@media (max-width: 460px) {
  .grade-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .grade-row > .grade-badge-box,
  .grade-row > .grade-price {
    flex-shrink: 0;
  }
  .grade-arrow {
    display: none;
  }
  .grade-desc {
    width: 100%;
    margin-top: 4px;
  }
}

/* 명함 아래 영역 */
.below-card {
  margin-top: 24px;
}

/* CTA 버튼 (나도 영상명함 만들기) */
.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #C8A032, #A8851D);
  color: #0A0A0A;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(200, 160, 50, 0.4);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 160, 50, 0.6);
  filter: brightness(1.1);
}

.cta-button:active {
  transform: scale(0.98);
}

.welcome-cta {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  text-align: center;
}
