@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;700;900&display=swap');

:root {
  /* Mystical Premium Dark Theme (Inspired by Pro Fortune Apps) */
  --bg-color: #0b0c11;
  --card-bg: #151722;
  --primary-color: #e5c07b; /* Elegant Gold */
  --primary-hover: #f1d596;
  --secondary-color: #25283b;
  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  
  --border-radius: 20px;
  --transition-speed: 0.3s;
  
  /* Saju element colors - Optimized for Dark Mode */
  --wood-color: #34d399; /* 목(木): 네온 그린 */
  --fire-color: #fb7185; /* 화(火): 소프트 레드 */
  --earth-color: #fbbf24; /* 토(土): 따뜻한 옐로우 */
  --metal-color: #f8fafc; /* 금(金): 퓨어 화이트 */
  --water-color: #38bdf8; /* 수(水): 스카이 블루 */
}

html {
    scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    line-height: 1.3;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Header & Nav */
header {
  background-color: #1a1a1a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.8rem 0 !important;
  transition: all 0.3s ease;
}

/* Slim logo styles */
.logo img {
    width: 32px !important;
    height: 32px !important;
}

.logo h1 {
    font-size: 1.4rem !important;
    margin: 0 !important;
}

/* Blog Post Image Effects */
.post-header img {
    mask-image: none !important;
    -webkit-mask-image: none !important;
    mask: none !important;
    opacity: 1 !important;
    width: 100%;
    max-width: 800px;
    max-height: 400px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    margin: 0 auto;
    transition: transform 0.5s ease;
}

.post-header img:hover {
    transform: scale(1.02);
}

.post-header {
    text-align: center;
    margin-bottom: 2rem !important;
}

.header-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo a {
  color: var(--primary-color);
  text-decoration: none;
}

header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-speed);
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at top center, #231f3c 0%, var(--bg-color) 70%);
    text-align: center;
    padding: 6rem 1rem 4rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    color: var(--text-main);
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b8934e 100%) !important;
    color: #111 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    padding: 1rem 2.5rem !important;
    border-radius: 50px !important;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 10px 25px -5px rgba(229, 192, 123, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(229, 192, 123, 0.4);
}

/* Container & Cards */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Pro Form Design (Inspired by Forceteller Pro) */
.pro-form-card {
    background: #1a1c29;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 850px; /* Expanded for wide layout */
    margin: 0 auto;
}

.pro-input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pro-input-row.full-width {
    width: 100%;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

@media (max-width: 768px) {
    .pro-input-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.pro-form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pro-form-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.pro-form-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.pro-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pro-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.pro-input-group label {
    font-size: 1.05rem;
    color: var(--text-main);
    font-weight: 600;
    margin: 0;
}

.pro-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Custom Input Fields */
.pro-input-field,
.pro-input-wrapper input {
    background: #0f111a;
    border: 1px solid #2d3047;
    border-radius: 12px;
    padding: 1.2rem;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.pro-input-field:focus,
.pro-input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.1);
    outline: none;
}

.pro-input-field::placeholder,
.pro-input-wrapper input::placeholder {
    color: #4b5563;
}

/* Toggle Buttons (Gender & Calendar) */
.pro-gender-toggle,
.pro-calendar-toggle {
    display: flex;
    background: #0f111a;
    border-radius: 14px;
    padding: 0.4rem;
    border: 1px solid #2d3047;
}

.pro-gender-toggle input[type="radio"],
.pro-calendar-toggle input[type="radio"] {
    display: none;
}

.pro-toggle-label {
    flex: 1;
    text-align: center;
    padding: 1rem 0;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.pro-gender-toggle input[type="radio"]:checked + .pro-toggle-label,
.pro-calendar-toggle input[type="radio"]:checked + .pro-toggle-label {
    background: #25283b;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.disabled-label {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Date Inputs (Inline) */
.pro-date-inputs {
    display: flex;
    gap: 0.5rem; /* Narrower gap for horizontal balance */
}

.pro-input-wrapper {
    display: flex;
    align-items: center;
    background: #0f111a;
    border: 1px solid #2d3047;
    border-radius: 12px;
    padding-right: 0.8rem;
    flex: 1;
    transition: all 0.2s ease;
    overflow: hidden;
}

.pro-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.1);
}

.pro-input-wrapper input {
    border: none;
    background: transparent;
    padding: 1.2rem 0.5rem; /* Reduced horizontal padding */
    box-shadow: none;
    text-align: center;
    width: 100%;
}

.pro-input-wrapper input:focus {
    box-shadow: none;
}

.pro-input-wrapper span {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

#birth-year { flex: 1.8; } /* Give YYYY slightly more space internally */

/* Time Input & Unknown Checkbox */
.pro-time-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    height: 100%; /* Ensure same height as date inputs */
}

.pro-time-input-wrapper input[type="time"] {
    flex: 1.5;
    background: #0f111a;
    border: 1px solid #2d3047;
    border-radius: 12px;
    padding: 1.2rem 0.8rem;
    color: #fff;
    font-size: 1.1rem;
    color-scheme: dark;
    height: 100%;
    box-sizing: border-box;
}

.pro-checkbox-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #0f111a;
    border: 1px solid #2d3047;
    border-radius: 12px;
    padding: 1rem 0.5rem;
    cursor: pointer;
    height: 100%;
    box-sizing: border-box;
}

