/**
 * Xem Bói Module Styles
 * Màu chủ đạo: đỏ/đen của Tuvi.vn
 */

/* ─── GENERAL ─────────────────────────────────────────── */
.xb-section {
  padding: 1.5rem 0;
}

.xb-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #a21313;
  margin-bottom: 1rem;
}

.xb-page-desc {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ─── CARD GRID ─────────────────────────────────────────── */
.xb-card-grid {
  /* Bootstrap .row provides display:flex + flex-wrap + margin
     Only keep gap/margin that .row does not handle */
  gap: 1rem;
  margin-bottom: 2rem;
}

.row.xb-card-grid > .col-4 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.xb-feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  border-radius: 8px;
  border: 2px solid #e8e8e8;
  background: #fff;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
}

.xb-feature-card:hover {
  border-color: #a21313;
  background: #fff5f5;
  text-decoration: none;
  color: #a21313;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(162, 19, 19, 0.15);
}

.xb-feature-card .xb-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  transition: background 0.2s;
}

.xb-feature-card:hover .xb-card-icon {
  background: #a21313;
  color: #fff;
}

.xb-feature-card .xb-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: inherit;
}

.xb-feature-card .xb-card-desc {
  font-size: 0.75rem;
  color: #888;
  margin: 0;
}

/* ─── FORM WRAPPER ─────────────────────────────────────────── */
.xb-form-wrap {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #eee;
}

.xb-form-wrap .xb-form-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #a21313;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #a21313;
}

/* ─── INPUTS ─────────────────────────────────────────── */
.xb-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  background: #fff;
}

.xb-input:focus {
  outline: none;
  border-color: #a21313;
  box-shadow: 0 0 0 3px rgba(162, 19, 19, 0.1);
}

.xb-input.is-invalid {
  border-color: #dc3545;
}

.xb-input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.xb-input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.35rem;
}

.xb-input-group .xb-error-msg {
  font-size: 0.75rem;
  color: #dc3545;
  margin-top: 0.25rem;
  display: none;
}

.xb-input-group.has-error .xb-error-msg {
  display: block;
}

/* ─── TWO COLUMN FORM ─────────────────────────────────────────── */
.xb-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.xb-two-col .xb-col {
  display: flex;
  flex-direction: column;
}

@media (max-width: 575.98px) {
  .xb-two-col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ─── YEAR SELECTOR ─────────────────────────────────────────── */
.xb-year-select {
  padding: 0.6rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.2s;
}

.xb-year-select:focus {
  outline: none;
  border-color: #a21313;
  box-shadow: 0 0 0 3px rgba(162, 19, 19, 0.1);
}

/* ─── BUTTONS ─────────────────────────────────────────── */
.xb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.xb-btn-primary {
  background: #a21313;
  color: #fff;
}

.xb-btn-primary:hover {
  background: #8a0f0f;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(162, 19, 19, 0.3);
}

.xb-btn-primary:active {
  transform: translateY(0);
}

.xb-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.xb-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.xb-btn-secondary:hover {
  background: #e0e0e0;
}

.xb-btn-block {
  display: flex;
  width: 100%;
}

.xb-btn-choose {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid #ddd;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.xb-btn-choose:hover {
  border-color: #a21313;
  background: #fff5f5;
}

.xb-btn-choose.selected {
  border-color: #a21313;
  background: #a21313;
  color: #fff;
}

.xb-btn-choose .xb-choose-num {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.xb-btn-choose .xb-choose-label {
  font-size: 0.8rem;
}

/* ─── CHOICE CARDS GRID ─────────────────────────────────────────── */
.xb-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

/* ─── LOADING ─────────────────────────────────────────── */
.xb-loading {
  display: none;
  text-align: center;
  padding: 2rem;
  color: #888;
}

.xb-loading.active {
  display: block;
}

.xb-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(162, 19, 19, 0.2);
  border-top-color: #a21313;
  border-radius: 50%;
  animation: xb-spin 0.8s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes xb-spin {
  to { transform: rotate(360deg); }
}

/* ─── ERROR STATE ─────────────────────────────────────────── */
.xb-error {
  display: none;
  background: #fff0f0;
  border: 1px solid #ffcccc;
  border-radius: 8px;
  padding: 1rem;
  color: #c0392b;
  margin: 1rem 0;
}

.xb-error.active {
  display: block;
}

/* ─── RESULT SECTION ─────────────────────────────────────────── */
.xb-result {
  display: none;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid #eee;
  animation: xb-fadeIn 0.3s ease;
}

.xb-result.active {
  display: block;
}

@keyframes xb-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.xb-result-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #a21313;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #a21313;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.xb-result-block {
  margin-bottom: 1.25rem;
}

.xb-result-block:last-child {
  margin-bottom: 0;
}

.xb-result-block-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.xb-result-block-content {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.7;
}

/* ─── RESULT INFO TABLE ─────────────────────────────────────────── */
.xb-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.xb-info-table th {
  background: #f5f5f5;
  font-weight: 600;
  color: #333;
  padding: 0.5rem 0.75rem;
  text-align: center;
  border: 1px solid #ddd;
}

.xb-info-table td {
  padding: 0.5rem 0.75rem;
  text-align: center;
  border: 1px solid #ddd;
  color: #444;
}

.xb-info-table .xb-info-table-name {
  font-weight: 600;
  color: #a21313;
}

/* ─── PROGRESS BAR ─────────────────────────────────────────── */
.xb-progress-section {
  margin-bottom: 1rem;
}

.xb-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  color: #555;
}

