/* Powered By Wei Xiao Qian.
 * LastChangedDate: 2026-01-11 10:15:31.
 */
@charset "utf-8";
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
	color: #f1f1f1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow-x: hidden;
}
.container {
	width: 100%;
	max-width: 720px;
	padding: 0 10px;
}

header {
	text-align: center;
	margin-bottom: 20px;
	padding-top: 10px;
	width: 100%;
}

h1 {
	font-size: 2rem;
	color: #FFD700;
	/*text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);*/
	margin-bottom: 8px;
	letter-spacing: 1px;
	position: relative;
	display: inline-block;
}

h1:after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	width: 120px;
	height: 2px;
	background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

.subtitle {
	font-size: 0.9rem;
	color: #aaa;
	margin-top: 10px;
}

.content {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 15px;
	margin-bottom: 25px;
	width: 100%;
	flex-wrap: nowrap;
}

.card-section, .dice-section {
	flex: 1;
	min-width: 0;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 15px;
	padding: 15px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	position: relative;
	overflow: hidden;
}

.section-title {
	font-size: 1.1rem;
	color: #4fc3f7;
	margin-bottom: 15px;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	white-space: nowrap;
}

.section-title:before {
	font-size: 0.9rem;
}

/*.card-section .section-title:before {
	content: "🃏";
}

.dice-section .section-title:before {
	content: "🎲";
}*/

/* 单卡显示容器 */
.card-container, .dice-container {
	height: 160px;
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.1);
	display: flex;
	justify-content: center;
	align-items: center;
}

/* 当前显示的卡牌 */
.current-card, .current-dice {
	width: 90%;
	height: 130px;
	background: linear-gradient(145deg, #2d3047, #1f2235);
	border-radius: 10px;
	padding: 15px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: all 0.5s ease;
	position: relative;
}

/* 滚动时的卡牌样式 */
.rolling-card, .rolling-dice {
	animation: cardRolling 0.2s infinite;
}

@keyframes cardRolling {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(5px); }
}

/* 选中后的高亮样式 */
.selected-card, .selected-dice {
	border-color: #FFD700;
	box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
	transform: scale(1.05);
	animation: selectedPulse 2s infinite;
}

@keyframes selectedPulse {
	0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.7); }
	50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.9); }
}

