/*
Theme Name: Star Tarot
Theme URI: https://mochadia.co.kr
Author: Bin / MOCHADIA
Description: AI 타로 리딩 - 소프트 보라 테마 (세라 리더, 텍스트박스 입력)
Version: 3.0.0
Text Domain: star-tarot
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&display=swap');

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Body / 배경 ─────────────────────────────────── */
body {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  background: linear-gradient(150deg, #f2e8ff 0%, #e0ccf8 25%, #cca8ee 55%, #b888e0 100%);
  overflow-x: hidden;
}

/* ── 구름 배경 (fixed) ───────────────────────────── */
#tarot-clouds {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── 앱 래퍼 ─────────────────────────────────────── */
#tarot-app {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════ */
.st-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
}

.st-logo {
  font-size: 15px;
  font-weight: 700;
  color: #3a1a70;
  letter-spacing: .12em;
  text-decoration: none;
}

.st-nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.st-nav-links a {
  font-size: 12.5px;
  color: #5a4080;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s;
}

.st-nav-links a:hover,
.st-nav-links a.active { color: #3a1a70; font-weight: 600; }

.st-nav-btns { display: flex; gap: 10px; align-items: center; }

.st-btn-login {
  background: transparent;
  border: none;
  color: #5a4080;
  font-size: 12.5px;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
}

.st-btn-join {
  background: #5a30b0;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 24px;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
  box-shadow: 0 4px 14px rgba(60, 20, 140, .3);
  transition: background .2s;
}

.st-btn-join:hover { background: #4820a0; }

/* ══════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════ */
.st-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 32px;
}

.st-chat-panel {
  padding: 48px 32px 40px 12px;
  border-right: 1px solid rgba(255, 255, 255, .4);
}

.st-reader-panel {
  padding: 40px 12px 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ── 제목 ─────────────────────────────────────────── */
.st-chat-title {
  font-size: 32px;
  font-weight: 700;
  color: #2c1660;
  line-height: 1.42;
  margin-bottom: 8px;
}

.st-chat-sub {
  font-size: 12.5px;
  color: #7054a0;
  margin-bottom: 4px;
  line-height: 1.7;
}

.st-chat-sub2 {
  font-size: 12.5px;
  color: #7054a0;
  margin-bottom: 22px;
  line-height: 1.7;
}

/* ── 메시지 영역 ──────────────────────────────────── */
.st-messages { margin-bottom: 18px; }

.st-msg {
  display: flex;
  gap: 10px;
  margin-bottom: 13px;
  align-items: flex-start;
}

.st-msg-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .8);
  flex-shrink: 0;
  background: linear-gradient(135deg, #e8d4ff, #c8a0e8);
}

.st-msg-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.st-bub {
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(255, 255, 255, .95);
  padding: 12px 16px;
  font-size: 12.5px;
  line-height: 1.82;
  color: #3a1a70;
  max-width: 340px;
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 4px 12px rgba(80, 20, 140, .08);
}

.st-ubub {
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .85);
  padding: 10px 15px;
  font-size: 12.5px;
  color: #3a1a70;
  max-width: 300px;
  line-height: 1.75;
  border-radius: 14px 4px 14px 14px;
}

/* ── 텍스트 상자 입력창 ───────────────────────────── */
.st-input-box {
  background: rgba(255, 255, 255, .7);
  border: 1.5px solid rgba(180, 140, 240, .6);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(100, 40, 180, .1);
  transition: border-color .2s, box-shadow .2s;
}

.st-input-box:focus-within {
  border-color: rgba(120, 60, 200, .7);
  box-shadow: 0 4px 24px rgba(100, 40, 180, .18);
}

.st-input-box textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #2c1660;
  font-size: 13.5px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 300;
  padding: 16px 18px 10px;
  outline: none;
  resize: none;
  height: 90px;
  line-height: 1.75;
  letter-spacing: .03em;
  display: block;
}

.st-input-box textarea::placeholder { color: #b090d0; }

.st-input-box-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
  border-top: 1px solid rgba(180, 140, 240, .2);
}