.xb-progress-track {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.xb-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.xb-progress-fill.low { background: #e74c3c; }
.xb-progress-fill.medium { background: #f39c12; }
.xb-progress-fill.high { background: #27ae60; }

/* ─── HOROSCOPE BOARD ─────────────────────────────────────────── */
.xb-horoscope-board {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.xb-horoscope-board th {
  background: #a21313;
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 0.5rem;
  text-align: center;
}

.xb-horoscope-board td {
  padding: 0.5rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid #eee;
  color: #444;
}

/* ─── BADGE ─────────────────────────────────────────── */
.xb-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.xb-badge-red { background: #ffe0e0; color: #a21313; }
.xb-badge-green { background: #e0ffe0; color: #27ae60; }
.xb-badge-yellow { background: #fff9e0; color: #f39c12; }
.xb-badge-blue { background: #e0f0ff; color: #2980b9; }
.xb-badge-gray { background: #f0f0f0; color: #666; }

/* ─── SCORE CIRCLE ─────────────────────────────────────────── */
.xb-score-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0.5rem 0;
}

.xb-score-low { background: #e74c3c; }
.xb-score-medium { background: #f39c12; }
.xb-score-high { background: #27ae60; }

/* ─── TEXT RESULT ─────────────────────────────────────────── */
.xb-text-result {
  background: #f9f9f9;
  border-left: 4px solid #a21313;
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #333;
}

/* ─── CHOICE SELECTED ─────────────────────────────────────────── */
.xb-selected-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #555;
}

.xb-selected-choice strong {
  color: #a21313;
}

/* ─── NUMBER DISPLAY ─────────────────────────────────────────── */
.xb-num-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.xb-num-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  border: 2px solid #ddd;
  background: #fff;
  color: #333;
}

.xb-num-circle.last {
  border-color: #a21313;
  background: #a21313;
  color: #fff;
}

.xb-num-operator {
  font-size: 1.25rem;
  color: #888;
  font-weight: 300;
}

.xb-num-equals {
  font-size: 1.5rem;
  color: #a21313;
  font-weight: 700;
}

/* ─── TIME SLOT ─────────────────────────────────────────── */
.xb-time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.xb-time-slot {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  background: #fff;
}

.xb-time-slot:hover {
  border-color: #a21313;
  background: #fff5f5;
}

.xb-time-slot.selected {
  border-color: #a21313;
  background: #a21313;
  color: #fff;
}

.xb-time-slot .slot-num {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

/* ─── GENDER TOGGLE ─────────────────────────────────────────── */
.xb-gender-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.xb-gender-btn {
  flex: 1;
  padding: 0.6rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
}

.xb-gender-btn:hover {
  border-color: #a21313;
}

.xb-gender-btn.selected {
  border-color: #a21313;
  background: #a21313;
  color: #fff;
}

/* ─── CARD RESULT (bói bài) ─────────────────────────────────────────── */
.xb-cards-result {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.xb-card-result-item {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.xb-card-result-item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f8f8f8;
}

.xb-card-result-item .xb-card-result-info {
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #444;
  line-height: 1.5;
  text-align: center;
}

/* ─── NOT RUOI POSITION ─────────────────────────────────────────── */
.xb-position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.xb-position-btn {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  background: #fff;
  transition: all 0.2s;
}

.xb-position-btn:hover {
  border-color: #a21313;
  background: #fff5f5;
}

.xb-position-btn.selected {
  border-color: #a21313;
  background: #a21313;
  color: #fff;
}

.xb-position-btn .pos-num {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

/* ─── NOT RUOI RESULT LIST ─────────────────────────────────────────── */
.xb-nr-results {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.xb-nr-result-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #a21313;
}

.xb-nr-result-item .nr-pos-label {
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #a21313;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.xb-nr-result-item .nr-content {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #444;
}

/* ─── LISTING PAGE CARD ICON (emoji-based, listing grid) ─── */
.xb-card-icon-lg {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: #fdf2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: background 0.2s;
    line-height: 1;
}

.col-6.col-sm-4.pt-3.pb-3.hover-dark.br-md:hover .xb-card-icon-lg {
    background: #a21313;
}

/* ─── MISC HELPERS ─────────────────────────────────────────── */
.xb-text-center { text-align: center; }
.xb-mt-1 { margin-top: 0.5rem; }
.xb-mt-2 { margin-top: 1rem; }
.xb-mb-1 { margin-bottom: 0.5rem; }
.xb-mb-2 { margin-bottom: 1rem; }
.xb-mb-3 { margin-bottom: 1.5rem; }
.xb-divider { border: none; border-top: 1px solid #eee; margin: 1.5rem 0; }
.xb-tip { background: #f0f7ff; border-radius: 6px; padding: 0.75rem 1rem; font-size: 0.85rem; color: #2980b9; line-height: 1.6; }

/* ─── MOBILE ADJUSTMENTS ─────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .xb-card-grid {
    gap: 0.75rem;
  }
  .xb-choice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .xb-info-table { font-size: 0.8rem; }
  .xb-time-slots { grid-template-columns: repeat(3, 1fr); }
}

/* ─── BÓI TÌNH YÊU - LAYOUT MỚI ──────────────────────────────────── */

/* Form: 2 cột nam/nữ với icon giữa */
.xb-love-form {
  padding: 1.25rem;
}

.xb-love-icons {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0;
}

.xb-love-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.xb-love-person h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #a21313;
}

.xb-love-male .xb-love-icon { color: #2980b9; }
.xb-love-female .xb-love-icon { color: #e91e63; }

.xb-love-icon {
  font-size: 2.5rem;
  line-height: 1;
  display: inline-block;
}

.xb-love-icon-heart {
  font-size: 2rem;
  color: #e91e63;
  line-height: 1;
  animation: xb-heart-beat 1.2s ease-in-out infinite;
}

@keyframes xb-heart-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.xb-love-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.xb-love-side {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.xb-love-heart-col {
  display: none;
}

.xb-love-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.xb-love-btn-wrap .xb-btn {
  min-width: 240px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

@media (max-width: 575.98px) {
  .xb-love-icons { grid-template-columns: 1fr; gap: 0.5rem; }
  .xb-love-form-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .xb-love-heart { padding: 0.25rem 0; }
}

/* ─── KẾT QUẢ: 3-CỘT FRAME ─────────────────────────────────────────── */
.xb-love-result .xb-result-frame {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0.5rem;
  background: linear-gradient(180deg, #fff5f8 0%, #ffffff 100%);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.xb-result-info {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.xb-result-info p {
  margin: 0.35rem 0;
}

.xb-info-left .xb-result-name,
.xb-info-right .xb-result-name {
  font-weight: 700;
  color: #a21313;
  font-size: 1.05rem;
}

.xb-result-year {
  display: block;
  color: #666;
  font-size: 0.85rem;
}

.xb-result-cung {
  color: #444;
  font-weight: 500;
}

.xb-result-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.xb-pair-tags {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.xb-pair-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  min-width: 140px;
  justify-content: center;
}

.xb-tag-male {
  background: #e3f2fd;
  color: #1976d2;
}

.xb-tag-female {
  background: #fce4ec;
  color: #c2185b;
}

.xb-pair-menh {
  display: inline-block;
}

@media (max-width: 575.98px) {
  .xb-love-result .xb-result-frame {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
}

/* ─── KẾT QUẢ: 5 THANH BAR ĐIỂM ───────────────────────────────────── */
.xb-result-bars {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
  background: #fafafa;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.xb-bar-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 1rem;
}

.xb-bar-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #555;
}

.xb-bar {
  position: relative;
  height: 18px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
}

.xb-bar-fill-bg {
  position: absolute;
  inset: 0;
  background: #eee;
  border-radius: 10px;
}

.xb-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff5e8a 0%, #ee2c79 100%);
  border-radius: 10px;
  transition: width 0.6s ease;
  z-index: 1;
}

.xb-bar-value {
  font-size: 0.8rem;
  color: #444;
  white-space: nowrap;
  min-width: 180px;
  text-align: right;
}

@media (max-width: 575.98px) {
  .xb-bar-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .xb-bar-value {
    text-align: left;
    min-width: 0;
  }
}

/* ─── KẾT QUẢ: VÒNG TRÒN 10 ELLIPSE ───────────────────────────────── */
.xb-score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
}

.xb-circle-chart {
  position: relative;
  width: 100px;
  height: 100px;
  max-width: 100%;
  margin: 0 auto;
}

.xb-center-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ee2c79 0%, #ff5e8a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(238, 44, 121, 0.4);
  z-index: 10;
}

.xb-heart-icon {
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
}

.xb-ellipse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 71px;
  height: 36px;
  transform-origin: 0 0;
  margin: -18px 0 0 0;
}

.xb-ellipse svg {
  width: 100%;
  height: 100%;
}

.xb-ellipse-1  { transform: translate(0, -160px)         rotate(0deg)   translate(-35.5px, 0); }
.xb-ellipse-2  { transform: translate(0, -160px)         rotate(36deg)  translate(-35.5px, 0); }
.xb-ellipse-3  { transform: translate(0, -160px)         rotate(72deg)  translate(-35.5px, 0); }
.xb-ellipse-4  { transform: translate(0, -160px)         rotate(108deg) translate(-35.5px, 0); }
.xb-ellipse-5  { transform: translate(0, -160px)         rotate(144deg) translate(-35.5px, 0); }
.xb-ellipse-6  { transform: translate(0, -160px)         rotate(180deg) translate(-35.5px, 0); }
.xb-ellipse-7  { transform: translate(0, -160px)         rotate(216deg) translate(-35.5px, 0); }
.xb-ellipse-8  { transform: translate(0, -160px)         rotate(252deg) translate(-35.5px, 0); }
.xb-ellipse-9  { transform: translate(0, -160px)         rotate(288deg) translate(-35.5px, 0); }
.xb-ellipse-10 { transform: translate(0, -160px)         rotate(324deg) translate(-35.5px, 0); }

.xb-score-label {
  margin-top: 1rem;
  text-align: center;
}

.xb-score-text {
  display: inline-block;
  background: #fff0f6;
  color: #ee2c79;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  border: 2px solid #ee2c79;
}

@media (max-width: 575.98px) {
  .xb-circle-chart { width: 280px; height: 280px; }
  .xb-ellipse-1, .xb-ellipse-2, .xb-ellipse-3, .xb-ellipse-4, .xb-ellipse-5,
  .xb-ellipse-6, .xb-ellipse-7, .xb-ellipse-8, .xb-ellipse-9, .xb-ellipse-10 {
    transform: translate(0, -140px) rotate(var(--r, 0deg)) translate(-35.5px, 0);
  }
}

/* ─── KẾT QUẢ: BOX NHẬN ĐỊNH 2 CỘT ────────────────────────────────── */
.xb-result-box {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f1c5d6;
  box-shadow: 0 2px 12px rgba(238, 44, 121, 0.08);
  overflow: hidden;
}

.xb-result-header {
  padding: 0;
}

.xb-result-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0;
}

.xb-result-left {
  background: linear-gradient(135deg, #ee2c79 0%, #ff5e8a 100%);
  color: #fff;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.xb-result-left h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.xb-result-title {
  margin: 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.xb-result-sub {
  margin: 0.5rem 0 0 0;
  font-size: 0.8rem;
  opacity: 0.9;
  font-style: italic;
}

.xb-result-right {
  padding: 1.5rem;
  color: #333;
  font-size: 0.9rem;
  line-height: 1.7;
}

.xb-result-right p {
  margin: 0;
}

.xb-result-right p:last-child {
  margin-bottom: 0;
}

.xb-result-right .highlight {
  color: #ee2c79;
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .xb-result-content {
    grid-template-columns: 1fr;
  }
  .xb-result-left { padding: 1rem; }
  .xb-result-right { padding: 1rem; }
}

/* ─── BÓI AI CẬP — 4 BOX KẾT QUẢ (egyptian-fortune layout) ─── */
.xb-eg-result-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.xb-eg-number-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
}

.xb-eg-number {
  font-size: 4rem;
  font-weight: 700;
  color: #a21313;
  line-height: 1;
}

.xb-eg-number-caption {
  font-size: 0.9rem;
  color: #888;
  margin-top: 0.5rem;
}

.xb-eg-content-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.25rem;
}

.xb-eg-content-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #a21313;
  margin: 0 0 0.85rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #a21313;
}

.xb-eg-symbol-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.xb-eg-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fdf2f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xb-eg-icon img {
  max-width: 36px;
  max-height: 36px;
  display: block;
}

.xb-eg-symbol-row p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #333;
  flex: 1;
  min-width: 0;
}

.xb-eg-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.xb-eg-share hr {
  flex: 1;
  border: none;
  border-top: 1px solid #eee;
  margin: 0;
}

.xb-eg-share span {
  font-size: 0.85rem;
  color: #888;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .xb-eg-symbol-row { flex-direction: column; }
  .xb-eg-number { font-size: 3rem; }
}
