/* ======================================================= */
/*             커스텀 헤더(Custom Header) 스타일             */
/* ======================================================= */

.custom-header {
  /* 추천 3: 그라디언트 (현대적인 느낌) */
  background: linear-gradient(90deg, #343a40, #5c6268);
}

/* ===== 기본 정보 레이아웃 ===== */
.row-line, .row-line2 {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 5px 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-top: 0;
  margin-bottom: 10px;
}

.row-line {
  align-items: center;
}

.row-line2 {
  align-items: baseline;
  border: none;
  padding: 0 5px;
  margin-bottom: 4px;
}

.row-line2 .label {
  margin-right: 8px;
  flex-shrink: 0;
  font-weight: bold;
}

/* ===== 사주표 테이블 기본 스타일 ===== */
.saju-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  margin-bottom: 20px;
  table-layout: fixed;
}

.saju-table th,
.saju-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.saju-table th {
  background-color: #f1f1f1;
  font-weight: bold;
  font-size: 1.2rem;
}

/* 
  =======================================================
  ★★★★★ 요청 디자인 적용을 위한 핵심 스타일 ★★★★★
  =======================================================
*/

/* 1. 사주팔자 글자 박스 공통 스타일 */
.saju-char-box {
  display: block;
  width: 60px;
  height: 60px;
  line-height: 60px;
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  border-radius: 8px;
  margin: 5px auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 2. 오행별 색상 클래스 - get_ohang_class() 함수와 매칭 */
/* Wood (木): 초록색 배경 + 흰색 글자 */
.ohang-wood {
  background-color: #28a745; /* Green */
  color: white;
}

/* Fire (火): 빨간색 배경 + 흰색 글자 */
.ohang-fire {
  background-color: #dc3545; /* Red */
  color: white;
}

/* Earth (土): 노란색 배경 + 검은 글자 */
.ohang-earth {
  background-color: #ffc107; /* Yellow */
  color: black;
}

/* Metal (金): 흰색 배경 + 검은 글자 */
.ohang-metal {
  background-color: #f8f9fa; /* Off-white */
  color: black;
  border: 1px solid #dee2e6;
}

/* Water (水): 검은색 배경 + 흰색 글자 */
.ohang-water {
  background-color: #343a40; /* Dark Gray / Black */
  color: white;
}

/* 십신 글자 스타일 (굵은 파란색) */
.sipsin-box {
  font-size: 1.1rem;
  font-weight: bold;
  color: #0d6efd;
}

/* 12운성 스타일 (굵은 초록색) */
.unseong-box {
  font-size: 1.1rem;
  font-weight: bold;
  color: #198754;
}

/* 12운성, 신살, 지장간 등 나머지 텍스트 스타일 */
.sinsal-box, .jijanggan-box {
  font-size: 1rem;
  color: #333;
}

/* 말풍선(Tooltip) 스타일 */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip-wrapper .tooltip-content {
  visibility: hidden !important;
  opacity: 0;
  width: 300px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  margin-left: -150px;
  transition: opacity 0.3s;
}

.tooltip-wrapper .tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-content {
  visibility: visible !important;
  opacity: 1;
}

/* ======================================================= */
/*                      푸터(Footer) 스타일                  */
/* ======================================================= */

footer {
  background-color: #343a40;
  color: #f8f9fa;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
  font-size: 0.9rem;
}

.footer-content p {
  margin: 5px 0;
  color: #adb5bd;
}

.footer-content p:first-child {
  color: #f8f9fa;
  font-weight: bold;
}

/* 기존 saju-style.css 내용 (생략 없이 그대로 유지) */
/* ... BM님이 주신 기존 코드 유지 ... */

/* ================================ */
/* write.php 인라인 스타일 통합 시작 */
/* ================================ */

.write-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.write-form {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 1rem;
}

.form-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
}

.form-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.form-subtitle {
  opacity: 0.9;
  font-size: 0.95rem;
}

.form-body {
  padding: 1.8rem 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.form-row {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: slideUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-input {
  padding: 0.8rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
  transform: translateY(-1px);
}

.form-select {
  padding: 0.8rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  background: #f8f9fa;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.form-checkbox:hover {
  background: #e9ecef;
  border-color: #667eea;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.checkbox-label {
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
}

.date-time-group {
  display: flex;
  gap: 0.8rem;
  align-items: end;
}

.date-time-group .form-group {
  flex: 1;
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.btn {
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 130px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

@media (max-width: 768px) {
  .write-container {
    padding: 0 10px;
  }

  .form-body {
    padding: 1.2rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-header {
    padding: 1.2rem;
  }

  .form-title {
    font-size: 1.4rem;
  }

  .form-subtitle {
    font-size: 0.9rem;
  }

  .date-time-group {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-group {
    flex-direction: column;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
  }

  .btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
  }

  .form-input, .form-select {
    padding: 0.7rem 0.9rem;
  }

  .form-checkbox {
    padding: 0.7rem 0.9rem;
  }
}

/* ================================ */
/* write.php 인라인 스타일 통합 끝 */
/* ================================ */

.info-line {
    display: flex;
    flex-wrap: wrap;
    align-items: left;
    gap: 0px;        /* 항목 간 여백 제거 */
    padding: 1px 0;  /* 수직 여백 유지 */
}

.info-label {
    font-weight: bold;
    margin-right: 0px;  /* ':' 뒤 간격 최소화 */
    color: #333;
}

.info-value {
    margin-right: 24px; /* 항목 간 간격 (좌측) */
    color: #2e2c2c;
}