.card-gua {
	font-size: 2.5rem;
	margin-bottom: 5px;
	color: #FFD700;
	font-weight: bold;
	text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.card-name {
	font-size: 1.2rem;
	color: #4fc3f7;
	text-align: center;
	text-shadow: 0 0 5px rgba(79, 195, 247, 0.3);
	line-height: 1.2;
	padding: 0 5px;
}

.dice-number {
	font-size: 4rem;
	color: #FFD700;
	font-weight: bold;
	text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

.dice-result {
	font-size: 1.1rem;
	color: #FFD700;
	text-align: center;
	margin-top: 15px;
	min-height: 30px;
}

.controls {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap;
	width: 100%;
}

.btn {
	padding: 12px 20px;
	font-size: 1rem;
	border: none;
	border-radius: 40px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	letter-spacing: 0.5px;
	flex: 1;
	min-width: 100px;
	justify-content: center;
}

.btn-start {
	background: linear-gradient(90deg, #00c853, #64dd17);
	color: white;
	box-shadow: 0 3px 10px rgba(0, 200, 83, 0.4);
}

.btn-stop {
	background: linear-gradient(90deg, #ff4081, #f50057);
	color: white;
	box-shadow: 0 3px 10px rgba(255, 64, 129, 0.4);
}

.btn-detail {
	background: linear-gradient(90deg, #2979ff, #2962ff);
	color: white;
	box-shadow: 0 3px 10px rgba(41, 121, 255, 0.4);
}

.btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.btn:before {
	font-size: 0.9rem;
}

.btn-start:before {
	content: "▶";
}

.btn-stop:before {
	content: "⏹";
}

.btn-detail:before {
	content: "🔍";
}

.modal {
	display: none;
	position: fixed;
	top: 0;
	/*left: 0;*/
	width: 100%;
	max-width: 720px;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	z-index: 1000;
	justify-content: center;
	align-items: center;
	padding: 15px;
	margin-left: -10px;
}

.modal-content {
	background: linear-gradient(145deg, #1a1a2e, #16213e);
	width: 100%;
	max-height: 85vh;
	border-radius: 15px;
	padding: 20px;
	position: relative;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	border: 2px solid rgba(255, 215, 0, 0.3);
	animation: modalAppear 0.5s ease-out;
	display: flex;
	flex-direction: column;
}

@keyframes modalAppear {
	from { opacity: 0; transform: translateY(-30px); }
	to { opacity: 1; transform: translateY(0); }
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	flex-shrink: 0;
}

.modal-title {
	font-size: 1.4rem;
	color: #FFD700;
}

.modal-title:before {
	content: "📄";
	margin-right: 8px;
}

.close-modal {
	background: none;
	border: none;
	color: #aaa;
	font-size: 1.6rem;
	cursor: pointer;
	transition: color 0.3s;
}

.close-modal:hover {
	color: #fff;
}

.modal-body {
	display: flex;
	flex-direction: column;
	gap: 15px;
	overflow-y: auto;
	flex-grow: 1;
	padding-right: 5px;
}

/* 自定义滚动条样式 */
.modal-body::-webkit-scrollbar {
	width: 6px;
}

.modal-body::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
	background: #FFD700;
	border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
	background: #ffed4e;
}

.detail-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.detail-gua {
	font-size: 2.8rem;
	color: #FFD700;
}

.detail-name {
	font-size: 1.6rem;
	color: #4fc3f7;
	text-align: center;
}

.detail-meta {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	justify-content: center;
	flex-shrink: 0;
}

.detail-element, .detail-number, .detail-bian {
	font-size: 0.9rem;
	color: #aaa;
	text-align: center;
}

.detail-desc-container {
	flex-grow: 1;
	overflow-y: auto;
	padding: 12px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-desc {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #ddd;
	text-align: justify;
}

.detail-desc p {
	margin-bottom: 12px;
}

.footer {
	margin-top: 20px;
	padding-top: 10px;
	text-align: center;
	color: #777;
	font-size: 0.8rem;
	padding-bottom: 12px;
	width: 100%;
	background: #FFEABE;
}
.footer a, .footer a:link, .footer a:visited, .instructions a, .instructions a:link, .instructions a:visited  {
	color: #FF8C00; text-decoration: none;
}
.footer a:hover, .instructions a:hover  {
	color: #FFEABE; text-decoration: none;
}

.highlight {
	color: #FFD700;
	font-weight: bold;
}

.instructions {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	padding: 10px 10px 6px 10px;
	margin-top: 15px;
	text-align: center;
	width: 100%;
}

.instructions p {
	margin-bottom: 8px;
	color: #aaa;
	font-size: 0.85rem;
	line-height: 1.4;
}

.header-icon:before {
	content: "☯️";
	margin-right: 8px;
}

/*top*/
.top {
	width: 100%; background: #FFEABE url("../assets/addons/cms/images/menu-bg.png") repeat-x center; height: 70px; box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}
.top img {
	width: 160px;
}
.header {
	max-width: 720px; margin: 0 auto;
}
.logo {
	float: left; padding: 10px 0 0 10px;
}
.menu-icon {
	float: right; font-size: 1.4rem; cursor: pointer; padding: 20px 15px 0 0;
}
.top a:link, .top a:visited  {
	color: #000; text-decoration: none;
}
.top a:hover  {
	color: #FF8C00; text-decoration: none;
}


/* 针对超小屏幕的优化 */
@media (max-width: 360px) {
	h1 {
		font-size: 1.6rem;
	}
	
	.subtitle {
		font-size: 0.8rem;
	}

	.content {
		gap: 10px;
	}
	
	.card-section, .dice-section {
		padding: 10px;
	}
	
	.card-container, .dice-container {
		height: 140px;
	}
	
	.current-card, .current-dice {
		height: 110px;
		padding: 10px;
	}
	
	.card-gua {
		font-size: 2rem;
	}
	
	.card-name {
		font-size: 1rem;
	}
	
	.dice-number {
		font-size: 3rem;
	}
	
	.section-title {
		font-size: 1rem;
	}
	
	.btn {
		padding: 10px 15px;
		font-size: 0.9rem;
		min-width: 90px;
	}
	
	.controls {
		gap: 8px;
	}
}

/* 针对横屏的优化 */
@media (orientation: landscape) and (max-height: 500px) {
	.content {
		margin-bottom: 15px;
	}
	
	.card-container, .dice-container {
		height: 130px;
	}
	
	.current-card, .current-dice {
		height: 100px;
		padding: 10px;
	}
	
	.card-gua {
		font-size: 1.8rem;
		margin-bottom: 5px;
	}
	
	.card-name {
		font-size: 0.9rem;
	}
	
	.dice-number {
		font-size: 2.5rem;
	}
	
	.controls {
		margin-top: 15px;
	}
	
	.btn {
		padding: 10px 15px;
		font-size: 0.9rem;
	}
	
	.modal-content {
		max-height: 80vh;
	}
}

/* 抽卡状态提示 */
.status-info {
	font-size: 1rem;
	color: #FFD700;
	text-align: center;
	margin-top: 10px;
	min-height: 30px;
	font-weight: bold;
}

