/*
Theme Name: Cinemawords Dark Optimized
Theme URI: https://cinemawords.com
Description: GeneratePress Child Theme – Full Dark Mode, Homepage 최적화, Optimized CSS
Author: cinemawords
Template: generatepress
Version: 1.6.6
*/

/* ===============================
   CSS Variables
=============================== */
:root {
  --base: #1f1f1f;
  --base-2: #1f1f1f;
  --base-3: #1f1f1f;
  --contrast: #ffffff;
  --border: #2a2a2a;

  --bg-main: var(--base);
  --bg-card: var(--base-2);
  --text-main: #e8eaed;
  --text-sub: #9aa0a6;
  --accent: #8ab4f8;
  --hover-bg: #2a2a2a;
  --hover-text: #f5f5f5;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', 'Noto Sans KR', sans-serif;

  --text-home-hero: #d8d8d8;
  --text-newsroom: #d8d8d8;
  --text-glossary-hero: #d2d2d2;
  --text-glossary-p: #c7c7c7;
}

/* ===============================
   전체 구조 및 기본 설정
=============================== */
body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.75;
}
.page .entry-title { display: none; }

a, a * { 
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover, a:hover * { color: var(--hover-text); }

/* 선택 방지 */
body, html, .no-drag {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* ===============================
   헤딩 계층
=============================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 1.9rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; color: var(--text-main); }
h6 { font-size: 0.95rem; color: var(--text-sub); }

/* ===============================
   Home Hero Section
=============================== */
.home-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--text-home-hero);
  border-bottom: 1px solid var(--border);
  padding: 50px 20px;
}

.home-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--text-home-hero);
  margin-bottom: 10px;
  text-align: center;
}

.home-sub {
  font-size: 1.2rem;
  color: var(--text-sub);
  text-align: center;
}

/* ===============================
   Home Menu
=============================== */
.home-menu-wrapper {
  max-width: 1200px;
  margin: 20px auto 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  text-align: center;
}

.home-menu-btn {
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 25px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.home-menu-btn a { 
  color: var(--accent); 
  font-weight: 600; 
  font-size: 0.95rem; 
  text-decoration: none; 
  display: block; 
  text-align: center; 
}

.home-menu-btn:hover { background-color: var(--hover-bg); }
.home-menu-btn:hover a { color: var(--hover-text); }

/* ===============================
   cinemawords / Search / Section
=============================== */
.cinemawords-wrap {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--text-color);
  font-family: var(--font-sans);
}

.cinemawords-wrap .search-box {
  margin-bottom: 20px;
  text-align: center;
}

.cinemawords-wrap .search-box input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border-radius: 8px;
  background: var(--base-2);
  border: 1px solid rgba(138,180,248,0.25);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.cinemawords-wrap .search-box input:focus {
  outline: none;
  border-color: var(--accent);
  background: #1a1a1a; /* 기존보다 통일된 다크톤 */
}

/* 버튼 스타일 */
.cinemawords-wrap .search-box .search-btn {
  padding: 10px 18px;
  margin-left: 8px;
  border-radius: 8px;
  border: 1px solid rgba(138,180,248,0.25);
  background: var(--base-2);
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cinemawords-wrap .search-box .search-btn:hover {
  background: var(--accent);
  color: #0f172a;
}

.cinemawords-wrap .hero-box {
  background: var(--base-2);
  padding: 25px 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 25px;
  border: 1px solid rgba(138,180,248,0.25);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.cinemawords-wrap .hero-box h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 10px;
  text-shadow: 0 0 8px rgba(138,180,248,0.4); 
}

.cinemawords-wrap .hero-box p {
  color: var(--sub-text);
  line-height: 1.5;
}

.cinemawords-wrap .index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 25px;
}

.cinemawords-wrap .index-links a {
  padding: 8px 12px;
  background: var(--base-2);
  color: var(--text-color);
  border: 1px solid rgba(138,180,248,0.25);
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.cinemawords-wrap .index-links a:hover,
.cinemawords-wrap .index-links a:focus {
  background: var(--accent);
  color: #0f172a;
}

.cinemawords-wrap .section h3.gb-text {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 4px;
  color: var(--text-color);
}

.cinemawords-wrap .section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cinemawords-wrap .section ul li {
  flex: 1 1 180px;
  display: flex;
  justify-content: center;
}

.cinemawords-wrap .section ul li a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: var(--base-2);
  border: 1px solid rgba(138,180,248,0.4);
  border-radius: 8px;
  color: var(--text-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.cinemawords-wrap .section ul li a:hover {
  background: var(--accent);
  color: #0f172a;
  box-shadow: 0 0 12px rgba(138,180,248,0.4);
}

/* ===============================
   단일 글 내부 리스트 스타일
=============================== */
.single .entry-content ul,
.single .entry-content ol {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  counter-reset: item;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-main);
}

.single .entry-content ul > li,
.single .entry-content ol > li {
  position: relative;
  padding-left: 1.2em;
  margin: 0;
}

.single .entry-content ul > li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
}

.single .entry-content ol > li::before {
  content: counter(item) ". ";
  counter-increment: item;
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
}

/* ===============================
   table
=============================== */
table, th, td {
  border: 1px solid var(--text-sub);
}

/* ===============================
   Box
=============================== */
.tipbox,.highlight-box,.profile-box,.core-message,
.recommend-box,.recommendbox,.recommendmintbox,
.recommendpostbox,.recommendyellowbox,.postbox,
.note-box,blockquote {
  background-color: var(--bg-main);
  color: #e2e2e2;
  font-size: 17px;
  padding: 10px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid #2f2f2f;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);   
}

/* ===============================
   모바일 반응형
=============================== */
@media (max-width: 768px) {
  .home-hero { padding: 48px 20px; }

  .home-title { font-size: clamp(2rem, 6vw, 2.4rem); }
  .home-sub { font-size: clamp(1.1rem, 4vw, 1.3rem); }

  .home-menu-wrapper { flex-direction: column; gap: 12px; align-items: center; }
  .home-menu-btn { width: 95%; padding: 14px 20px; }

  .cinemawords-wrap .search-box {
    display: flex;
    flex-direction: column;
    align-items: center; /* 가운데 정렬 */
  }

  .cinemawords-wrap .search-box input {
    width: 100%;       /* 입력창은 전체 폭 */
    max-width: 100%;
    margin-bottom: 10px;
  }

  .cinemawords-wrap .search-box .search-btn {
    width: 70%;        /* 버튼은 살짝 줄여서 구분 */
    max-width: 300px;  /* 너무 커지지 않도록 제한 */
    margin: 0 auto;    /* 가운데 배치 */
  }

   code {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.95rem;
  }
}

/* ==========================
   Back to Top 버튼 스타일
========================== */
#cinemawords-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--contrast);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

#cinemawords-back-to-top:hover {
  background: var(--hover-bg);
  color: var(--hover-text);
}

#cinemawords-back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* 아이콘 보정 */
#cinemawords-back-to-top .cinemawords-btt-icon {
  display: inline-block;
  line-height: 1;
}

/* 반응형 (모바일) */
@media (max-width: 600px) {
  #cinemawords-back-to-top {
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}
