/* ============================================
  오늘의 운세 - daily.css
  daily_fortune_engine.py v3.0-safe 대응
  ============================================ */

.daily-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, sans-serif;
  color: #2d2d2d;
  line-height: 1.6;
}

.daily-header {
  text-align: center;
  padding: 24px 0 16px;
}
.daily-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #1a1a1a;
}
.daily-date {
  font-size: 14px;
  color: #888;
  margin: 0;
}

.daily-form {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}
.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 4px;
}
.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  background: #fafafa;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #6c5ce7;
  background: #fff;
}
.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(108,92,231,0.4);
}
.btn-submit:active {
  transform: translateY(0);
}

.error-box {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #c53030;
}

.result-header {
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.grade-great {
  background: linear-gradient(135deg, #f6d365, #fda085);
}
.grade-good {
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
  color: #2d3748;
}
.grade-normal {
  background: linear-gradient(135deg, #d4fc79, #96e6a1);
  color: #2d3748;
}
.grade-caution {
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}

.iljin-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}
.iljin-hangul {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 4px;
}
.iljin-hanja {
  font-size: 16px;
  opacity: 0.7;
  margin-top: 2px;
}
.iljin-label {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.score-circle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
  margin: 12px auto;
}
.score-number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.score-label {
  font-size: 12px;
  opacity: 0.8;
}

.grade-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.3);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.result-summary {
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  opacity: 0.95;
}

.free-section {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.free-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: #4a4a4a;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.info-row {
  display: flex;
  gap: 10px;
}
.info-card {
  flex: 1;
  text-align: center;
  background: #f8f7ff;
  border-radius: 12px;
  padding: 14px 8px;
}
.info-label {
  display: block;
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
}
.info-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #6c5ce7;
}

.oheng-bar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.oheng-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.oheng-name {
  width: 50px;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
}
.oheng-bar-track {
  flex: 1;
  height: 14px;
  background: #f0f0f0;
  border-radius: 7px;
  overflow: hidden;
}
.oheng-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.6s ease;
}
.oheng-pct {
  width: 36px;
  font-size: 12px;
  color: #888;
  text-align: right;
  flex-shrink: 0;
}

.character-section {
  display: flex;
  gap: 12px;
}
.character-card {
  flex: 1;
  text-align: center;
  padding: 16px 12px;
  border-radius: 14px;
}
.character-card.villain {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
}
.character-card.helper {
  background: linear-gradient(135deg, #0abde3, #48dbfb);
  color: #fff;
}
.character-icon {
  display: block;
  font-size: 28px;
  margin-bottom: 6px;
}
.character-label {
  display: block;
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 2px;
}
.character-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.action-item {
  padding: 10px 14px;
  background: #f8f7ff;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #3d3d3d;
  border-left: 3px solid #6c5ce7;
}

.lucky-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lucky-chip {
  padding: 8px 14px;
  background: #fff8e1;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #f39c12;
  border: 1px solid #ffeaa7;
}

.paid-section {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}
.paid-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: #4a4a4a;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.blur-overlay.locked {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.paid-block {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f5f5f5;
}
.paid-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.paid-icon {
  font-size: 20px;
  margin-right: 6px;
  vertical-align: middle;
}
.paid-block h4 {
  display: inline;
  font-size: 15px;
  font-weight: 700;
  color: #2d2d2d;
}
.paid-block p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: #555;
}

.golden-chart {
  margin-top: 10px;
}
.golden-chart h4 {
  display: block;
  margin-bottom: 12px;
}
.golden-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.golden-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.golden-label {
  width: 56px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-align: right;
  flex-shrink: 0;
}
.golden-bar-track {
  flex: 1;
  height: 12px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
}
.golden-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}
.golden-score {
  width: 28px;
  font-size: 11px;
  color: #888;
  text-align: right;
  flex-shrink: 0;
}

.paywall-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  width: 85%;
}
.paywall-title {
  font-size: 18px;
  font-weight: 800;
  color: #2d2d2d;
  margin: 0 0 6px;
}
.paywall-desc {
  font-size: 13px;
  color: #777;
  margin: 0 0 16px;
}
.paywall-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-pay {
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-pay:hover {
  transform: translateY(-1px);
}
.btn-monthly {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  box-shadow: 0 3px 12px rgba(108,92,231,0.35);
}
.btn-once {
  background: #fff;
  color: #6c5ce7;
  border: 2px solid #6c5ce7;
}

.preview-section .preview-cards {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.preview-card {
  min-width: 100px;
  flex-shrink: 0;
  text-align: center;
  padding: 14px 10px;
  border-radius: 14px;
  background: #f8f7ff;
}
.preview-card.grade-great {
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
}
.preview-card.grade-good {
  background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
}
.preview-card.grade-normal {
  background: linear-gradient(135deg, #f0fff4, #c6f6d5);
}
.preview-card.grade-caution {
  background: linear-gradient(135deg, #faf5ff, #e9d8fd);
}
.preview-date {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.preview-ganji {
  display: block;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #2d2d2d;
}

.preview-score-bar {
  height: 6px;
  background: #e8e8e8;
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0;
}
.preview-score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.preview-score {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #555;
}
.preview-grade {
  display: block;
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.cta-section {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 20px;
}
.btn-retry,
.btn-home {
  flex: 1;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s;
}
.btn-retry:hover,
.btn-home:hover {
  transform: translateY(-1px);
}
.btn-retry {
  background: #6c5ce7;
  color: #fff;
}
.btn-home {
  background: #f0f0f0;
  color: #555;
}

@media (max-width: 400px) {
  .daily-container {
    padding: 12px 10px 30px;
  }
  .form-row {
    flex-direction: column;
    gap: 8px;
  }
  .info-row {
    flex-direction: column;
    gap: 8px;
  }
  .character-section {
    flex-direction: column;
  }
  .preview-card {
    min-width: 85px;
  }
  .score-circle {
    width: 68px;
    height: 68px;
  }
  .score-number {
    font-size: 24px;
  }
  .iljin-hangul {
    font-size: 30px;
  }
}

/* --- 텍스트 입력창 Overflow 방지 패치 (2026-04-04) --- */
.daily-form .form-group {
    min-width: 0 !important;
    flex: 1 1 0% !important;
}
.daily-form .form-group input {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* --- 카카오톡 공유 버튼 (2026-04-04) --- */
.btn-kakao {
    display: block;
    width: 100%;
    background-color: #FEE500;
    color: #000000;
    font-size: 16px;
    font-weight: 600;
    padding: 14px;
    border: none;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background-color 0.2s ease;
}
.btn-kakao:hover {
    background-color: #F4DC00;
}
