/* =========================================
   RESET
========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  color: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* =========================================
   HEADER
========================================= */

header {
  width: 100%;
  background: #050505;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  
}

.header-inner {
  width: 100%;
  max-width: 1920px;

  margin: 0 auto;
  padding: 22px 50px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================
   LEFT
========================================= */

.logo-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-logo {
  width: 150px !important;
  /* !important를 붙여서 강제 적용 */
  height: 170px !important;
  /* !important를 붙여서 강제 적용 */
  max-width: none !important;
  /* 최대 너비 제한 해제 */
  max-height: none !important;
  /* 최대 높이 제한 해제 */
  object-fit: contain;
}

.logo-text {
  line-height: 1.2;
}

.web-text {
  display: block;
  color: #00f2fe;
  font-size: 1rem;
  margin-bottom: 5px;
  letter-spacing: 2px;
}

.challenge-text {
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
}

/* =========================================
   CLOCK
========================================= */

.clock-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.date-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-box {
  padding: 8px 16px;

  border-radius: 10px;

  border: 1px solid rgba(0, 242, 254, 0.35);

  background: rgba(0, 242, 254, 0.08);

  color: #00f2fe;

  font-weight: 700;
}

.day-text {
  font-weight: 700;
  letter-spacing: 2px;
}

.current-time {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 4px;
}

/* =========================================
   MENU
========================================= */

.user-menu {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.5rem;
}

.user-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: 0.3s;
}

.user-menu li a:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.4);
  transform: translateY(-2px);
}

.user-menu i {
  color: #00f2fe;
}


/* ==========================================================================
   HEADER 반응형
   화면 줄어들면 아래줄로 자동 이동
   ========================================================================== */

/* header 전체 */

.header-inner {
  width: 100%;

  display: flex;
  flex-wrap: wrap;
  /* 핵심 */

  align-items: center;
  justify-content: space-between;

  gap: 25px;

  padding: 22px 40px;
}

/* ==========================================================================
   LEFT
   ========================================================================== */

.header-left {
  flex: 1 1 320px;

  display: flex;
  align-items: center;
}

/* ==========================================================================
   CENTER
   ========================================================================== */

.header-center {
  flex: 1 1 300px;

  display: flex;
  justify-content: center;
}

/* ==========================================================================
   RIGHT
   ========================================================================== */