.st-char-count {
  font-size: 11px;
  color: #b090d0;
  letter-spacing: .04em;
}

.st-send-btn {
  background: #5a30b0;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Noto Sans KR', sans-serif;
  padding: 9px 22px;
  border-radius: 20px;
  cursor: pointer;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 14px rgba(60, 20, 140, .28);
}

.st-send-btn:hover { background: #4820a0; transform: translateY(-1px); }
.st-send-btn:active { transform: translateY(0); }
.st-send-btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ── 빠른 질문 버튼 ───────────────────────────────── */
.st-quick {
  margin-top: 12px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.st-qbtn {
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(180, 140, 240, .5);
  color: #5a3090;
  font-size: 10.5px;
  font-family: 'Noto Sans KR', sans-serif;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 14px;
  transition: all .2s;
}

.st-qbtn:hover { background: rgba(255, 255, 255, .8); color: #3a1a70; }

/* ── 관리자 알림 ──────────────────────────────────── */
.st-notice {
  background: rgba(255, 200, 60, .18);
  border: 1px solid rgba(255, 200, 60, .45);
  color: #3a1a70;
  padding: 12px 24px;
  text-align: center;
  font-size: 13px;
  margin: 0 32px 20px;
  border-radius: 12px;
}

.st-notice a { color: #5a30b0; font-weight: 600; }

/* ── 카드 일러스트 ────────────────────────────────── */
.st-cards-visual {
  position: relative;
  width: 210px;
  height: 220px;
  margin-bottom: 20px;
}

.st-card-a {
  position: absolute;
  right: 4px;
  top: 0;
  width: 122px;
  height: 196px;
  border-radius: 14px;
  border: 2.5px solid rgba(255, 255, 255, .9);
  box-shadow: 0 14px 40px rgba(100, 40, 180, .28);
  overflow: hidden;
  animation: float-a 4s ease-in-out infinite;
  background: linear-gradient(148deg, #f0e0ff, #d0b0f0);
}

.st-card-b {
  position: absolute;
  left: 4px;
  top: 22px;
  width: 122px;
  height: 196px;
  border-radius: 14px;
  border: 2.5px solid rgba(255, 255, 255, .95);
  box-shadow: 0 14px 40px rgba(100, 40, 180, .2);
  overflow: hidden;
  animation: float-b 3.6s ease-in-out infinite .5s;
  background: linear-gradient(148deg, #f8f0ff, #e0c8ff);
}

.st-card-a img, .st-card-b img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes float-a {
  0%, 100% { transform: rotate(8deg)  translateY(0); }
  50%       { transform: rotate(8deg)  translateY(-10px); }
}

@keyframes float-b {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50%       { transform: rotate(-6deg) translateY(-14px); }
}

/* ── 세라 아바타 ──────────────────────────────────── */
.st-sera-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .85);
  box-shadow: 0 8px 28px rgba(100, 40, 180, .2);
  margin-bottom: 16px;
  background: linear-gradient(135deg, #e8d4ff, #c8a0e8);
}

.st-sera-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.st-reader-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  color: #2c1660;
  letter-spacing: .18em;
  margin-bottom: 10px;
}

.st-reader-desc {
  font-size: 12px;
  line-height: 1.95;
  color: #6a4898;
  max-width: 220px;
}

/* ══════════════════════════════════════════════════
   아이콘 스트립
══════════════════════════════════════════════════ */
.st-strip {
  background: rgba(255, 255, 255, .75);
  border-top: 1px solid rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(220, 200, 255, .5);
  display: flex;
  padding: 18px 32px;
  position: relative;
  z-index: 2;
}

.st-ic {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
  transition: transform .2s;
  position: relative;
  text-decoration: none;
}

.st-ic:not(:last-child)::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 38%;
  color: #c0a8e0;
  font-size: 14px;
}

.st-ic:hover { transform: translateY(-3px); }

.st-icc {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f3ecff;
  border: 1.5px solid #d8c0f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background .2s;
}

.st-ic:hover .st-icc { background: #e8d4ff; }

.st-ic-lbl {
  font-size: 12px;
  color: #4a2888;
  letter-spacing: .04em;
}

/* ══════════════════════════════════════════════════
   카테고리 섹션
══════════════════════════════════════════════════ */
.st-section { padding: 34px 36px 26px; }

.st-sect-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c1660;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.st-sect-sub {
  font-size: 11px;
  color: #8060a8;
  letter-spacing: .1em;
  margin-bottom: 22px;
}

.st-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.st-cat {
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(255, 255, 255, .9);
  padding: 22px 18px;
  cursor: pointer;
  border-radius: 16px;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(80, 20, 140, .07);
  text-decoration: none;
  display: block;
}

.st-cat:hover {
  background: rgba(255, 255, 255, .85);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(80, 20, 140, .13);
}

.st-cat-ic { font-size: 28px; margin-bottom: 10px; display: block; }

.st-cat-nm {
  font-size: 16px;
  font-weight: 600;
  color: #2c1660;
  margin-bottom: 7px;
}

.st-cat-ds {
  font-size: 11.5px;
  color: #6a4898;
  line-height: 1.75;
}

.st-cat-lk {
  margin-top: 12px;
  font-size: 10px;
  color: #5a30b0;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

/* ══════════════════════════════════════════════════
   운세 스트립
══════════════════════════════════════════════════ */
.st-fortune {
  padding: 0 36px 48px;
  display: flex;
  gap: 13px;
}

.st-fc {
  flex: 1;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .85);
  padding: 20px 14px;
  cursor: pointer;
  border-radius: 16px;
  text-align: center;
  transition: all .25s;
  text-decoration: none;
  display: block;
}

.st-fc:hover {
  background: rgba(255, 255, 255, .82);
  transform: translateY(-2px);
}

.st-fc-per {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  color: #9070c0;
  letter-spacing: .22em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.st-fc-name {
  font-size: 14px;
  color: #2c1660;
  font-weight: 600;
  margin-bottom: 7px;
}

.st-fc-desc {
  font-size: 11px;
  color: #7054a0;
  line-height: 1.65;
}

/* ── AI 해석 결과 ──────────────────────────────────── */
.st-result {
  max-width: 700px;
  margin: 28px auto;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .9);
  padding: 36px 40px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(80, 20, 140, .14);
}

.st-result-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #2c1660;
  letter-spacing: .2em;
  text-align: center;
  margin-bottom: 14px;
}

.st-result-cards {
  text-align: center;
  font-size: 12.5px;
  color: #9070c0;
  letter-spacing: .12em;
  margin-bottom: 22px;
  font-style: italic;
}

.st-result-text {
  font-size: 14px;
  line-height: 2;
  color: #2c1660;
  white-space: pre-wrap;
}

/* ── 로딩 ──────────────────────────────────────────── */
.st-loading {
  text-align: center;
  padding: 36px;
  color: #7054a0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  letter-spacing: .15em;
}

.st-spinner {
  display: block;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(90, 48, 176, .2);
  border-top-color: #5a30b0;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── 커서 ───────────────────────────────────────────── */
@keyframes blink { 50% { opacity: 0; } }

.st-cursor {
  display: inline-block;
  width: 1.5px;
  height: 13px;
  background: #5a30b0;
  vertical-align: middle;
  animation: blink .7s steps(1) infinite;
  margin-left: 1px;
}

/* ── 유틸 ───────────────────────────────────────────── */
.hidden { display: none !important; }
.fade-in { animation: fadeIn .5s ease forwards; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 반응형 ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .st-hero { grid-template-columns: 1fr; padding: 0 20px; }
  .st-reader-panel { display: none; }
  .st-chat-panel { padding: 32px 16px 28px; border-right: none; }
  .st-chat-title { font-size: 26px; }
  .st-strip { padding: 16px 20px; }
  .st-section, .st-fortune { padding-left: 20px; padding-right: 20px; }
  .st-grid { grid-template-columns: 1fr 1fr; }
  .st-fortune { flex-wrap: wrap; padding-bottom: 32px; }
  .st-nav-links { display: none; }
  .st-nav { padding: 14px 20px; }
}
