/**
 * style-chat.css - ฉบับปรับปรุงสมบูรณ์ (Premium High Contrast & Readability)
 * แก้ไขปัญหา: ตัวหนังสือเล็กในฟอร์ม และ หัวข้อเนื้อหาไม่โดดเด่น
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:wght@400;700&family=Sarabun:wght@200;300;400;500;600&display=swap');

:root {
    --thai-gold: #D4AF37;
    --gold-light: #F9E498;
    --bg-dark: #050505;
    --text-white: #ffffff;
    --text-dim: #d1d1d1;
    --line-height-body: 1.9;
}

/* 1. Global Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Sarabun', sans-serif;
    line-height: var(--line-height-body);
    -webkit-font-smoothing: antialiased;
}

.article-wrapper {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 2. สไตล์ส่วนฟอร์มกรอกข้อมูล (หน้าแรก) */
/* แก้ไข: ขยายชื่อบนช่องกรอก (Label) ให้ใหญ่และชัดเจน */
#inputForm label {
    color: var(--thai-gold) !important;
    font-size: 1.25rem !important; /* ใหญ่ขึ้นอย่างชัดเจน */
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: block;
}

/* ปรับปรุงความชัดเจนของช่อง Input และ Select */
.input-field {
    font-size: 1.2rem !important;
    background-color: #000 !important;
    border: 1.5px solid rgba(212, 175, 55, 0.3) !important;
    color: #fff !important;
    padding: 1.25rem !important;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* 3. ส่วนหัวบทความผลลัพธ์ */
.article-header {
    padding: 6rem 0 4rem;
    text-align: center;
}

.chapter-meta {
    display: block;
    color: var(--thai-gold);
    font-size: 1.3rem; /* ขยายขนาดคำว่า บันทึกคำทำนาย... */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1.5rem;
}

.article-header h1 {
    font-family: 'Noto Serif Thai', serif;
    font-size: clamp(2.5rem, 10vw, 4.2rem);
    font-weight: 700;
    color: var(--thai-gold);
    margin-bottom: 2.5rem;
}

/* ส่วนข้อมูล Metadata (อายุย่าง, ตกที่นั่งหลัก) */
.meta-info-container {
    display: flex;
    justify-content: center;
    gap: 5rem;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item-label {
    display: block;
    color: var(--thai-gold);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    letter-spacing: 0.1em;
}

.meta-item-value {
    font-family: 'Noto Serif Thai', serif;
    font-size: 1.9rem; /* ขยายขนาดผลลัพธ์ */
    color: #fff;
    font-weight: 400;
}

/* 4. สไตล์หัวข้อวาระและช่วงเวลา */
.chapter-vanc-label {
    display: inline-block;
    color: var(--thai-gold);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.4rem 1.5rem;
}

.chapter-title {
    font-family: 'Noto Serif Thai', serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.period-description {
    font-family: 'Noto Serif Thai', serif;
    font-size: 1.4rem; /* ขยายขนาดช่วงเวลาเดือน */
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
}

/* 5. ส่วนบทกลอน */
.poem-section {
    font-family: 'Noto Serif Thai', serif;
    font-size: 1.55rem;
    line-height: 2.4;
    color: var(--gold-light);
    text-align: center;
    font-style: italic;
    padding: 3.5rem 2.5rem;
    margin: 4rem 0;
    background: linear-gradient(to bottom, rgba(212, 175, 55, 0.06), transparent);
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    white-space: pre-line;
}

/* 6. ส่วนวิเคราะห์พยากรณ์ (หัวข้อเนื้อหาหลัก) */
/* แก้ไข: ยกฐานะเป็นหัวข้อที่ดูสำคัญและเป็นสัดส่วน */
.content-label {
    font-family: 'Noto Serif Thai', serif;
    font-size: 1.8rem;           /* ขนาดใหญ่เด่นชัด */
    font-weight: 700;
    color: var(--thai-gold);     /* สีทองสว่าง */
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* เส้นนำสายตาด้านหน้าหัวข้อ */
.content-label::before {
    content: "";
    width: 5px;
    height: 30px;
    background-color: var(--thai-gold);
    display: inline-block;
    border-radius: 2px;
}

.article-content p {
    font-size: 1.4rem; /* ขนาดตัวหนังสือเนื้อหาอ่านง่าย */
    color: var(--text-dim);
    text-align: justify;
    text-justify: inter-word;
    line-height: 2.1;
    font-weight: 300;
}

/* 7. ส่วนเสริมความสวยงาม */
.separator {
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--thai-gold), transparent);
    margin: 7rem auto;
    opacity: 0.3;
}

.hidden { display: none !important; }

/* ปุ่มตรวจสอบใหม่ */
.btn-retry {
    display: inline-block;
    padding: 1.25rem 3.5rem;
    background: transparent;
    border: 1px solid var(--thai-gold);
    color: var(--thai-gold);
    text-decoration: none;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.4s ease;
    cursor: pointer;
    font-family: 'Sarabun', sans-serif;
    font-weight: 500;
}

.btn-retry:hover {
    background: var(--thai-gold);
    color: #000;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

/* อนิเมชั่น */
.animate-fade-in {
    animation: fadeIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 8. Mobile Responsive */
@media (max-width: 768px) {
    .meta-info-container { gap: 2rem; flex-direction: column; }
    .article-header h1 { font-size: 2.8rem; }
    .chapter-title { font-size: 2rem; }
    .period-description { font-size: 1.2rem; }
    .content-label { font-size: 1.5rem; }
    .article-content p { font-size: 1.25rem; text-align: left; }
}