.header-right {
  flex: 1 1 320px;

  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   1400px 이하
   시계 아래줄 이동
   ========================================================================== */

@media (max-width: 1400px) {

  .header-inner {
    justify-content: center;
  }

  .header-left {
    flex: 1 1 100%;
    justify-content: center;
  }

  .header-center {
    flex: 1 1 auto;
  }

  .header-right {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   1000px 이하
   메뉴 전체 아래줄
   ========================================================================== */

@media (max-width: 1000px) {

  .header-inner {
    flex-direction: column;

    align-items: center;

    gap: 30px;
  }

  .header-left,
  .header-center,
  .header-right {
    width: 100%;

    justify-content: center;
  }

  .user-menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .clock-display {
    width: 100%;
    align-items: center;
  }
}

/* ==========================================================================
   작은 화면
   ========================================================================== */

@media (max-width: 700px) {

  .header-inner {
    padding: 20px 15px;
  }

  .logo-container {
    flex-direction: column;
    text-align: center;
  }

  .main-logo {
    width: 250px;
    height: 300px;
  }

  .challenge-text {
    font-size: 1.35rem;
  }

  .current-time {
    font-size: 1.5rem;
    letter-spacing: 2px;
  }

  .date-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .user-menu {
    gap: 10px;
  }

  .user-menu li a {
    padding: 10px 14px;
  }
}

/* ==========================================================================
   BODY 전체 50 : 50 레이아웃
   ========================================================================== */

.bodyitem {
  width: 100%;

  display: flex;
  flex-wrap: wrap;

  align-items: flex-start;
  justify-content: space-between;

  padding: 30px 60px 120px;

  overflow: hidden;
}

/* ==========================================================================
   1. 좌측 메탈 네비게이션 영역
   ========================================================================== */

.board-trigger {
  position: relative;
  width: 950px;
  height: 950px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  z-index: 20;
  margin-top: 50px;
}

/* ==========================================================================
   중앙 텍스트
   ========================================================================== */

.board-text {
  position: absolute;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  z-index: 30;

  font-size: 2.4rem;
  font-weight: 800;

  letter-spacing: 6px;

  color: #ffffff;

  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(0, 242, 254, 0.25);

  user-select: none;
  pointer-events: none;
}

/* ==========================================================================
   2. 메탈 원형 공통
   ========================================================================== */

.metal-layer {
  position: absolute;

  top: 50%;
  left: 50%;

  transform:
    translate(-50%, -50%) scale(1);

  border-radius: 50%;

  box-sizing: border-box;

  pointer-events: auto;
  cursor: pointer;

  overflow: visible;

  /* 메탈 두께 */
  border: 55px solid transparent;

  /* 메탈 광택 */
  box-shadow:
    inset 0 0 15px rgba(255, 255, 255, 0.15),
    inset 0 0 30px rgba(255, 255, 255, 0.08),
    0 0 25px rgba(0, 0, 0, 0.5);

  transition:
    border-width 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    filter 0.35s ease;
}

/* ==========================================================================
   메탈 선샤인
   ========================================================================== */

.metal-layer::after {
  content: "";

  position: absolute;

  top: -55px;
  left: -55px;
  right: -55px;
  bottom: -55px;

  border-radius: 50%;

  border: 55px solid black;

  pointer-events: none;

  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0.45) 45%,
      rgba(255, 255, 255, 0.75) 50%,
      rgba(255, 255, 255, 0.45) 55%,
      rgba(255, 255, 255, 0) 70%);

  mix-blend-mode: overlay;

  animation: shineMove 50s linear infinite;

  z-index: 20;

  transition:
    border-width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   SVG 글자
   ========================================================================== */

.metal-layer svg {
  position: absolute;

  top: -55px;
  left: -55px;

  width: calc(100% + 110px);
  height: calc(100% + 110px);

  overflow: visible;

  z-index: 25;
}

.metal-layer text {
  font-size: 1.8rem;
  font-weight: 800;

  /* 최종 변경: 어떤 메탈 배경에도 가장 정석으로 어울리는 순수 화이트 */
  fill: #ffffff;

  letter-spacing: 2px;

  /* 글자가 실버 링 배경에 묻혀 흐릿해지지 않도록 또렷하고 정밀한 블랙 음영만 배치 */
  filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.9));
}

/* ==========================================================================
   3. 링별 크기 및 회전
   ========================================================================== */

/* 1번 */

.m-layer-1 {
  width: 350px;
  height: 350px;

  border-top-color: rgba(180, 179, 179, 0.95);
  border-bottom-color: rgba(234, 235, 236, 0.6);

  animation:
    rotateClockwise 100s linear infinite;

  z-index: 7;
}

/* 2번 */

.m-layer-2 {
  width: 500px;
  height: 500px;

  border-left-color: rgba(168, 169, 171, 0.6);
  border-right-color: rgb(175, 175, 175);

  animation:
    rotateCounterClockwise 150s linear infinite;

  z-index: 6;
}

/* 3번 */

.m-layer-3 {
  width: 650px;
  height: 650px;

  border-top-color: rgba(203, 213, 225, 0.6);
  border-bottom-color: rgba(226, 226, 226, 0.9);

  animation:
    rotateClockwise 200s linear infinite;

  z-index: 5;
}

/* 4번 */

.m-layer-4 {
  width: 800px;
  height: 800px;

  border-left-color: rgba(190, 190, 190, 0.7);
  border-right-color: rgba(150, 150, 150, 0.8);

  animation:
    rotateCounterClockwise 250s linear infinite;

  z-index: 4;
}

/* 5번 */

.m-layer-5 {
  width: 950px;
  height: 950px;

  border-top-color: rgba(220, 225, 230, 0.85);
  border-bottom-color: rgba(170, 170, 170, 0.6);

  animation:
    rotateClockwise 300s linear infinite;

  z-index: 3;
}