.pro-checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.pro-checkbox-wrapper label {
    margin: 0;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
}

/* Submit Button */
.pro-submit-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 1.4rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #b8934e 100%);
    color: #111;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 25px -5px rgba(229, 192, 123, 0.3);
}

.pro-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(229, 192, 123, 0.4);
}

/* Hide old forms styles from body */
.form-layout { display: none; }

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
  flex: 1;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

input[type="date"],
input[type="time"],
input[type="number"],
select {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid var(--secondary-color);
  border-radius: 12px;
  font-size: 1.1rem;
  color: var(--text-main);
  box-sizing: border-box;
  background-color: rgba(0,0,0,0.2);
  font-family: inherit;
  transition: all 0.3s;
}

input::placeholder {
    color: #4b5563;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
}

/* Chrome, Safari, Edge, Opera - Remove arrows */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox - Remove arrows */
input[type=number] {
  -moz-appearance: textfield;
}

.birth-date-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.birth-date-container input {
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#birth-year { flex: 2; }
#birth-month { flex: 1; }
#birth-day { flex: 1; }

.date-sep {
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: rgba(229, 192, 123, 0.05);
  box-shadow: 0 0 0 4px rgba(229, 192, 123, 0.1);
}

.btn-primary {
  display: inline-block;
  padding: 1.2rem 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #b8934e 100%);
  color: #111;
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed);
  text-align: center;
}

.full-width {
    width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229, 192, 123, 0.2);
}

/* Saju Grid (Premium Look) */
.saju-grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  flex: 1;
  max-width: 110px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
  position: relative;
}

/* highlight Day Pillar */
.day-pillar {
  border: 1px solid var(--primary-color);
  background: linear-gradient(180deg, rgba(229, 192, 123, 0.1) 0%, rgba(229, 192, 123, 0.02) 100%);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3), inset 0 2px 10px rgba(229, 192, 123, 0.1);
}

.pillar-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-weight: 500;
  text-align: center;
}

.day-pillar .pillar-label {
    color: var(--primary-color);
}

.pillar-char {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.3rem;
  font-family: 'Noto Serif KR', serif; /* Traditional elegant font for Hanja */
}

.stem {
  /* 천간 */
}

.branch {
  /* 지지 */
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.8rem;
  margin-top: 0.2rem;
}

.ten-god {
    font-size: 0.85rem;
    color: var(--primary-hover);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.zhi-ten-god {
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
}

.hidden-stems {
    font-size: 0.75rem;
    color: #94a3b8;
    letter-spacing: 2px;
    margin-top: 0.3rem;
    font-family: 'Noto Serif KR', serif;
}

.di-shi {
    font-size: 0.8rem;
    color: var(--primary-color);
    background-color: rgba(229, 192, 123, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Detailed Analysis */
.saju-details {
  margin-top: 2rem;
  background-color: rgba(0,0,0,0.2);
  padding: 1.5rem;
  border-radius: 16px;
  border-left: 4px solid var(--primary-color);
}

.saju-details h3 {
    margin-top: 0;
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.advanced-details {
    background-color: transparent;
    border-left: none;
    padding: 0;
    border-radius: 0;
}

.advanced-details > h3 {
    margin-top: 3rem;
    font-size: 1.6rem;
    color: var(--primary-color);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1rem;
}

.analysis-block {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.analysis-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--primary-color);
    opacity: 0.5;
}

.highlight-text {
    font-size: 1.4rem;
    color: var(--primary-hover);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
}

.summary-text {
    font-size: 1.1rem;
    color: var(--text-main);
}

.analysis-block p {
    color: rgba(255,255,255,0.8);
}

.analysis-block p strong {
    color: var(--text-main);
}

.advice-text {
    background-color: rgba(229, 192, 123, 0.05);
    padding: 1.2rem;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid rgba(229, 192, 123, 0.1);
    color: var(--primary-hover) !important;
}

.notice-text {
    font-size: 0.85rem;
    color: var(--text-muted) !important;
    margin-top: 1rem;
}

/* DaYun Table Styles */
.dayun-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.dayun-table th, .dayun-table td {
    border-right: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 1rem 0.5rem;
    text-align: center;
}

.dayun-table th {
    background-color: rgba(0,0,0,0.3);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.dayun-table td {
    font-size: 1.4rem;
    font-family: 'Noto Serif KR', serif;
    background-color: rgba(0,0,0,0.1);
}

.dayun-age {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.4rem;
    font-family: 'Pretendard', sans-serif;
}

.current-dayun {
    background-color: rgba(229, 192, 123, 0.1) !important;
    position: relative;
}

.current-dayun::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid var(--primary-color);
    pointer-events: none;
}

/* Custom Scrollbar for Dayun container */
.dayun-container::-webkit-scrollbar {
    height: 6px;
}
.dayun-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}
.dayun-container::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-article {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.03);
    transition: transform 0.2s;
}

.info-article:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.1);
}

