/* ================================================================
   Đặt Tên Con — Frontend CSS v2
================================================================ */
.dtc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1e293b;
    max-width: 860px;
    margin: 0 auto;
}

/* ── Form Header ────────────────────────────────────────────── */
.dtc-form-header { text-align: center; margin-bottom: 24px; }
.dtc-main-title  { font-size: 1.7rem; font-weight: 800; color: #FF0066; margin: 0 0 10px; line-height: 1.3; }
.dtc-title-emoji { margin-right: 6px; }
.dtc-stats-row   { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.dtc-stat        { display: flex; align-items: center; gap: 5px; font-size: .875rem; color: #64748b; }
.dtc-stat svg    { width: 15px; height: 15px; }
.dtc-stars       { color: #f59e0b; }

/* ── Form Card ──────────────────────────────────────────────── */
.dtc-form-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.dtc-step       { margin-bottom: 22px; }
.dtc-step-title { font-size: .95rem; font-weight: 700; color: #1e293b; margin: 0 0 12px; }
.dtc-label-small { display: block; font-size: .85rem; color: #475569; margin-bottom: 8px; }

/* ── Mode Tabs ──────────────────────────────────────────────── */
.dtc-mode-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.dtc-mode-tab  {
    border: 2px solid #e2e8f0; background: #f8fafc;
    border-radius: 10px; padding: 9px 16px;
    font-size: .85rem; font-weight: 600; cursor: pointer;
    transition: all .2s; color: #64748b;
}
.dtc-mode-tab:hover { border-color: #ff80aa; color: #FF0066; background: #fff0f5; }
.dtc-mode-tab.active { border-color: #FF0066; background: #FF0066; color: #fff; }

/* ── DOB Row ────────────────────────────────────────────────── */
.dtc-dob-row  { display: flex; gap: 8px; margin-bottom: 14px; }
.dtc-select   {
    flex: 1; border: 2px solid #e2e8f0; border-radius: 8px;
    padding: 10px 10px; font-size: .88rem; color: #1e293b;
    background: #fff; outline: none; transition: border-color .2s; cursor: pointer;
}
.dtc-select:focus { border-color: #FF0066; }

/* ── Fields ─────────────────────────────────────────────────── */
.dtc-field       { margin-bottom: 14px; }
.dtc-field label { display: block; font-size: .875rem; font-weight: 600; color: #475569; margin-bottom: 8px; }
.dtc-input  {
    width: 100%; border: 2px solid #e2e8f0; border-radius: 8px;
    padding: 10px 14px; font-size: .9rem; outline: none;
    transition: border-color .2s; box-sizing: border-box;
}
.dtc-input:focus { border-color: #FF0066; }
.dtc-textarea {
    width: 100%; border: 2px solid #e2e8f0; border-radius: 8px;
    padding: 10px 14px; font-size: .9rem; outline: none;
    resize: vertical; font-family: inherit; box-sizing: border-box;
    transition: border-color .2s;
}
.dtc-textarea:focus { border-color: #FF0066; }

/* ── Gender ─────────────────────────────────────────────────── */
.dtc-gender-tabs { display: flex; gap: 8px; }
.dtc-gender-tab  {
    flex: 1; border: 2px solid #e2e8f0; background: #f8fafc;
    border-radius: 8px; padding: 9px; font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: all .2s; color: #64748b;
}
.dtc-gender-tab.active { border-color: #FF0066; background: #fff0f5; color: #FF0066; }

/* ── Submit ─────────────────────────────────────────────────── */
.dtc-submit-wrap { margin-top: 18px; }
.dtc-submit-btn  {
    width: 100%; background: linear-gradient(135deg, #FF0066, #FF6B6B);
    color: #fff; border: none; border-radius: 12px; padding: 15px;
    font-size: 1rem; font-weight: 700; cursor: pointer; transition: opacity .2s;
}
.dtc-submit-btn:hover { opacity: .9; }

/* ── Disclaimer ─────────────────────────────────────────────── */
.dtc-disclaimer { font-size: .78rem; color: #94a3b8; line-height: 1.6; margin: 0; }

/* ── Loading ────────────────────────────────────────────────── */
.dtc-loading { text-align: center; padding: 60px 20px; }
.dtc-baby-pulse { font-size: 3rem; display: inline-block; animation: dtcBeat .8s infinite; }
@keyframes dtcBeat { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }
.dtc-loading-title { font-size: 1.1rem; font-weight: 700; color: #FF0066; margin: 16px 0 4px; }
.dtc-loading-sub   { font-size: .875rem; color: #64748b; margin: 0 0 18px; }
.dtc-loading-bar   { width: 220px; height: 5px; background: #e2e8f0; border-radius: 3px; margin: 0 auto; overflow: hidden; }
.dtc-loading-fill  { height: 100%; background: linear-gradient(90deg,#FF0066,#FF6B6B); animation: dtcLoad 2s ease-in-out infinite; }
@keyframes dtcLoad { 0%{width:0;margin-left:0} 50%{width:70%;margin-left:0} 100%{width:0;margin-left:100%} }

/* ── Error ──────────────────────────────────────────────────── */
.dtc-error-box { text-align: center; padding: 40px; background: #fff; border: 1px solid #fca5a5; border-radius: 12px; }
.dtc-error-icon { font-size: 2rem; }
.dtc-error-box p { color: #ef4444; margin: 10px 0 14px; }
.dtc-error-box button { background: #ef4444; color: #fff; border: none; border-radius: 8px; padding: 9px 22px; cursor: pointer; font-size: .9rem; }

/* ── Result wrap ────────────────────────────────────────────── */
.dtc-result { position: relative; margin-top: 20px; }
.dtc-result.is-locked .dtc-locked-item {
    filter: blur(4px);
    user-select: none;
    /* pointer-events giữ nguyên để accordion vẫn hoạt động */
}

/* ── Lock Overlay — giống boi-tinh-yeu, màu hồng dtc ─────── */
.dtc-lock-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    top: 70px;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 8%);
    border-radius: 0 0 16px 16px;
}
/* Nút mở khóa box — dark card */
.dtc-lock-box {
    background: #2d1020;
    border-radius: 18px;
    padding: 32px 48px;
    text-align: center;
    max-width: 520px;
    width: 94%;
    box-shadow: 0 20px 60px rgba(255,0,102,.25);
}
.dtc-lock-icon {
    font-size: 3rem; display: block;
    margin-bottom: 14px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}
.dtc-lock-msg {
    font-size: 1rem;
    color: #fecdd3;
    line-height: 1.5;
    margin: 0 0 22px;
}
.dtc-unlock-btn {
    display: inline-block;
    padding: 13px 36px;
    background: linear-gradient(135deg, #FF0066 0%, #FF6B6B 100%);
    color: #fff; border: none; border-radius: 50px;
    font-family: inherit; font-size: 1rem; font-weight: 800;
    cursor: pointer; letter-spacing: .3px;
    box-shadow: 0 4px 18px rgba(255,0,102,.45);
    transition: opacity .2s, transform .2s;
}
.dtc-unlock-btn:hover { opacity: .9; transform: translateY(-2px); }

/* ── DOB Header ─────────────────────────────────────────────── */
.dtc-dob-header {
    background: linear-gradient(135deg, #FF0066 0%, #FF6B6B 100%);
    border-radius: 12px; padding: 18px 22px; margin-bottom: 16px; color: #fff;
}
.dtc-dob-inner          { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.dtc-dob-left           { flex-shrink: 0; }
.dtc-dob-title-row      { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.dtc-dob-section-title  { font-size: .9rem; font-weight: 700; }
.dtc-dob-date-badge     { background: rgba(255,255,255,.2); border-radius: 6px; padding: 2px 10px; font-size: .82rem; }
.dtc-chu-so-row         { display: flex; gap: 8px; }
.dtc-chu-so-box         {
    width: 42px; height: 42px; background: rgba(255,255,255,.2);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 800;
}
.dtc-dob-right          { flex: 1; }
.dtc-dob-ynghia         { font-size: .875rem; opacity: .9; margin: 0; line-height: 1.6; }

/* ── Accordion ──────────────────────────────────────────────── */
.dtc-acc-item {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 12px; margin-bottom: 10px; overflow: hidden;
}
.dtc-acc-inner { border-radius: 8px; margin-bottom: 8px; }
.dtc-acc-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; cursor: pointer; gap: 10px; user-select: none;
    transition: background .15s;
}
.dtc-acc-header:hover { background: #fafafe; }
.dtc-acc-header-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.dtc-acc-header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dtc-acc-idx {
    width: 30px; height: 30px; background: #FF0066; color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.dtc-acc-name-block { min-width: 0; }
.dtc-acc-ten   { display: block; font-weight: 700; font-size: .95rem; color: #1e293b; }
.dtc-acc-ynghia { display: block; font-size: .78rem; color: #64748b; margin-top: 2px; }
.dtc-acc-arrow  { font-size: 1.1rem; color: #94a3b8; transition: transform .25s; display: inline-block; }
.dtc-acc-header.is-open .dtc-acc-arrow { transform: rotate(180deg); }
.dtc-acc-body   { padding: 4px 18px 16px; border-top: 1px solid #f1f5f9; }

/* ── Badge ──────────────────────────────────────────────────── */
.dtc-badge        { font-size: .73rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.dtc-badge-green  { background: #dcfce7; color: #15803d; }
.dtc-badge-blue   { background: #dbeafe; color: #1d4ed8; }
.dtc-badge-orange { background: #ffedd5; color: #c2410c; }
.dtc-badge-red    { background: #fee2e2; color: #b91c1c; }

/* ── Tag ────────────────────────────────────────────────────── */
.dtc-tag { font-size: .72rem; background: #f1f5f9; color: #475569; padding: 2px 7px; border-radius: 4px; font-weight: 500; }

/* ── So circle ──────────────────────────────────────────────── */
.dtc-so-circle {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #FF0066, #FF6B6B);
    color: #fff; border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    font-weight: 800; font-size: .95rem; flex-shrink: 0;
}

/* ── Score + Chi số wrap ────────────────────────────────────── */
.dtc-score-chiso-wrap {
    display: flex; gap: 20px; align-items: flex-start;
    padding: 14px 0 16px; flex-wrap: wrap;
}
.dtc-score-col { text-align: center; flex-shrink: 0; min-width: 100px; }
.dtc-score-circle {
    position: relative; width: 90px; height: 90px; margin: 0 auto 6px;
}
.dtc-circle-svg  { width: 100%; height: 100%; transform: rotate(-90deg); }
.dtc-circle-bg   { fill: none; stroke: #e2e8f0; stroke-width: 8; }
.dtc-circle-fill {
    fill: none; stroke: #FF0066; stroke-width: 8;
    stroke-linecap: round; stroke-dasharray: 326.73;
    transition: stroke-dashoffset 1s ease;
}
.dtc-score-inner {
    position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 800; color: #FF0066;
}
.dtc-score-label { font-size: .78rem; font-weight: 700; color: #FF0066; margin: 0 0 3px; }
.dtc-score-name  { font-size: .75rem; color: #64748b; margin: 0; }

.dtc-chiso-col   { flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.dtc-chiso-row   {
    display: flex; align-items: center; gap: 10px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 7px 12px;
}
.dtc-chiso-val   { font-size: 1.2rem; font-weight: 800; color: #FF0066; min-width: 26px; }
.dtc-chiso-label { font-size: .82rem; color: #475569; line-height: 1.3; }
.dtc-chiso-label small { display: block; font-size: .72rem; color: #94a3b8; }

/* ── Phân tích tên section ──────────────────────────────────── */
.dtc-phan-tich-ten-section {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 14px; margin-bottom: 16px; overflow: hidden;
}
.dtc-phan-tich-header {
    background: linear-gradient(135deg, #f0f4ff, #f5f3ff);
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 18px; font-size: .9rem; color: #FF0066; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none; gap: 10px;
}
.dtc-phan-tich-header.dtc-acc-header { padding: 14px 18px; background: #fff; color: #1e293b; }
.dtc-phan-tich-header.dtc-acc-header:hover { background: #fafafe; }
.dtc-phan-tich-body { padding: 16px 18px; }
.dtc-phan-tich-body.dtc-acc-body { padding: 4px 18px 16px; }

/* ── Tổng hợp ───────────────────────────────────────────────── */
.dtc-tong-hop-header {
    font-size: .88rem; font-weight: 600; color: #475569;
    margin: 8px 0 10px; padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}
.dtc-tong-hop-note {
    font-size: .875rem; color: #475569; line-height: 1.7;
    background: #f8fafc; border-left: 3px solid #FF0066;
    padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 0 0 14px;
}

/* ── Luận giải body ─────────────────────────────────────────── */
.dtc-lg-mota  { font-size: .875rem; color: #475569; line-height: 1.7; margin: 8px 0 12px; }
.dtc-lg-block { margin-bottom: 12px; }
.dtc-lg-block-title { font-size: .83rem; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.dtc-lg-list  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.dtc-lg-list li { font-size: .85rem; color: #475569; padding-left: 20px; position: relative; line-height: 1.6; }
.dtc-lg-list-check li::before { content: '✓'; color: #16a34a; position: absolute; left: 0; font-weight: 700; }
.dtc-lg-list-warn  li::before { content: '•'; color: #f59e0b; position: absolute; left: 0; font-weight: 700; }
.dtc-lg-list-grow  li::before { content: '→'; color: #FF0066; position: absolute; left: 0; font-weight: 700; }

/* ── Nhận xét + lưu ý ──────────────────────────────────────── */
.dtc-nhan-xet-tong { font-size: .875rem; color: #475569; line-height: 1.7; margin: 8px 0 12px; }
.dtc-luu-y { font-size: .82rem; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 8px 12px; margin: 10px 0 0; }

/* ── Luận giải list ─────────────────────────────────────────── */
.dtc-luan-giai-list { margin-top: 8px; }

/* ── Kết luận ───────────────────────────────────────────────── */
.dtc-ket-luan-box {
    background: linear-gradient(135deg, #fff0f5, #f5f3ff);
    border: 1px solid #ffb3cc; border-radius: 12px;
    padding: 18px; margin-top: 16px; text-align: center;
}
.dtc-ket-luan-title { font-size: .95rem; font-weight: 700; color: #FF0066; margin-bottom: 10px; }
.dtc-ket-luan-text  { font-size: .875rem; color: #cc0050; line-height: 1.7; margin: 0 0 14px; font-style: italic; }
.dtc-share-result-btn {
    background: #f1f5f9; color: #475569; border: 2px solid #e2e8f0;
    border-radius: 8px; padding: 9px 22px; font-size: .85rem;
    font-weight: 600; cursor: pointer; transition: all .2s;
}
.dtc-share-result-btn:hover { background: #e2e8f0; }

/* ── Reanalyze ──────────────────────────────────────────────── */
.dtc-reanalyze-wrap { text-align: center; margin-top: 20px; padding-bottom: 10px; }
.dtc-reanalyze-btn  {
    background: #f1f5f9; color: #FF0066; border: 2px solid #ffb3cc;
    border-radius: 10px; padding: 11px 26px; font-size: .9rem;
    font-weight: 600; cursor: pointer; transition: all .2s;
}
.dtc-reanalyze-btn:hover { background: #fff0f5; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .dtc-main-title   { font-size: 1.25rem; }
    .dtc-form-card    { padding: 16px; }
    .dtc-mode-tabs    { flex-direction: column; }
    .dtc-score-chiso-wrap { flex-direction: column; }
    .dtc-dob-inner    { flex-direction: column; }
    .dtc-acc-header-right .dtc-tag { display: none; }
}

/* ── Loading box trong overlay ──────────────────────────────── */
.dtc-lock-box-loading { background: #1e2235 !important; }
.dtc-lock-loading-anim {
    font-size: 2.8rem; display: block; margin-bottom: 12px;
    animation: dtcBeat .8s ease-in-out infinite;
}
@keyframes dtcBeat { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
.dtc-lock-loading-title { font-size: 1.05rem; font-weight: 800; color: #fff; margin: 0 0 5px; }
.dtc-lock-loading-sub   { font-size: .85rem; color: rgba(255,255,255,.7); margin: 0 0 16px; }
.dtc-lock-bar { width: 200px; height: 5px; background: rgba(255,255,255,.2); border-radius: 3px; margin: 0 auto; overflow: hidden; }
.dtc-lock-bar-fill {
    height: 100%; background: linear-gradient(90deg, #FF0066, #FF6B6B);
    border-radius: 3px; animation: dtcBarAnim 1.8s ease-in-out infinite;
}
@keyframes dtcBarAnim { 0%{width:0;margin-left:0} 50%{width:70%;margin-left:0} 100%{width:0;margin-left:100%} }