/* ==========================================================================
   4. 호버 효과
   ========================================================================== */

.metal-layer:hover {
  animation-play-state: paused;

  border-width: 65px;

  filter:
    brightness(1.25) drop-shadow(0 0 18px rgba(255, 255, 255, 0.2));
}

.metal-layer:hover::after {
  animation-play-state: paused;

  border-width: 65px;
}

/* 확대 */

.m-layer-1:hover {
  transform:
    translate(-50%, -50%) scale(1.05);
}

.m-layer-2:hover {
  transform:
    translate(-50%, -50%) scale(1.08);
}

.m-layer-3:hover {
  transform:
    translate(-50%, -50%) scale(1.12);
}

.m-layer-4:hover {
  transform:
    translate(-50%, -50%) scale(1.15);
}

.m-layer-5:hover {
  transform:
    translate(-50%, -50%) scale(1.18);
}

/* ==========================================================================
   5. 회전 애니메이션
   ========================================================================== */

@keyframes rotateClockwise {

  from {
    transform:
      translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform:
      translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes rotateCounterClockwise {

  from {
    transform:
      translate(-50%, -50%) rotate(360deg);
  }

  to {
    transform:
      translate(-50%, -50%) rotate(0deg);
  }
}

/* ==========================================================================
   메탈 빛줄기
   ========================================================================== */

@keyframes shineMove {

  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   화면 축소 시 회전 정지
   ========================================================================== */

@media (max-width: 1200px) {

  .board-trigger {
    transform: scale(1);
  }

  /* 모든 링 회전 정지 */
  .m-layer-1,
  .m-layer-2,
  .m-layer-3,
  .m-layer-4,
  .m-layer-5 {
    animation-play-state: paused;
  }

  /* 메탈 광택도 정지 */
  .metal-layer::after {
    animation-play-state: paused;
  }
}

/* ==========================================================================
   더 작은 화면
   ========================================================================== */

@media (max-width: 900px) {

  .board-trigger {
    transform: scale(1);
  }

  .m-layer-1,
  .m-layer-2,
  .m-layer-3,
  .m-layer-4,
  .m-layer-5 {
    animation-play-state: paused;
  }

  .metal-layer::after {
    animation-play-state: paused;
  }
}

/* ==========================================================================
   우측 회전 카드 축 컨테이너
   ========================================================================== */

.board-content-wrapper {
  width: 50%;
  min-width: 950px;
  height: 1000px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  left: -100px;
  margin-top: 20px;
}

/* ==========================================================================
   카드 공통
   ========================================================================== */

.rolling-card {
  position: absolute;

  width: 650px;
  height: 850px;

  background: rgba(15, 23, 42, 0.96);

  border: 25px solid #5d5d5d;

  border-radius: 18px;

  padding: 45px 20px;

  overflow: hidden;

  box-sizing: border-box;

  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.75);

  color: #ffffff;

  pointer-events: auto;

  transition:
    transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.6s ease,
    filter 0.6s ease;

  transform-origin: center center;
}

/* ==========================================================================
   메탈 선샤인 효과
   ========================================================================== */

.rolling-card::after {
  content: "";

  position: absolute;

  top: -50%;
  left: -150%;

  width: 60%;
  height: 200%;

  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.02) 20%,
      rgba(255, 255, 255, 0.35) 50%,
      rgba(255, 255, 255, 0.02) 80%,
      rgba(255, 255, 255, 0) 100%);

  transform: rotate(30deg);

  animation: metalSunshine 3.5s ease-in-out infinite;

  pointer-events: none;
}

/* ==========================================================================
   2. 카드 타이틀
   ========================================================================== */
.card-title {
  font-size: 34px;
  font-weight: 800;

  /* 글자색 화이트 통일 */
  color: #ffffff;

  margin: 0 0 20px 0;
  letter-spacing: -1px;

  /* 하단 가로선을 은은하고 투명한 화이트 선으로 변경 */
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 12px;

  /* 야광 효과 완전 제거 */
  text-shadow: none;
  text-align: center;
}

/* ==========================================================================
   3. 카드 서브 타이틀 (h4)
   ========================================================================== */