.info-article h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.info-article p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* FAQ Section */
.guide-section h2 {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    margin: 0 0 0.8rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.faq-item p {
    margin: 0;
    color: rgba(255,255,255,0.7);
}

/* Policy Section */
.policy-content ul {
    padding-left: 1.5rem;
}

.policy-content li {
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.7);
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  background-color: #08090d;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.copyright {
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-speed);
}

.footer-links a:hover {
  color: var(--text-main);
}

/* --- SPA Tab Navigation --- */
.spa-tab-nav {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative;
    z-index: 10;
}
.spa-tab-nav::-webkit-scrollbar {
    display: none;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-speed);
}
.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}
.tab-btn.active {
    background: var(--primary-color);
    color: #111;
    box-shadow: 0 4px 10px rgba(229, 192, 123, 0.2);
}

/* --- Calendar Grid --- */
.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}
.calendar-cell {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 0.5rem;
    text-align: center;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s;
}
.calendar-cell:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}
.cal-solar-day {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}
.cal-ganzhi {
    font-size: 1.3rem;
    font-weight: 900;
    font-family: 'Noto Serif KR', serif;
    margin-bottom: 0.2rem;
}
.cal-lunar-day {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.cal-jieqi {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-top: 0.2rem;
    font-weight: 600;
}
.calendar-cell.empty {
    background: transparent;
    border: none;
}

@media (max-width: 600px) {
    .calendar-cell { padding: 0.5rem 0.2rem; min-height: 60px; }
    .cal-solar-day { font-size: 0.9rem; }
    .cal-ganzhi { font-size: 1rem; }
    .cal-lunar-day, .cal-jieqi { font-size: 0.65rem; }
    .birthday-grid { grid-template-columns: 1fr !important; }
}

/* --- Blog Card Layout --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(229, 192, 123, 0.3); /* Hover 시 메인 골드 색상 띄우기 */
}

.blog-card-img {
    height: 180px;
    width: 100%;
    /* 실제 이미지 썸네일이 있다면 background-image: url('...'); 적용 */
}

.blog-card-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-title {
    font-size: 1.3rem;
    color: var(--text-main);
    margin: 0 0 1rem 0;
    line-height: 1.4;
    font-weight: 700;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1; /* 글자수가 적어도 카드의 높이를 일정하게 유지 */
}

.blog-date {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 1rem;
}

