
/* ✅ 기본 설정 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    background: #000000;
    font-family: 'Segoe UI', sans-serif;
    padding: 0rem;
    background-image: url('/assets/images/glow-circuit-bg.webp');
  }

  html {
    scroll-behavior: smooth;
  }

  /* ✅ 기본 설정 */
html, body {
  overflow: auto; /* ← 스크롤은 유지 */
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE, Edge */
  overscroll-behavior-x: none;     /* ← 좌우 바운스/당김 차단 */
  overscroll-behavior-y: contain;  /* ← 새로고침은 허용 */
  touch-action: pan-y;             /* ← 세로 스크롤만 허용 */

}

/* ✅ Webkit 기반 브라우저 (Chrome, Safari 등) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

  /* ✅ Grid */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: 160px;
    gap: 15px;
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    /* padding: 1rem; */
  /*  grid-auto-flow: dense; ✅ 가능한 공간에 끼워넣기 허용 */
  }

  
  
  /* ✅ 박스 공통 */
  .grid-item {
    background: #222;
    /* border-radius: 12px; */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    overflow: hidden;
  }
  
  /* 손가락 대신 기본 커서로 변경 */
.marskeys-intro, .youtube-carousel {
  cursor: default !important;
}

  /* ✅ 크기 다양화 */
  .grid-item.small { grid-column: span 1; grid-row: span 1; }
  .grid-item.tall  { grid-column: span 1; grid-row: span 2; }
  .grid-item.large  { grid-column: span 5; grid-row: auto; height: auto; }
  .grid-item.wide  { grid-column: span 3; grid-row: span 3; }
  .grid-item.ultrawide {grid-column: 1 / -1; grid-row: span 3;}
  .grid-item.big   { grid-column: span 2; grid-row: span 2; }
  .grid-item:not(.small):not(.tall):not(.wide):not(.large):not(.big):not(.youtube-carousel):not(.ultrawide) {
    grid-column: span 1;
    grid-row: span 1;
  }


  
  .youtube-carousel {
    grid-column: 1 / -1;
    grid-row: span 3;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 1rem 0;
    height: auto;
    position: relative;
    background: black;
    border: 1px solid rgba(255, 255, 255, 0.4);
  }
  
  

  .carousel-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 1rem;
    margin: 0;
    width: 100%;
  }

  .video-wrapper {
    flex: 0 0 auto;
    width: 80vw;
    max-width: 500px;
    aspect-ratio: 16 / 9 !important;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.4);            /* ← 명시적 지정 */
  }




  @media (max-width: 767px) {
    .youtube-carousel {
      padding-bottom: 0 !important; /* 💥 바닥 여백 제거 */
      margin-bottom: 0 !important;
      height: auto !important;
    }
  
    .carousel-track {
      padding-bottom: 0 !important;
      margin-bottom: 0 !important;
    }
  
    .video-wrapper {
      width: 90vw;
      max-width: 100%;
      aspect-ratio: 16 / 9;
    }
  }


 

 /* 리본 */
 .corner-ribbon {
    position: absolute;
    top: 12px;
    right: -40px;
    width: 150px;
    background: #ff0000;
    color: white;
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 0;
    padding-left: 16px;
    transform: rotate(45deg) translateY(-2px); /* ← 살짝 위로 띄움 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* ← 진하고 멀리 퍼지는 그림자 */
    outline: 1px solid rgba(255, 255, 255, 0.2); /* ← 빛이 반사되는 듯한 라인 */
    z-index: 20;
    letter-spacing: 1px;
  }


  

  
  .carousel-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0rem;
    margin: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  
  .video-wrapper {
    position: relative;
    width: 80vw;
    max-width: 500px;
    aspect-ratio: 16 / 9;
    scroll-snap-align: center;
    overflow: hidden;
    background: #000;
    flex: 0 0 auto;
    /* border-radius: 12px; */
    border: 1px solid rgb(94, 92, 92); /* ✅ 얇은 하얀 경계선 */
  }
  
  .video-thumbnail {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
  }
  
  .thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }
  
  .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    z-index: 3;
    cursor: pointer;
  }
  
  .play-button svg {
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  
  .yt-player {
    width: 100%;
    height: 100%;
    z-index: 1;
  }
  
  
  
  
  

  

  
  

  /* ✅ 모바일 대응 */
  @media (max-width: 767px) {
    .carousel-track iframe {
      max-width: 100%;
    }

    /*.youtube-carousel {
      grid-row: auto !important;
      height: auto !important;
    }*/

  }
  
  @media (max-width: 767px) {
    .youtube-carousel {
      grid-column: 1 / -1 !important; /* 한 줄 전체 */
      grid-row: span 2;
    }
  }

  @media (max-width: 767px) {
    .tall, .wide, .big {
      min-width: 50%; /* ✅ 강제로 너비 확보해 옆에 못 붙게 */
    }
  }



  @media (max-width: 767px) {
    .grid {
      grid-template-columns: repeat(2, 1fr) !important;
    }
  
    .youtube-carousel {
      grid-column: 1 / 3 !important;
      grid-row: span 2;
    }
  
    .tall {
      grid-column: span 1;
    }
  }

  @media (max-width: 767px) {
    .grid {
      grid-template-columns: repeat(2, 1fr) !important;
    }
  
    .youtube-carousel {
      grid-column: 1 / 3 !important;
      grid-row: span 2;
    }
  
    .tall, .wide, .big {
      grid-column: span 1;
    }
  }



  .soundcloud-box {
    position: relative;
    /* border-radius: 12px; */
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
    background: black; /* 로딩 중 배경 */
  }
  
  
  .board-wrapper {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fd0e0e, #8b1e2b, #fd0e0e);
    position: relative;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    grid-row: span 3; /* ✅ 두 칸 높이 차지 */
    justify-content: center;
    align-items: stretch; /* ← 위아래 꽉 채워지게 */
  
    border: 1px solid rgba(255, 255, 255, 0.4); /* ✅ 얇은 하얀 경계선 */
  }

  
  .grid-item.big {
    display: block;
    height: auto !important;
    overflow: visible;
    grid-row: auto / span 4; /* ✅ 원하는 만큼 크게 보장 */
    background: black;
  }

  .mobile-board-list {
    display: block;
    width: 100%;
    height: auto !important;
    overflow: visible;
    padding: 1rem;
    background: black;
    /* border-radius: 12px; */
  
    /* ✅ 얇은 경계선 추가 */
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  @media (max-width: 768px) {
    .grid-item.wide {
      grid-column: span 2;
      grid-row: span 2;
    }
  }

  
  .grid-item.small {
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    box-shadow:none !important;
  }

  .grid-item.small.about-me {
    background: linear-gradient(to bottom, #000000, #000080); /* black to navy */
  }
  
  .grid-item.small img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 이미지가 꽉 차게, 비율 맞춰 자름 */
    display: block;
  }

  .marskeys-intro {
    font-size: 1.1rem;
    margin : 5rem;
    line-height: 1.6;
    padding: 1.5rem;
    text-align: center;
    white-space: normal;
    background: black;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* border-radius: 12px; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', sans-serif;
  }

  @media (max-width: 768px) {
    .marskeys-intro {
     margin : 2rem;
     padding: 0rem 1.5rem;
    }
  }
 


  .hologram-border {
    position: relative;
    border: 4px solid transparent; /* 기존 border 제거 */
    border-radius: 0px;
    z-index: 0;
  }
  
  .hologram-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0px;
    padding: 1px;
    margin: 1px;
    background: linear-gradient(
      115deg,
      #ff00cc,
      #3333ff,
      #00ffff,
      #00ff00,
      #ffff00,
      #ff0000,
      #ff00cc
    );
    background-size: 400%;
    animation: hologram-move 6s linear infinite;
    z-index: -1;
  
    /* 보더처럼 보이도록 마스킹 */
    mask: 
      linear-gradient(#fff 0 0) content-box, 
      linear-gradient(#fff 0 0);
    -webkit-mask:
      linear-gradient(#fff 0 0) content-box, 
      linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
  }

  
  @keyframes hologram-move {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }


  .marskeys-intro {
    position: relative;
    background: rgb(0, 0, 0, 0.8); /* 🔥 진짜 박스 배경 */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', sans-serif;
    padding: 1.5rem;
    text-align: center;
  }
  
  .marskeys-intro h1, 
  .marskeys-intro p, 
  .marskeys-intro .holo-text {
    background: linear-gradient(115deg, #ff00cc, #3333ff, #00ffff, #00ff00, #ffff00, #ff0000, #ff00cc);
    background-size: 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hologram-text 10s linear infinite;
  }

  @keyframes hologram-text {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }

  #orbit-balls {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
  }
  
  .orbit-ball {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--glow-color);
    box-shadow:
      0 0 6px var(--glow-color),
      0 0 12px var(--glow-color),
      0 0 16px rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: transform 0.1s linear;
    mix-blend-mode: screen;
    z-index: 999;
  }
  
  .orbit-ball::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--glow-color);
    filter: blur(4px);
    opacity: 0.15;
    pointer-events: none;
    animation: trail 1.3s ease-out infinite;
  }
  
  @keyframes trail {
    0% {
      opacity: 0.25;
      transform: scale(1, 1);
    }
    100% {
      opacity: 0;
      transform: scale(10.5, 0.3); /* ← 가늘게! */
    }
  }
  
  .soundcloud-box iframe {
    display: block;
    margin: -2rem 0;
    padding:0;
    border: none;
    line-height: 0;
  }

  .soundcloud-box {
    padding: 0;
    margin: 0.8rem -0.1rem;
  }

  .orbit-ball::before,
.orbit-ball::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 2px;
  background: var(--glow-color);
  transform: translate(-50%, -50%);
  filter: blur(6px);
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

.orbit-ball::after {
  width: 2px;
  height: 60px;
}



@media (max-width: 767px) {
  .grid-item.large {
    grid-column: 1 / -1 !important;
    grid-row: span 6 !important;
    height: auto !important;
  }
}

.about-me {
  transition: transform 0.5s ease;
  transform: scale(1);
  position: relative;
}

.about-me:hover {
  transform: scale(1.2);
}

/* 모바일 (터치 디바이스)에서는 hover 비활성화 */
@media (hover: none) and (pointer: coarse) {
  .about-me:hover {
    transform: none;
  }
}

/* 커진 박스는 호버 무시 */
.grid-item.large:hover {
  transform: none;
}

/* 📌 이미지 숨기기 */
.about-image.hidden {
  display: none !important;
  width: 100%;
  margin-top: 5px;
}

.about-image {
padding: 0 20px;
  width: 80%;   /* ← 너비 조절 */
  height: auto;
  display: block;
  margin: 0 auto; /* 가운데 정렬 */
}

@media (max-width: 767px) {
  .about-image {
    padding: 0 10px;
      width: 100%;   /* ← 너비 조절 */
    }
  }


.about-text.hidden {
  display: none !important;
}

.grid-item.large {
  background-color: rgba(10, 20, 60, 0.8); /* 짙은 남색 + 80% 불투명 */
}

.about-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.site-footer {
  background: rgba(14, 2, 105, 0.8);
  padding: 1.5rem 1rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(12, 2, 2, 0.1);
  color: #d1d1d1;
}

.site-footer .footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.footer-links a:hover {
  color: #ffccff; /* 💫 은은한 네온 계열 */
}


.nav-icon {
  text-decoration: none;
  font-weight: 1000;
}

.tooltip {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.tooltip-text {
  visibility: hidden;
  width: max-content;
  background-color: black;
  color: #fff;
  text-align: center;
  padding: 4px 8px;
  border-radius: 6px;
  position: absolute;
  z-index: 10;
  bottom: 130%; /* 상단에 위치 */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  font-size: 12px;
}

@media (hover: hover) and (pointer: fine) {
  .tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
  }
}