.card-body {
  margin-bottom: 20px;
}

.card-body h4 {
  font-size: 20px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 25px 0;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 16px;
  border-radius: 6px;
  display: inline-block;

  /* 왼쪽 포인트 바를 차분한 매트 실버(슬레이트 그레이) 톤으로 변경 */
  border-left: 5px solid #cbd5e1;
}

/* ==========================================================================
   카드 본문
   ========================================================================== */

.card-body p {
  font-size: 17.5px;
  line-height: 1.7;

  color: #cbd5e1;

  margin: 0 0 14px 0;

  padding-left: 15px;

  letter-spacing: -0.4px;
}

/* ==========================================================================
   위치 배치
   ========================================================================== */

/* 중앙 */

.pos-center {
  top: 50%;
  left: 50%;

  transform:
    translate(-50%, -50%) scale(1);

  z-index: 10;

  opacity: 1;
}

/* 왼쪽 중간 */

.pos-mid-left {
  top: 38%;
  left: 15%;

  transform:
    translate(-50%, -50%) scale(0.5);

  z-index: 5;

  opacity: 0.99;
}

/* 오른쪽 중간 */

.pos-mid-right {
  top: 62%;
  left: 82%;

  transform:
    translate(-50%, -50%) scale(0.5);

  z-index: 5;

  opacity: 0.99;
}

/* 왼쪽 뒤 */

.pos-far-left {
  top: 30%;
  left: -2%;

  transform:
    translate(-50%, -50%) scale(0.2);

  z-index: 2;

  opacity: 0.99;

  filter: blur(1.5px);
}

/* 오른쪽 뒤 */

.pos-far-right {
  top: 70%;
  left: 95%;

  transform:
    translate(-50%, -50%) scale(0.2);

  z-index: 2;

  opacity: 0.99;

  filter: blur(1.5px);
}

/* ==========================================================================
   메탈 광택 애니메이션
   ========================================================================== */

@keyframes metalSunshine {

  0% {
    left: -150%;
  }

  40% {
    left: 150%;
  }

  100% {
    left: 150%;
  }
}


/* ==========================================================================
   화면이 줄어들면
   카드 전부 펼치기 + 동일 크기
   ========================================================================== */

@media (max-width: 1800px) {

  /* 전체 세로 배치 */
  .bodyitem {
    flex-direction: column;
    align-items: center;

    gap: 80px;
  }

  /* 좌측 원형 */
  .board-trigger {
    width: 100%;
    min-width: auto;

    height: 950px;
  }

  /* 우측 카드영역 */
  .board-content-wrapper {
    width: 100%;
    min-width: auto;
    height: auto;

    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 35px;
    left: 0px;
  }

  /* 모든 카드 동일화 */
  .rolling-card {
    position: relative !important;

    width: 120%;
    max-width: 850px;

    height: auto;
    min-height: 420px;

    transform: none !important;

    left: auto !important;
    top: auto !important;

    opacity: 1 !important;

    filter: none !important;

    z-index: auto !important;
  }

  /* 기존 위치 클래스 초기화 */
  .pos-center,
  .pos-mid-left,
  .pos-mid-right,
  .pos-far-left,
  .pos-far-right {
    position: relative;

    top: auto;
    left: auto;

    transform: none;
  }

    .card-title {
      font-size: 30px;
}
}
@media screen and (max-width: 768px) {
  .card-body-img {
    width: 100% !important;
    height: 150px !important;
    /* 높이를 슬림하게 대폭 줄였습니다 */
  }
}

/* =========================================
   FOOTER
========================================= */

.main-footer {
  width: 100%;
  padding: 0px 40px;
  margin-top: -10px;
 

}

.footer-grid {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

/* =========================================
   FOOTER CARD
========================================= */

.f-card,
.fcardimg {
  min-height: 200px;
  padding: 30px;
  border-radius: 24px;
  margin-top: -30px;

}

.f-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #00f2fe;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 242, 254, 0.48);
  text-align: center;
}

.f-card p {
  font-size: 0.96rem;
  line-height: 1.5;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.82);
}

/* =========================================
   QR
========================================= */