/* Responsive Container Queries */
@media (max-width: 768px) {
  .form-row {
      flex-direction: column;
      gap: 1rem;
  }
  
  .saju-grid {
    gap: 0.5rem;
  }
  
  .pillar {
      padding: 1rem 0.5rem;
  }
  
  .pillar-char {
      font-size: 2.2rem;
  }
  
  .hero-content h2 {
      font-size: 2rem;
  }
  
  .nav-links {
      display: none;
  }
  
  .main-nav {
      justify-content: center;
  }

  /* 🌟 1. 생년월일 입력창 모바일 최적화 */
  .pro-date-inputs {
      gap: 0.3rem; /* 입력창 사이의 간격을 타이트하게 줄임 */
  }
  
  .pro-input-wrapper {
      padding-right: 0.4rem; /* '년/월/일' 텍스트 우측 여백 축소 */
  }
  
  .pro-input-wrapper input {
      padding: 0.9rem 0.2rem; /* 상하/좌우 패딩을 줄여 숫자가 들어갈 공간 확보 */
      font-size: 1rem; /* 글자 크기를 살짝 줄여 한눈에 들어오게 함 */
  }
  
  .pro-input-wrapper span {
      font-size: 0.8rem; /* '년,월,일' 텍스트 크기 축소 */
      margin-left: -0.2rem; /* 숫자와 텍스트 사이 간격 미세 조정 */
  }

  /* 🌟 2. 태어난 시간 및 '모름' 체크박스 모바일 최적화 */
  .pro-time-input-wrapper {
      gap: 0.3rem;
  }
  
  .pro-time-input-wrapper input[type="time"] {
      padding: 0.9rem 0.4rem;
      font-size: 0.95rem; /* iOS 시간 선택기 텍스트가 잘리지 않도록 조정 */
  }
  
  .pro-checkbox-wrapper {
      padding: 0.9rem 0.2rem;
  }
  
  .pro-checkbox-wrapper label {
      font-size: 0.9rem;
  }

  /* 🌟 1. 숨겨져 있던 스크롤바를 모바일에서만 얇고 고급스럽게 노출 */
  .spa-tab-nav {
      padding-bottom: 0.8rem; /* 하단에 스크롤바가 지나갈 여백 생성 */
      /* 파이어폭스용 얇은 스크롤바 설정 */
      scrollbar-width: thin; 
      scrollbar-color: rgba(229, 192, 123, 0.4) transparent; 
  }

  /* 사파리, 크롬, 아이폰용 스크롤바 부활 및 디자인 (Gold 테마 적용) */
  .spa-tab-nav::-webkit-scrollbar {
      display: block; /* 기존 display: none; 을 덮어쓰기하여 보이게 만듦 */
      height: 3px; /* 화면을 해치지 않는 아주 얇고 세련된 두께 */
  }
  
  .spa-tab-nav::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.05); /* 트랙(배경)은 아주 희미하게 */
      border-radius: 10px;
      margin: 0 1rem; /* 양끝에서 살짝 떨어지게 하여 디자인 완성도 업 */
  }
  
  .spa-tab-nav::-webkit-scrollbar-thumb {
      background: rgba(229, 192, 123, 0.6); /* 메인 테마 색상(골드)을 반투명하게 적용 */
      border-radius: 10px;
  }

  /* 🌟 2. 탭 버튼 여백 조정으로 '잘림 효과' 유도 */
  /* 버튼 좌우 여백을 살짝 줄여서 화면 끝에 걸치는 버튼이 더 확실하게 잘려 보이도록 만듭니다. */
  .tab-btn {
      padding: 0.6rem 1.1rem;
      font-size: 0.95rem;
  }
}

/* 🌟 탭 콘텐츠 부드러운 전환 애니메이션 (Fade & Slide Up) */
@keyframes tabFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px); /* 아래에서 15px 내려간 상태에서 시작 */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* 원래 위치로 안착 */
    }
}

/* 탭 화면(tab-pane)이 화면에 나타날 때마다 애니메이션 자동 실행 */
.tab-pane {
    animation: tabFadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    /* cubic-bezier를 사용하여 끝에 가서 부드럽게 감속하는 고급스러운 느낌 연출 */
}

/* 칼럼 페이지(post-n.html)의 본문 시작 위치 강제 조정 */
.blog-post {
    margin-top: 40px; /* main의 80px + blog-post(40px) = 총 120px 확보 */
    padding-top: 10px; /* 제목 위쪽 추가 여백 */
}

/* 헤더가 고정되어 있으므로 메인 컨테이너의 여백을 확실히 확보 */
main.container {
    margin-top: 80px !important; /* 표준 슬림 여백 */
}

/* 제목(h1) 크기를 대폭 축소 */
.post-header h1 {
    font-size: 1.6rem !important;
    line-height: 1.4 !important;
    margin: 0.8rem 0 !important;
    word-break: keep-all; /* 한글 단어 끊김 방지 */
}

/* 카테고리 텍스트 크기도 소폭 조정 */
.blog-category {
    font-size: 0.85rem !important;
}

@media (max-width: 768px) {
    header {
        padding: 0.6rem 0 !important;
    }
    .logo img {
        width: 28px !important;
        height: 28px !important;
    }
    .logo h1 {
        font-size: 1.2rem !important;
    }
    main.container {
        margin-top: 70px !important; /* 모바일 최적화 여백 */
    }
    .blog-post {
        margin-top: 30px; /* 모바일 추가 여백 조정 */
    }
    .post-header h1 {
        font-size: 1.4rem !important;
    }
}

/* 돌아가기 버튼 스타일 */
.back-button {
    transition: transform 0.2s ease, color 0.2s ease;
    font-size: 0.95rem;
}

.back-button:hover {
    transform: translateX(-5px); /* 왼쪽으로 살짝 움직임 */
    color: #fff; /* 호버 시 색상 변경 */
}