/*
Theme Name: Cocoon Child
Template: cocoon-master
*/

/* ==============================================
   색상 변수
   ============================================== */
:root {
  --bg:         #030d1a;
  --surface:    rgba(6, 22, 50, 0.55);
  --border:     rgba(80, 160, 255, 0.18);
  --sky:        #5ab0ff;
  --glow:       #3a8fff;
  --star:       #e8f4ff;
  --gold:       #ffd97d;
  --text:       #cce4ff;
  --muted:      rgba(160, 200, 255, 0.5);
  --radius:     18px;
  --transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ==============================================
   기본 배경 / 텍스트
   ============================================== */
body {
  background: var(--bg) !important;
  color: var(--text) !important;
  cursor: none;
}

/* ==============================================
   우주 배경 캔버스
   ============================================== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ==============================================
   커스텀 커서
   ============================================== */
#cursor {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  box-shadow: 0 0 12px 4px rgba(90, 176, 255, 0.9);
}

#cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(90, 176, 255, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

/* 모바일에서는 커서 숨기기 */
@media (hover: none) {
  body { cursor: auto; }
  #cursor, #cursor-ring { display: none; }
}

/* ==============================================
   카드 글로우 / 틸트 공통
   ============================================== */
.tilt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  transition: all var(--transition);
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card:hover {
  border-color: rgba(90, 176, 255, 0.4);
  box-shadow: 0 8px 40px rgba(26, 74, 138, 0.5),
              0 0 0 1px rgba(90, 176, 255, 0.15) inset;
}

/* ==============================================
   스크롤 진입 애니메이션
   ============================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 움직임 줄이기 설정을 존중 */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==============================================
   링크 / 제목 색상
   ============================================== */
a {
  color: var(--sky);
  transition: color var(--transition);
}

a:hover {
  color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  color: #fff;
}

/* ==============================================
   콘텐츠 영역 z-index (캔버스 위에 표시)
   ============================================== */
#container,
.site-header,
.site-footer,
#contents {
  position: relative;
  z-index: 1;
}

/* ==============================================
   헤더 글로우 효과
   ============================================== */
.site-header {
  background: rgba(3, 13, 26, 0.7) !important;
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(26, 74, 138, 0.2);
}

/* ==============================================
   푸터 배경 투명화
   ============================================== */
.site-footer,
#footer {
  background: rgba(3, 13, 26, 0.8) !important;
  border-top: 1px solid var(--border);
  color: var(--muted) !important;
}

.site-footer a,
#footer a {
  color: var(--sky) !important;
}

/* ==============================================
   위젯 배경 투명화
   ============================================== */
.widget,
.sidebar-widget,
.widget-area .widget {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  backdrop-filter: blur(14px);
  color: var(--text) !important;
}

/* 위젯 제목 */
.widget-title,
.widgettitle {
  color: #fff !important;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

/* 사이드바 전체 배경 제거 */
#sidebar,
.sidebar {
  background: transparent !important;
}

/* 콘텐츠 영역 배경 제거 */
#contents,
#main,
.main {
  background: transparent !important;
}

/* 포스트/카드 배경 + 여백 */
.card-wrap,
article,
.entry-card,
.related-entry-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  backdrop-filter: blur(14px);
  padding: 20px !important;
  margin-bottom: 20px !important;
}

/* 위젯 내부 여백 */
.widget,
.sidebar-widget,
.widget-area .widget {
  padding: 20px !important;
  margin-bottom: 16px !important;
}

/* 포스트 본문 배경 */
.entry-content,
.article-body {
  background: transparent !important;
  padding: 8px 4px !important;
}

/* ==============================================
   히어로 섹션
   ============================================== */
.hero-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  background: rgba(26, 74, 138, 0.15);
  animation: fadeUp 1s ease both;
}

.hero-title {
  font-size: clamp(2.4rem, 8vw, 5.5rem) !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  background: linear-gradient(160deg, #ffffff 30%, var(--sky) 70%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 1s 0.15s ease both;
  margin: 0 !important;
  color: transparent !important;
}

.hero-sub {
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--muted);
  letter-spacing: 0.06em;
  animation: fadeUp 1s 0.3s ease both;
  margin: 0;
}

/* 스크롤 유도 버튼 */
.hero-scroll-btn {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--sky) !important;
  text-decoration: none;
  animation: fadeUp 1s 0.45s ease both, bounce 2s 1.5s ease-in-out infinite;
  transition: background var(--transition), border-color var(--transition);
}

.hero-scroll-btn:hover {
  background: rgba(90, 176, 255, 0.1);
  border-color: var(--sky);
  color: #fff !important;
}

.scroll-arrow {
  font-size: 1.2rem;
  line-height: 1;
}

/* 페이지 콘텐츠 영역 */
.page-content-wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

/* 애니메이션 키프레임 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ==============================================
   페이지네이션 버튼
   ============================================== */
.page-numbers,
.page-numbers.current,
.page-numbers.page-prev-next {
  background: rgba(6, 22, 50, 0.6) !important;
  color: var(--sky) !important;
  border: 1px solid rgba(80, 160, 255, 0.25) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  transition: all var(--transition);
}

.page-numbers.current {
  background: rgba(26, 74, 138, 0.5) !important;
  color: #fff !important;
  border-color: rgba(90, 176, 255, 0.5) !important;
}

.page-numbers:hover {
  background: rgba(26, 74, 138, 0.4) !important;
  border-color: var(--sky) !important;
  color: #fff !important;
}

/* ==============================================
   검색창
   ============================================== */
.search-edit,
input[type="search"],
input[type="text"],
input[type="email"] {
  background: rgba(6, 22, 50, 0.6) !important;
  color: var(--text) !important;
  border: 1px solid rgba(80, 160, 255, 0.25) !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  outline: none !important;
  transition: border-color var(--transition);
}

.search-edit:focus,
input[type="search"]:focus {
  border-color: var(--sky) !important;
  box-shadow: 0 0 0 2px rgba(90, 176, 255, 0.15) !important;
}

.search-edit::placeholder {
  color: var(--muted) !important;
}

/* ==============================================
   히어로 섹션 — 첫 화면을 꽉 채워서 위젯이 안 보이게
   ============================================== */
.hero-section {
  min-height: 100vh;
  min-height: 100dvh; /* 모바일 주소창 대응 */
}

/* 히어로 바로 다음 콘텐츠는 스크롤해야 보이도록 */
#page-content,
.page-content-wrap {
  margin-top: 0;
  padding-top: 60px;
}

/* ==============================================
   cat14 / .list-image 가로 배열 (만화/일러스트 목록)
   3컬럼 고정, 요소 간 여백 포함
   ============================================== */

.list-image {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px;
}

.list-image > * {
  width: calc(33.33% - 8px);
  box-sizing: border-box;
  flex-shrink: 0;
}

/* 콘텐츠 영역(제목 등) 숨기기 */
.list-image .new-entry-card-content {
  display: none;
}

/* 썸네일 전체 채우기 */
.list-image .new-entry-card-thumb {
  width: 100%;
  margin: 0;
}

/* 태블릿: 2컬럼 */
@media (max-width: 768px) {
  .list-image > * {
    width: calc(50% - 6px);
  }
}

/* 모바일: 1컬럼 */
@media (max-width: 480px) {
  .list-image > * {
    width: 100%;
  }
}