.fcardimg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fcardimg img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

/* =========================================
   HIGHLIGHT
========================================= */

.highlight-card {
  border: 1px solid rgba(255, 0, 0, 0.2);
}

.warning {
  margin-top: 18px;
  line-height: 1.5;
}


/* ==========================================================================
   FOOTER 반응형
   화면 줄어들면 세로 적층
   ========================================================================== */

@media (max-width: 1600px) {

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   태블릿 이하
   ========================================================================== */

@media (max-width: 1100px) {

  .main-footer {
    padding: 70px 25px;
  }

  .footer-grid {
    grid-template-columns: 1fr;

    gap: 28px;
  }

  .f-card,
  .fcardimg {
    width: 100%;
    min-height: auto;
  }

  .fcardimg {
    padding: 40px 20px;
  }

  .fcardimg img {
    width: 260px;
    height: 260px;
  }
}

/* ==========================================================================
   작은 화면
   ========================================================================== */

@media (max-width: 700px) {

  .main-footer {
    padding: 60px 18px;
  }

  .f-card,
  .fcardimg {
    padding: 24px;
    border-radius: 18px;
  }

  .f-title {
    font-size: 1.15rem;
  }

  .f-card p {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .fcardimg img {
    width: 220px;
    height: 220px;
  }
}

/* ==========================================================================
   버튼들 모음
   ========================================================================== */
.card-bodybutton {
    width: 350px;
    max-width: 100%;
    height: 60px;

    /* 미세한 화이트 투명 테두리 */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;

    /* 기본 상태는 묵직한 다크 그레이 배경에 깨끗한 화이트 글자 */
    background: #1e293b;
    color: #ffffff;

    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
  }

/* 버튼 호버 (마우스 올렸을 때) */
.card-bodybutton:hover {
    transform: scale(1.03);

    /* 마우스를 올리면 밝은 실버 화이트로 면이 채워지고 글자가 어둡게 반전 */
    background: #f1f5f9;
    color: #1e293b;
    border-color: #f1f5f9;
  }

/* 모바일 */
@media (max-width: 480px) {
  .card-bodybutton {
    width: 100%;
    height: 55px;
    border-radius: 12px;
  }
}


/*                                 */
.side-shortcut-bar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
  /* 배경을 아주 얇은 반투명으로 두어 영역만 구분 */
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
  border-radius: 0 15px 15px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  z-index: 10000;
}

/* 개별 아이템 */
.shortcut-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 165px;
  /* 텍스트 길이를 고려해 약간 넓힘 */
  padding: 8px;
  border-radius: 10px;
  transition: all 0.2s ease-in-out;
  /* 아이템 배경 투명하게 */
  background: transparent;
  margin-left: -10px;
}

.shortcut-item:hover {
  transform: translateX(8px);
  background: rgba(255, 255, 255, 0.1);
  /* 호버 시에만 살짝 표시 */
}

/* 로고 박스 - 배경색 제거 및 투명화 */
.logo-wrapper {
  width: 38px;
  height: 36px;
  min-width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 배경색과 테두리 제거 */
  background: transparent !important;
  padding: 0;
  overflow: hidden;
  /* 이미지 선명도 유지 */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.logo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* 이미지 비율 유지 */
  display: block;
}

/* 텍스트 스타일 */
.short-text {
  margin-left: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  color: #ffffff;
  letter-spacing: 0.8px;
  white-space: nowrap;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  /* 배경이 투명하므로 가독성 위해 그림자 강화 */
}



/* 마지막 텍스트 */
.shortcut-item:last-child .short-text {
  color: #ff2b2b !important;

  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);

  font-size: 1.2rem;
}

/* [추가] 모바일 화면(너비 768px 이하)에서는 보이지 않음 */
@media (max-width: 1024px) {
  .side-shortcut-bar {
    display: none !important;
    /* 화면에서 완전히 제거 */
  }
}







/* ================= 홈AI 전용 스타일 시작 ================= */

