:root {
  --main: #c62828;
  --bg: #fdfdfd;
}

.container-fengshui-calendar {
  display: flex;
  max-width: 1200px;
  margin: auto;
  width: 100%;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.side-info {
  flex: 0 0 280px;
  background: var(--main);
  color: white;
  padding: 40px 20px;
  text-align: center;
  border-right: 4px solid #b71c1c;
}

.side-info h1 {
  font-size: 100px;
  margin: 0;
  font-weight: 900;
}

.lunar-box {
  background: rgba(0, 0, 0, 0.1);
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  font-size: 24px;
  font-weight: 700;
}

.main-content {
  flex: 1;
  padding: 25px;
  background: var(--bg);
}

.header-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8d7da;
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;
  border: 1px solid #f5c6cb;
}

.header-action span {
  font-weight: bold;
  color: #721c24;
}

.header-action .header-picker {
  position: relative;
}

.picker-btn {
  background: #fff;
  border: 1px solid #ced4da;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.picker-dropdown {
  display: none;
  background: white;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: absolute;
  z-index: 100;
  margin-top: 5px;
  right: 25px;
}

.picker-dropdown-box {
  display: flex;
  gap: 0.5rem;
}

.btn-view {
  background: var(--main);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
}

.full-detail-section {
  background: white;
  border: 1px solid #eee;
  border-radius: 0 0 10px 10px;
  padding: 20px;
  margin-bottom: 25px;
  border-top: none;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-list li {
  margin-bottom: 10px;
  border-bottom: 1px dashed #eee;
  padding-bottom: 8px;
  font-size: 15px;
}

.detail-list b {
  color: #333;
  width: 140px;
  display: inline-block;
}

.detail-list .gio-hoang-dao {
  color: #2e7d32;
  font-weight: 600;
}
.highlight {
  color: #d32f2f;
  font-weight: bold;
}

.nav-calendar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.nav-calendar-btn {
  text-decoration: none;
  color: var(--main);
  font-weight: bold;
  border: none;
  background: transparent;
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid #eee;
  border-left: 1px solid #eee;
}

.head {
  text-align: center;
  padding: 12px;
  font-weight: 700;
  background: #f8f9fa;
  font-size: 12px;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.cell {
  min-height: 95px;
  padding: 10px;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: 0.2s;
}

.cell:hover {
  background: #fffde7;
}

.cell.today {
  background: #ffbebe;
}

.cell.today::after {
  content: "Hôm nay";
  position: absolute;
  top: 21px;
  right: 5px;
  font-size: 12px;
  color: var(--main);
  font-weight: bold;
  opacity: 0.7;
}

.cell.active {
  background: #fff5f5 !important;
  outline: 3px solid var(--main);
  outline-offset: -3px;
  z-index: 5;
  box-shadow: 0 0 10px rgba(198, 40, 40, 0.2);
}

.cell.active .solar {
  color: var(--main);
  font-size: 24px;
}

.solar {
  font-size: 20px;
  font-weight: 700;
}

.lunar-container {
  margin-top: auto;
  text-align: right;
}

.lunar-num {
  font-size: 12px;
  font-weight: bold;
}

.canchi-cell {
  font-size: 10px;
  color: #999;
  display: block;
}

.side-info {
  flex: 0 0 300px;
  /* Tăng nhẹ độ rộng */
  background: linear-gradient(180deg, #c62828 0%, #8e0000 100%);
  color: white;
  padding: 30px 15px !important;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Khối Dương lịch tập trung */
.side-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 20px;
}

.year-month {
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.8;
  font-weight: 600;
}

.solar-day {
  font-size: 90px;
  font-weight: 900;
  line-height: 1;
  margin: 5px 0;
  color: #fff;
}

.lunar-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lunar-card .lunar-title {
  font-size: 12px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 15px;
}

.lunar-main {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 5px;
}

.lunar-canchi {
  font-size: 14px;
  color: #ffeb3b;
  font-weight: 600;
  text-transform: uppercase;
}

.info-grid {
  text-align: left;
  background: rgba(0, 0, 0, 0.1);
  padding: 15px;
  border-radius: 10px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.info-item:last-child {
  border: none;
}

.info-item .label {
  opacity: 0.7;
  font-weight: 300;
}

.info-item .val {
  font-weight: 600;
  text-align: right;
  color: #fff;
}

.action-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-item {
  padding: 10px;
  border-radius: 8px;
  font-size: 11px;
  text-align: left;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.05);
}

.action-item.positive strong {
  color: #2ecc71;
}

.action-item.negative strong {
  color: #ef9a9a;
}

.side-footer {
  margin-top: auto;
  text-align: left;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.num-circle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.num-circle .num-title {
  font-size: 12px;
  font-weight: 600;
}

.num-val {
  background: #ffeb3b;
  color: #c62828;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
}

.event-desc {
  font-size: 12px;
  line-height: 1.5;
  font-style: italic;
  opacity: 0.9;
}
.quote-desc {
  margin-top: 15px;
  font-size: 12px;
}
.quote-desc strong {
  color: #ffeb3b;
}
.quote-desc .footer-content {
  line-height: 1.4;
  margin-top: 5px;
  font-style: italic;
  font-weight: 600;
}
.lucky-hours {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  text-align: left;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.lucky-hours .hours-title {
  font-size: 12px;
  text-transform: uppercase;
  color: #ffeb3b;
  margin-bottom: 8px;
  font-weight: bold;
  letter-spacing: 1px;
}

.hours-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hour-tag {
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.star-info {
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 10px;
}

.star-info .star-title {
  font-size: 11px;
  text-transform: uppercase;
  color: #ffeb3b;
  margin-bottom: 8px;
  font-weight: bold;
}

.star-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.star-desc {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.8;
}

.travel-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.travel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 8px;
  text-align: left;
}

.travel-icon {
  font-size: 20px;
}

.travel-txt strong {
  display: block;
  font-size: 13px;
  color: #ffeb3b;
}

.travel-txt small {
  font-size: 11px;
  opacity: 0.7;
}

.numerology-extended {
  margin-top: auto;
  padding-top: 15px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.num-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.num-circle-v2 {
  background: #ffeb3b;
  color: #c62828;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.num-header span {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
}

.num-detail {
  font-size: 12px;
  line-height: 1.6;
  font-style: italic;
  opacity: 0.9;
  margin: 0;
}
@media (max-width: 1024px) {
  .container-fengshui-calendar {
    flex-direction: column; /* Xếp chồng side-info và main-content */
  }

  .side-info {
    flex: 0 0 auto;
    width: 100%;
    padding: 20px 15px !important;
    border-right: none;
    border-bottom: 4px solid #b71c1c;
  }

  .main-content {
    padding: 15px;
  }

  .solar-day {
    font-size: 70px; /* Giảm kích thước ngày dương lịch */
  }

  .lunar-main {
    font-size: 24px;
  }

  .grid {
    grid-template-columns: repeat(7, 1fr); /* Giữ grid nhưng cell nhỏ hơn */
  }

  .cell {
    min-height: 70px;
    padding: 5px;
  }

  .solar {
    font-size: 16px;
  }

  .lunar-num {
    font-size: 10px;
  }

  .canchi-cell {
    font-size: 8px;
  }

  .detail-list li {
    font-size: 13px;
  }

  .detail-list b {
    width: 120px;
  }

  .picker-dropdown {
    right: 0;
    left: 0;
    margin: 5px auto;
    width: fit-content;
  }

  .picker-dropdown-box {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .side-info {
    padding: 15px 10px !important;
  }

  .solar-day {
    font-size: 50px;
  }

  .lunar-main {
    font-size: 20px;
  }

  .lunar-canchi {
    font-size: 12px;
  }

  .info-item {
    font-size: 12px;
  }

  .action-item {
    font-size: 10px;
  }

  .hour-tag {
    font-size: 10px;
    padding: 2px 6px;
  }

  .star-name {
    font-size: 14px;
  }

  .star-desc {
    font-size: 11px;
  }

  .num-val {
    width: 25px;
    height: 25px;
    font-size: 14px;
  }

  .event-desc {
    font-size: 11px;
  }

  .header-action {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .picker-btn {
    font-size: 12px;
  }

  .btn-view {
    padding: 6px 12px;
  }

  .nav-calendar h2 {
    font-size: 14px;
  }

  .head {
    font-size: 10px;
    padding: 8px;
  }

  .cell {
    min-height: 50px;
    padding: 5px;
  }
  .cell.active .solar {
    font-size: 14px !important;
  }
  .cell.today::after {
    top: 2.5rem;
    right: 1.5rem;
    font-size: 7px;
  }

  .lunar-num {
    font-size: 9px;
  }

  .canchi-cell {
    font-size: 7px;
  }

  .full-detail-section {
    padding: 15px;
  }

  .detail-list li {
    font-size: 12px;
  }

  .detail-list b {
    width: auto;
    display: block;
    margin-bottom: 5px;
  }
  .nav-calendar-btn {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(7, minmax(30px, 1fr)); /* Tối ưu cho màn nhỏ */
  }

  .cell {
    min-height: 40px;
    padding: 3px;
  }

  .solar {
    font-size: 12px;
  }

  .lunar-num {
    font-size: 8px;
  }

  .canchi-cell {
    display: none; /* Ẩn can chi nếu màn quá nhỏ */
  }

  .side-info {
    gap: 15px;
  }

  .action-box {
    grid-template-columns: 1fr;
  }

  .hours-list {
    gap: 4px;
  }

  .picker-dropdown-box {
    flex-direction: column;
    gap: 10px;
  }

  .picker-dropdown {
    padding: 10px;
  }
}
