body{
	font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}
:root{
	--bs-primary:#c40000;
	--bs-primary-rgb:196,0,0;
	--bs-link-color:#c40000;
}
a{
	color:#c40000;
}
a:hover{
	color:#a80000;
}
.btn-primary{
	background-color:#c40000;
	border-color:#c40000;
}
.btn-primary:hover{
	background-color:#a80000;
	border-color:#a80000;
}
.navbar.bg-primary{
	background-color:#c40000 !important;
}
.card-header{
	font-weight:600;
}
.ai-text{
	white-space:pre-wrap;
	line-height:1.7;
}
.bazi-calendar{
	background:#fff;
	border:1px solid #f1d6d6;
	border-radius:10px;
	padding:12px;
}
.calendar-week{
	display:grid;
	grid-template-columns:repeat(7,1fr);
	gap:6px;
	font-size:12px;
	color:#999;
	margin-bottom:6px;
	text-align:center;
}
.calendar-grid{
	display:grid;
	grid-template-columns:repeat(7,1fr);
	gap:6px;
}
.cal-cell{
	border:1px solid #f3e0e0;
	border-radius:8px;
	padding:6px 4px;
	min-height:54px;
	text-align:center;
	cursor:pointer;
	background:#fff;
}
.cal-cell .solar{
	font-weight:600;
	color:#333;
}
.cal-cell .lunar{
	font-size:11px;
	color:#999;
	margin-top:2px;
	white-space:nowrap;
}
.cal-cell.muted{
	border-color:transparent;
	background:transparent;
	cursor:default;
}
.cal-cell.today{
	border-color:#c40000;
}
.cal-cell.selected{
	background:#fdeaea;
	border-color:#c40000;
}
.bazi-scroll{
	margin-top:8px;
	max-height:120px;
	overflow:hidden;
	position:relative;
}
.bazi-scroll .scroll-item{
	font-size:12px;
	color:#888;
	line-height:1.6;
	animation:scrollUp 6s linear infinite;
}
.bazi-scroll .scroll-item:nth-child(2){
	animation-delay:2s;
}
.bazi-scroll .scroll-item:nth-child(3){
	animation-delay:4s;
}
@keyframes scrollUp{
	0%{transform:translateY(100%);opacity:0}
	10%{transform:translateY(0);opacity:1}
	30%{transform:translateY(0);opacity:1}
	40%{transform:translateY(-100%);opacity:0}
	100%{transform:translateY(-100%);opacity:0}
}
@media print{
	.navbar,#printBtn,.btn,form,.card-header{display:none !important;}
	body, .container, .card, .card-body {
		background: #fff !important;
		margin: 0 !important;
		padding: 0 !important;
		border: none !important;
		width: 100% !important;
		max-width: 100% !important;
		box-shadow: none !important;
	}
	#printHeader {
		display: block !important;
		text-align: center;
		font-size: 24px;
		font-weight: bold;
		color: #c40000;
		margin-bottom: 20px;
		padding-bottom: 10px;
		border-bottom: 2px solid #c40000;
	}
	#printFooter {
		display: block !important;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		text-align: center;
		font-size: 12px;
		color: #666;
		padding: 10px 0;
		background: #fff;
		border-top: 1px solid #eee;
	}
	@page {
		margin: 25px 20px;
		size: auto;
	}
}
#printHeader, #printFooter { display: none; }

/* 3D Modal & Chinese Red Theme */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(196, 0, 0, 0.2), 0 0 0 1px rgba(196, 0, 0, 0.1);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #c40000 0%, #9e0000 100%);
    color: #fff;
    border-bottom: 4px solid #7a0000;
    position: relative;
    padding: 1rem 1.5rem;
}

.modal-title {
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-footer {
    border-top: 1px solid #eee;
    background-color: #fdfdfd;
}

/* 3D Button Effect */
.btn-danger, .btn-primary {
    background: linear-gradient(to bottom, #d60000, #c40000);
    border: none;
    border-bottom: 4px solid #8a0000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.1s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-danger:hover, .btn-primary:hover {
    background: linear-gradient(to bottom, #e60000, #d40000);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.btn-danger:active, .btn-primary:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
    box-shadow: none;
    margin-top: 2px; /* Compensate for border reduction */
    margin-bottom: -2px;
}

.btn-secondary {
    background: linear-gradient(to bottom, #6c757d, #5a6268);
    border: none;
    border-bottom: 4px solid #40464a;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.1s ease;
    font-weight: 600;
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #7d868f, #6c757d);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.btn-secondary:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
    box-shadow: none;
    margin-top: 2px;
    margin-bottom: -2px;
}
.small8 {
    font-size: 0.8em;
}
}