:root {
  --hdsa-home-ai-glow: rgba(0, 242, 254, 0.6);
  --hdsa-home-ai-bg: #0d1117;
  --hdsa-home-ai-panel: rgba(22, 27, 34, 0.9);
  --hdsa-home-ai-border: rgba(48, 54, 61, 0.8);
  --hdsa-home-ai-text: #c9d1d9;
}

/* ===============================
   우측 회전 아이콘
=============================== */

.hdsa-home-ai-trigger {
  position: fixed;
  right: 30px;
  top: 80%;
  transform: translateY(-50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9999;

  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

/* 숨김 상태 */
.hdsa-home-ai-trigger.hdsa-hidden {
  opacity: 0;
  transform: translateY(-50%) scale(0.5);
  pointer-events: none;
}

/* hover */
.hdsa-home-ai-trigger:hover {
  transform: translateY(-50%) scale(1.1);
}

/* ===============================
   원형 레이어
=============================== */


.hdsa-circle-layer {
  position: absolute;
  box-sizing: border-box;
  border-radius: 50%;
  border: 15px solid transparent;

  /* #000 배경 위에서 링들의 경계선이 탁해지지 않고 맑게 떨어지도록 그림자 필터 처리 */
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

/* 1번 레이어 (바깥쪽 링) */
.hdsa-layer-1 {
  width: 100%;
  height: 100%;

  border-top-color: #00ff66;
  /* 올려주신 선명한 고채도 네온 그린 그대로 */
  border-bottom-color: #326432;
  /* #000 배경과 자연스럽게 녹아들도록 어두운 쥐색 레벨 다운 */

  animation: hdsaRotateClockwise 10s linear infinite;
}

/* 2번 레이어 (중간 링) */
.hdsa-layer-2 {
  width: 85%;
  height: 85%;

  border-left-color: #cc00ff;
  /* 올려주신 선명하고 맑은 레이저 퍼플 그대로 */
  border-right-color: #69366c;
  /* #000 배경 위에서 동화되도록 깎아낸 다크 쥐색 */

  animation: hdsaRotateCounterClockwise 6s linear infinite;
}

/* 3번 레이어 (안쪽 링) */
.hdsa-layer-3 {
  width: 70%;
  height: 70%;

  border-top-color: #b2ff00;
  /* 올려주신 빛을 탁 틔워주는 라임 크롬 그대로 */
  border-bottom-color: #546533;
  /* 중앙 텍스트 가독성을 위해 어둡게 누른 딥 스틸 그레이 */

  animation: hdsaRotateClockwise 7s linear infinite;
}


/* ===============================
   중앙 텍스트
=============================== */

.hdsa-trigger-text {
  font-size: 2rem;
  font-weight: bold;

  z-index: 10;

  user-select: none;

  animation:
    hdsaColorChange5Step 50s infinite;
}

/* 색상 변경 */
@keyframes hdsaColorChange5Step {

  0%,
  20% {
    color: #ffffff;
  }

  21%,
  40% {
    color: #4dfa3c;
  }

  41%,
  60% {
    color: #ffc400;
  }

  61%,
  80% {
    color: #ff8c00;
  }

  81%,
  100% {
    color: #ff3cff;
  }
}

/* ===============================
   채팅 모달
=============================== */

.hdsa-chat-modal {

  position: fixed;

  left: 50%;
  top: 50%;

  transform:
    translate(-50%, -50%) scale(0.9);

  transform-origin: center center;

  width: 30vw;
  min-width: 360px;

  height: 50vh;

  background:
    var(--hdsa-home-ai-panel);

  border:
    1px solid var(--hdsa-home-ai-border);

  border-radius: 16px;

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(0, 242, 254, 0.15);

  backdrop-filter: blur(12px);

  display: flex;
  flex-direction: column;

  opacity: 0;

  pointer-events: none;

  transition:
    opacity 0.4s ease,
    transform 0.4s ease;

  z-index: 10000;
}

/* 활성 상태 */
.hdsa-chat-modal.hdsa-active {

  opacity: 1;

  pointer-events: auto;

  transform:
    translate(-50%, -50%) scale(1);
}

/* ===============================
   헤더
=============================== */

.hdsa-chat-header {

  padding: 16px;

  border-bottom:
    1px solid var(--hdsa-home-ai-border);

  display: flex;

  justify-content: space-between;

  align-items: center;

  cursor: move;

  user-select: none;
}

.hdsa-chat-title {

  font-size: 15px;

  font-weight: 600;

  color: #ffffff;

  display: flex;

  align-items: center;

  gap: 8px;
}

.hdsa-chat-title::before {

  content: '';

  width: 8px;
  height: 8px;

  background: #00f2fe;

  border-radius: 50%;

  box-shadow:
    0 0 8px #00f2fe;
}

/* 닫기 버튼 */
.hdsa-close-btn {

  background: none;

  border: none;

  color: #8b949e;

  cursor: pointer;

  font-size: 40px;
}

.hdsa-close-btn:hover {
  color: #f85149;
}

/* ===============================
   메시지 영역
=============================== */

.hdsa-chat-messages {

  flex: 1;

  padding: 16px;

  overflow-y: auto;

  display: flex;

  flex-direction: column;

  gap: 12px;
}

/* 스크롤 */
.hdsa-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.hdsa-chat-messages::-webkit-scrollbar-thumb {

  background:
    var(--hdsa-home-ai-border);

  border-radius: 4px;
}

/* ===============================
   메시지
=============================== */

.hdsa-msg {

  max-width: 85%;

  padding: 10px 14px;

  border-radius: 12px;

  font-size: 1rem;

  line-height: 1.5;

  word-break: break-word;
}

/* 사용자 */
.hdsa-msg.user {

  background: #238636;

  color: #ffffff;

  align-self: flex-end;

  border-bottom-right-radius: 2px;
}

/* Gemini */
.hdsa-msg.gemini {

  background: #21262d;

  color:
    var(--hdsa-home-ai-text);

  align-self: flex-start;

  border-bottom-left-radius: 2px;

  border:
    1px solid var(--hdsa-home-ai-border);
}

/* ===============================
   입력 영역
=============================== */

.hdsa-chat-input-area {

  padding: 14px;

  border-top:
    1px solid var(--hdsa-home-ai-border);

  display: flex;

  gap: 8px;
}

.hdsa-chat-input {

  flex: 1;

  background: #0d1117;

  border:
    1px solid var(--hdsa-home-ai-border);

  border-radius: 8px;

  padding: 10px 12px;

  color: #ffffff;

  font-size: 1.2rem;

  outline: none;
}

.hdsa-chat-input:focus {
  border-color: #4facfe;
}

/* 전송 버튼 */
.hdsa-send-btn {

  background:
    linear-gradient(135deg,
      #4facfe 0%,
      #00f2fe 100%);

  border: none;

  border-radius: 8px;

  color: #000000;

  font-weight: bold;

  padding: 0 16px;

  cursor: pointer;
}

/* ===============================
   회전 애니메이션
=============================== */

@keyframes hdsaRotateClockwise {

  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes hdsaRotateCounterClockwise {

  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

/* ===============================
   반응형
=============================== */

@media screen and (max-width:1024px) {

  .hdsa-home-ai-trigger,
  .hdsa-chat-modal {

    display: none !important;
  }
}

/* ================= 홈AI 전용 스타일 끝 ================= */


/* ==========================================================================
   0. 홈AI 변수 참조 및 정의
   ========================================================================== */
:root {
  --hdsa-home-ai-glow: rgba(0, 242, 254, 0.6);
  --hdsa-home-ai-bg: #0d1117;
  --hdsa-home-ai-panel: rgba(22, 27, 34, 0.9);
  --hdsa-home-ai-border: rgba(48, 54, 61, 0.8);
  --hdsa-home-ai-text: #c9d1d9;
}

/* ==========================================================================
   1. 우측 상단 고정 트리거 영역 (크기 컴팩트화)
   ========================================================================== */
.hdsainfor {
  position: fixed;
  /* 화면 고정 */
  right: 30px;
  /* 우측 여백 */
  top: 15%;

  width: 150px;
  height: 150px;
  border-radius: 50%;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  /* 상단 노출 보장 */

  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

/* Hover 효과 */
.hdsainfor:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   중앙 텍스트 (홈AI 5단계 색상 전환 적용)
   ========================================================================== */
.hdsametal-layer-text {
  font-size: 2rem;
  /* 컴팩트 크기에 맞춘 폰트 사이즈 */
  font-weight: bold;
  z-index: 10;
  user-select: none;
  white-space: nowrap;
  animation: hdsaColorChange5Step 50s infinite;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   2. 원형 레이어 공통 스타일
   ========================================================================== */
[class^="hdsametal-layer-"] {
  position: absolute;
  box-sizing: border-box;
  border-radius: 50%;

  /* 컴팩트 크기에 어울리는 슬림한 보더 두께 */
  --layer-thickness: 10px;
  border: var(--layer-thickness) solid transparent;

  /* 홈AI 특유의 미래지향적 글로우 음영 추가 */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);

  transition: transform 0.3s ease;
  border: 15px solid transparent;
}


/* ==========================================================================
   3. 링별 크기, 컬러 및 회전 속도 (참조 코드 100% 반영)
   ========================================================================== */
/* 1번 레이어 (바깥쪽 링 - 찬란하게 빛나는 일렉트릭 블루 메탈) */
.hdsametal-layer-1 {
  width: 100%;
  height: 100%;

  border-top-color: #0052ff;
  /* 존재감이 확실한 고채도 리얼 블루 */
  border-bottom-color: #1e355e;
  /* 묵직하게 뒤를 받쳐주는 다크 블루 스틸 */

  animation: hdsaRotateClockwise 10s linear infinite;
}

/* 2번 레이어 (중간 링 - 청량한 반사광이 감도는 레이저 크롬 블루) */
.hdsametal-layer-2 {
  width: 85%;
  height: 85%;

  border-left-color: #00a2ff;
  /* 광택감이 도는 선명한 라이트 일렉트릭 블루 */
  border-right-color: #2b4f70;
  /* 중심을 잡아주는 세련된 건메탈 블루 그레이 */

  animation: hdsaRotateCounterClockwise 6s linear infinite;
}

/* 3번 레이어 (안쪽 링 - 하이테크한 티타늄 사이언 블루) */
.hdsametal-layer-3 {
  width: 70%;
  height: 70%;

  border-top-color: #00d2ff;
  /* 빛을 받아 화사하게 번쩍이는 네온 아이스 블루 */
  border-bottom-color: #1a2a3a;
  /* 단단한 기계 질감의 다크 쥐색 블루 */

  animation: hdsaRotateClockwise 7s linear infinite;
}
/* ==========================================================================
   4. 애니메이션 키프레임들
   ========================================================================== */

/* 우회전 */
@keyframes hdsaRotateClockwise {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 좌회전 */
@keyframes hdsaRotateCounterClockwise {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

/* 텍스트 5단계 색상 변경 */
@keyframes hdsaColorChange5Step {

  0%,
  20% {
    color: #ffffff;
  }

  21%,
  40% {
    color: #4dfa3c;
  }

  41%,
  60% {
    color: #ffc400;
  }

  61%,
  80% {
    color: #ff8c00;
  }

  81%,
  100% {
    color: #ff3cff;
  }
}

/* ==========================================================================
   5. 반응형 미디어 쿼리 (모바일 최적화)
   ========================================================================== */
@media screen and (max-width: 768px) {
  .hdsainfor {
      /* 1. 부모의 영향을 끊고 화면 기준으로 위치를 잡습니다 */
      position: fixed !important;
  
      /* 2. 위치 좌표 지정 */
      bottom: 20px !important;
      /* 바닥에서 20px */
      right: 15px !important;
      /* 오른쪽에서 15px */
  
      /* 3. 크기 및 레이어 우선순위 */
      width: 85px;
      height: 85px;
      z-index: 99999 !important;
      /* 가장 위로 */
  
      /* 4. 초기화 (부모로부터 상속받은 속성 제거) */
      top: auto !important;
      left: auto !important;
      transform: none !important;
    }
  .hdsametal-layer-text {
    font-size: 0.8rem;
  }
}

.ai-highlight {
  font-size: 2.3rem;

}
