/* 基本樣式 */
body {
	font-family: 'Arial', sans-serif;
	color: #f0f0f0;
	text-align: center;
	padding: 20px;
	margin: 0;
	position: relative;
	min-height: 100vh;
	overflow-x: hidden;
}

/* 新增開頭滿版圖片容器 */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain; /* 從cover改為contain */
    background-position: center;
    background-repeat: repeat;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-out;
    background-color: #000; /* 添加背景色填充可能的空白區域 */
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* 新背景設置 - 滿版顯示 */
body:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('mazubg3.jpg');
    z-index: -2;
    background-color: #000; /* 添加背景色填充可能的空白區域 */
	background-size: auto; /* 使用圖片原始大小 */
    background-position: center center; /* 確保圖片居中 */
    background-repeat: repeat; /* 允許圖片重複平鋪 */
}

/* 背景覆蓋層，提高文字可讀性 */
body:after {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(200, 150, 50, 0.4);
	z-index: -1;
}

/* 為開始占卜按鈕增加尺寸並添加閃爍邊框效果 */
#startButton, #startMatsuButton {
    position: relative;
    z-index: 1;
    border: none;
    overflow: visible;
    /* 增加按鈕尺寸 */
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    margin: 15px;
    min-width: 200px;
}

#startButton:before, #startMatsuButton:before {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid transparent;
    border-radius: 12px;
    background: linear-gradient(45deg, #ff00ff, #00ccff, #ffcc00, #ff00ff) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: startButtonBorderFlash 3s infinite;
    z-index: -1;
}

@keyframes startButtonBorderFlash {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
        background-position: 0% 0%;
    }
    25% { 
        opacity: 0.4;
        box-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
        background-position: 100% 0%;
    }
    50% { 
        opacity: 1;
        box-shadow: 0 0 25px rgba(255, 204, 0, 0.8);
        background-position: 200% 0%;
    }
    75% { 
        opacity: 0.4;
        box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
        background-position: 300% 0%;
    }
}

/* 當按鈕禁用時，減弱閃爍效果 */
#startButton:disabled:before, #startMatsuButton:disabled:before {
    animation: startButtonBorderDisabled 4s infinite;
    background: linear-gradient(45deg, #666666, #444444, #666666) border-box;
}

@keyframes startButtonBorderDisabled {
    0%, 100% { 
        opacity: 0.3;
        box-shadow: 0 0 5px rgba(102, 102, 102, 0.3);
    }
    50% { 
        opacity: 0.1;
        box-shadow: none;
    }
}

@keyframes startButtonBorder {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

/* 當按鈕啟用時，增強邊框效果 */
#startButton:not(:disabled):before, #startMatsuButton:not(:disabled):before {
    opacity: 1;
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.8);
}


/* 新增進場動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.container {
	max-width: 800px;
	margin: 0 auto;
	background-color: rgba(30, 30, 60, 0.6);
	backdrop-filter: blur(5px);
	padding: 30px;
	border-radius: 15px;
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes float {
	0% { transform: translateY(0) rotate(0deg); }
	50% { transform: translateY(-20px) rotate(5deg); }
	100% { transform: translateY(0) rotate(0deg); }
}

.floating-element {
	position: fixed;
	width: 80px;
	height: 80px;
	background-image: url('tarot-symbol.png');
	background-size: contain;
	opacity: 0.2;
	z-index: -1;
	animation: float 8s infinite ease-in-out;
}

.floating-element:nth-child(1) {
	top: 10%;
	left: 10%;
	animation-delay: 0s;
}

.floating-element:nth-child(2) {
	top: 70%;
	left: 20%;
	animation-delay: 2s;
}

.floating-element:nth-child(3) {
	top: 30%;
	right: 15%;
	animation-delay: 4s;
}

.floating-element:nth-child(4) {
	bottom: 15%;
	right: 10%;
	animation-delay: 6s;
}

/* 標題彩色邊框 */
h1 {
	color: #ffffff;
	margin-bottom: 30px;
	text-shadow: 
		0 0 5px #ff00ff,
		0 0 10px #9900cc,
		0 0 15px #6600cc,
		0 0 20px #3300cc;
	padding: 15px;
	position: relative;
	display: inline-block;
	font-size: 36px;
	font-weight: bold;
	letter-spacing: 2px;
	background-color: rgba(30, 30, 60, 0.3); /* 添加半透明底色 */
}

h1:before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border: 3px solid transparent;
	border-radius: 10px;
	background: linear-gradient(45deg, #ff00ff, #9900cc, #6600cc, #3300cc, #ff00ff) border-box;
	-webkit-mask: 
		linear-gradient(#fff 0 0) padding-box, 
		linear-gradient(#fff 0 0);
	-webkit-mask-composite: destination-out;
	mask-composite: exclude;
	animation: borderAnimation 4s linear infinite;
	z-index: -1;
}

@keyframes borderAnimation {
	0% { background-position: 0% 0%; }
	100% { background-position: 200% 0%; }
}

.screen {
	display: none;
}

.screen.active {
	display: block;
}

textarea, input[type="text"] {
	width: 100%;
	padding: 15px;
	margin: 20px 0;
	background-color: rgba(20, 20, 40, 0.8);
	color: #fff;
	border: 1px solid #6600cc;
	border-radius: 8px;
	font-size: 16px;
	box-sizing: border-box;
	z-index: -1;
}

textarea {
	min-height: 100px;
}

input[type="text"] {
	max-width: 300px;
	margin: 10px auto;
	display: block;
}

button {
	background: linear-gradient(135deg, #9900cc, #6600cc);
	color: #ffffff;
	border: none;
	padding: 12px 25px;
	font-size: 16px;
	border-radius: 8px;
	cursor: pointer;
	margin: 10px;
	transition: all 0.3s;
	box-shadow: 0 0 10px rgba(153, 0, 204, 0.5);
	position: relative; /* 添加相對定位 */
}

/* 添加彩色邊框效果 */
button:before {
	content: "";
	position: absolute;
	top: -3px;
	left: -3px;
	right: -3px;
	bottom: -3px;
	border: 3px solid transparent;
	border-radius: 11px; /* 略大於按鈕的圓角 */
	background: linear-gradient(45deg, #ff00ff, #00ccff, #ffcc00, #ff00ff) border-box;
	-webkit-mask: 
		linear-gradient(#fff 0 0) padding-box, 
		linear-gradient(#fff 0 0);
	-webkit-mask-composite: destination-out;
	mask-composite: exclude;
	animation: buttonBorderAnimation 3s linear infinite;
	z-index: -1;
	pointer-events: none; /* 確保不影響按鈕的點擊 */
}

@keyframes buttonBorderAnimation {
	0% { background-position: 0% 0%; }
	100% { background-position: 300% 0%; }
}

button:hover {
	background: linear-gradient(135deg, #b300e6, #7700e6);
	transform: translateY(-2px);
	box-shadow: 0 0 15px rgba(153, 0, 204, 0.7);
}

button:disabled {
	background: linear-gradient(135deg, #666, #444);
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* 禁用狀態下不顯示彩色邊框 */
button:disabled:before {
	display: none;
}

.deck-container {
	position: relative;
	width: 140px;
	height: 220px;
	margin: 30px auto;
	perspective: 1000px;
}

.deck {
	width: 100%;
	height: 100%;
	background-image: url('tarot-back.jpg');
	background-size: cover;
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(153, 0, 204, 0.5);
	position: relative;
	transform-style: preserve-3d;
	transition: transform 0.6s;
}

.deck:after {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background-image: url('tarot-back.jpg');
	background-size: cover;
	border-radius: 10px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	transform: translateZ(-1px);
}

.deck.shuffling {
	animation: shuffle 1.5s ease-in-out;
}

@keyframes shuffle {
	0%, 100% { transform: rotateY(0) translateX(0); }
	25% { transform: rotateY(15deg) translateX(20px); }
	50% { transform: rotateY(-15deg) translateX(-20px); }
	75% { transform: rotateY(5deg) translateX(10px); }
}

.deck.cutting {
	animation: cut 1s ease-in-out;
}

@keyframes cut {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-30px) translateX(30px) rotateZ(5deg); }
}

/* 抽牌區域和選定區域 */
.cards-section {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.selected-cards-area {
	min-height: 120px;
	background-color: rgba(40, 40, 70, 0.5);
	border-radius: 10px;
	padding: 15px;
	margin-bottom: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	border: 1px solid rgba(153, 0, 204, 0.3);
}

.cards-container {
	height: 50vh;
	max-height: 300px;
	overflow: hidden;
	position: relative;
	margin: 20px 0;
}

/* 扇形抽牌區域相關樣式 */
.fan-draw-area {
	position: relative;
	width: 100%;
	height: 100%;
	margin: 0 auto;
}

.fan-card {
	width: 40px;
	height: 60px;
	background-image: url('tarot-back.jpg');
	background-size: cover;
	border-radius: 5px;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(153, 0, 204, 0.3);
	position: absolute;
	left: 50%;
		transform-origin: center bottom;
	z-index: 1;
	touch-action: manipulation;
	transition: transform 0.2s;
}

.fan-card:active {
	transform: scale(1.1) !important;
}

.fan-card.selected {
	opacity: 0.5;
	pointer-events: none;
}

.draw-progress {
	background-color: rgba(20, 20, 40, 0.8);
	padding: 10px;
	border-radius: 8px;
	margin: 10px 0;
	color: #cc99ff;
	font-weight: bold;
	border: 1px solid rgba(153, 0, 204, 0.3);
	text-shadow: 
        -1px -1px 0 #3a0066,
        1px -1px 0 #3a0066,
        -1px 1px 0 #3a0066,
        1px 1px 0 #3a0066;
    letter-spacing: 1px;
    font-size: 20px;
}

/* 選定卡片樣式 */
.selected-card {
	width: 70px;
	height: 110px;
	background-image: url('tarot-back.jpg');
	background-size: cover;
	border-radius: 8px;
	box-shadow: 0 3px 8px rgba(153, 0, 204, 0.5);
	transition: transform 0.3s;
}

.selected-card.reversed {
	transform: rotate(180deg);
}

.selected-card.upright {
	transform: rotate(0deg);
}

/* 結果頁面樣式 */
.loading-text {
	margin: 40px 0;
	color: #cc99ff;
	font-size: 20px;
	animation: pulse 1.5s infinite;
	text-shadow: 
        -1px -1px 0 #3a0066,
        1px -1px 0 #3a0066,
        -1px 1px 0 #3a0066,
        1px 1px 0 #3a0066;
    letter-spacing: 1px;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

.result-content {
    background-color: rgba(40, 40, 70, 0.7);
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    margin: 20px auto;
    border: 1px solid rgba(153, 0, 204, 0.3);
    max-width: 90%;
	min-width: auto;  /* 根據需求調整 */
    width: -moz-fit-content;
    width: -webkit-fit-content;
    width: fit-content;	
    box-sizing: border-box;
}

.result-header {
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid rgba(153, 0, 204, 0.3);
}

.result-reading {
	line-height: 1.6;
}

.result-reading h3 {
	color: #cc99ff;
	margin-bottom: 10px;
}

.message {
	padding: 10px;
	border-radius: 8px;
	margin-top: 10px;
	font-size: 14px;
	transition: opacity 0.3s;
}

.message.success {
	background-color: rgba(46, 204, 113, 0.2);
	color: #2ecc71;
	border: 1px solid rgba(46, 204, 113, 0.5);
}

.message.error {
	background-color: rgba(231, 76, 60, 0.2);
	color: #e74c3c;
	border: 1px solid rgba(231, 76, 60, 0.5);
}

/* 修改 processMessage 樣式 */
.process-message {
	background-color: rgba(40, 40, 70, 0.8);
	padding: 15px;
	border-radius: 10px;	
	margin: 20px auto;  /* 上下間距 20px，左右自動居中 */
	color: #ffcc00; /* 改為金黃色 */
	font-size: 18px; /* 加大字體 */
	font-weight: bold; /* 加粗 */
	border: 2px solid transparent; /* 透明邊框，用於漸變 */
	position: relative;
	box-shadow: 0 0 15px rgba(153, 0, 204, 0.6);
	animation: messageGlow 2s infinite;
	display: inline-block;
	width: fit-content;
	min-width: 150px;  /* 根據需求調整 */
    max-width: 90%;    /* 確保在小螢幕上不會溢出 */
	padding: 15px 25px;  /* 上下 15px，左右 25px */
	box-sizing: border-box;
}

.process-message.fade-in {
    animation: 
        fadeIn 0.8s ease-out forwards,
        messageGlow 2s infinite;
}

/* 彩色邊框動畫 */
@keyframes messageGlow {
	0% { border-color: #ff00ff; box-shadow: 0 0 10px rgba(255, 0, 255, 0.7); }
	33% { border-color: #00ccff; box-shadow: 0 0 10px rgba(0, 204, 255, 0.7); }
	66% { border-color: #ffcc00; box-shadow: 0 0 10px rgba(255, 204, 0, 0.7); }
	100% { border-color: #ff00ff; box-shadow: 0 0 10px rgba(255, 0, 255, 0.7); }
}

/* 自適應佈局樣式 */
.selected-cards-grid {
	display: flex;
	flex-direction: row;
	gap: 10px;
	justify-content: center;
	width: 100%;
	margin-bottom: 20px;
}

.card-position {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 5px;
}

.position-label {
	margin-bottom: 5px;
	font-size: 20px;
	color: #cc99ff;
	text-shadow: 
        -1px -1px 0 #3a0066,
        1px -1px 0 #3a0066,
        -1px 1px 0 #3a0066,
        1px 1px 0 #3a0066;
    letter-spacing: 1px;
}

.card-container {
	width: 70px;
	height: 110px;
	border: 1px dashed rgba(153, 0, 204, 0.3);
	border-radius: 8px;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all 0.3s ease;
}

/* 序號輸入區域樣式 */
.serial-input-container {
	margin: 20px auto;
	max-width: 500px;
}

.serial-input-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

#serialNumber {
	flex: 1;
	margin: 0;
}

.serial-buttons {
	display: flex;
	gap: 10px;
}

.get-serial-btn {
	background: linear-gradient(135deg, #00a651, #008c44);
}

.get-serial-btn:hover {
	background: linear-gradient(135deg, #00bf5f, #00a651);
}

/* 半透明自適應底框樣式 */
.transparent-background {
	background-color: rgba(20, 20, 40, 0.6);
	backdrop-filter: blur(5px);
	border-radius: 15px;
	padding: 30px;
	margin: 20px auto;
	max-width: 90%;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 新增問題輸入標籤樣式 */
.question-label {
	background-color: rgba(30, 30, 60, 0.3); /* 半透明背景 */
	font-size: 24px;
	font-weight: bold;
	color: #ffffff;
	margin: 20px 0 10px;
	padding: 15px;
	position: relative;
	display: inline-block;
	text-shadow: 0 0 10px #ff00ff, 0 0 15px #9900cc;
}

.question-label:before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border: 3px solid transparent;
	border-radius: 10px;
	background: linear-gradient(45deg, #ff00ff, #00ccff, #ffcc00, #ff00ff) border-box;
	-webkit-mask: 
		linear-gradient(#fff 0 0) padding-box, 
		linear-gradient(#fff 0 0);
	-webkit-mask-composite: destination-out;
	mask-composite: exclude;
	animation: questionBorderAnimation 3s linear infinite;
	z-index: -1;
}

.email-label {
	background-color: rgba(30, 30, 60, 0.3); /* 半透明背景 */
	font-size: 24px;
	font-weight: bold;
	color: #ffffff;
	margin: 20px 0 10px;
	padding: 15px;
	position: relative;
	display: inline-block;
	text-shadow: 0 0 10px #ff00ff, 0 0 15px #9900cc;
}

.email-label:before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border: 3px solid transparent;
	border-radius: 10px;
	background: linear-gradient(45deg, #ff00ff, #00ccff, #ffcc00, #ff00ff) border-box;
	-webkit-mask: 
		linear-gradient(#fff 0 0) padding-box, 
		linear-gradient(#fff 0 0);
	-webkit-mask-composite: destination-out;
	mask-composite: exclude;
	animation: questionBorderAnimation 3s linear infinite;
	z-index: -1;
}

/* 現有的音量控制按鈕樣式 */
.audio-control {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background-color: rgba(40, 40, 70, 0.7);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	z-index: 1000;
	box-shadow: 0 0 10px rgba(153, 0, 204, 0.5);
	border: 1px solid rgba(153, 0, 204, 0.3);
	transition: all 0.3s;
}

.audio-control:hover {
	transform: scale(1.1);
	box-shadow: 0 0 15px rgba(153, 0, 204, 0.7);
}

.audio-control:active {
	transform: scale(0.9);
	transition: transform 0.1s;
}

.audio-control i {
	color: #cc99ff;
	font-size: 20px;
}

@keyframes questionBorderAnimation {
	0% { background-position: 0% 0%; }
	100% { background-position: 300% 0%; }
}

/* 媽祖抽籤相關樣式 */
.matsu-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto;
}

.matsu-stick-container {
    width: 200px;
    height: 300px;
    background-color: rgba(40, 40, 70, 0.7);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(153, 0, 204, 0.5);
    border: 1px solid rgba(153, 0, 204, 0.3);
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
}

.matsu-sticks {
    width: 180px;
    height: auto;
    transition: transform 0.3s;
}

.matsu-sticks:hover {
    transform: scale(1.05);
}

.matsu-sticks:active {
    transform: scale(0.95);
}

.matsu-stick-result {
    background-color: rgba(40, 40, 70, 0.7);
    padding: 15px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 300px;
    border: 1px solid rgba(153, 0, 204, 0.3);
}

.stick-number {
    font-size: 24px;
    color: #ffcc00;
    font-weight: bold;
    text-shadow: 0 0 5px #9900cc;
}

/* 擲筊相關樣式 */
.cup-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto;
}

.cup-area {
    width: 300px;
    height: 200px;
    background-color: rgba(40, 40, 70, 0.7);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(153, 0, 204, 0.5);
    border: 1px solid rgba(153, 0, 204, 0.3);
    transition: all 0.3s;
    padding: 20px;
}

.cup {
    width: 80px;
    height: 40px;
    background-color: #8b4513;
    border-radius: 40px 40px 5px 5px;
    position: relative;
    transition: transform 0.3s;
}

.cup:before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    height: 20px;
    background-color: #a0522d;
    border-radius: 40px 40px 0 0;
}

.cup-area.throwing .cup {
    animation: throwCup 0.5s ease-in-out;
}

@keyframes throwCup {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-50px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

.cup-result-text {
    font-size: 20px;
    color: #cc99ff;
    margin: 15px 0;
    font-weight: bold;
    text-shadow: 0 0 5px #3a0066;
}

.cup-result-history {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.cup-result-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
}

.cup-result-item.sacred {
    background-color: #ffcc00;
    color: #3a0066;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.cup-result-item.laugh {
    background-color: #cc99ff;
    color: #3a0066;
    box-shadow: 0 0 10px rgba(204, 153, 255, 0.7);
}

.cup-result-item.none {
    background-color: #6600cc;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(102, 0, 204, 0.7);
}

/* 在小螢幕上調整底框樣式 */
@media (max-width: 768px) {
	.transparent-background {
		padding: 20px;
		margin: 10px auto;
		max-width: 95%;
	}
	.audio-control {
		bottom: 60px;
		right: 15px;
		width: 36px;
		height: 36px;
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
    
    .matsu-stick-container {
        width: 150px;
        height: 250px;
    }
    
    .matsu-sticks {
        width: 130px;
    }
    
    .cup-area {
        width: 250px;
        height: 150px;
        gap: 20px;
    }
    
    .cup {
        width: 60px;
        height: 30px;
    }
}

/* 媒體查詢 - 針對不同螢幕尺寸 */
@media (max-width: 480px) and (orientation: portrait) {
	.selected-cards-grid {
		flex-direction: row;
		flex-wrap: nowrap;
	}
	
	.card-container {
		width: 60px;
		height: 90px;
	}
	
	.selected-card {
		width: 60px;
		height: 90px;
	}
	
	.fan-card {
		width: 20px;
		height: 30px;
	}
	
	h1 {
		font-size: 28px;
	}
	
	button {
		padding: 10px 20px;
		font-size: 14px;
	}
	
	.audio-control {
		bottom: 60px;
		right: 15px;
		width: 36px;
		height: 36px;
	}
	
	.audio-control i {
		font-size: 18px;
	}
	
	.audio-control {
		bottom: 60px;
		right: 15px;
		width: 36px;
		height: 36px;
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
    
    .matsu-stick-container {
        width: 120px;
        height: 200px;
    }
    
    .matsu-sticks {
        width: 100px;
    }
    
    .cup-area {
        width: 200px;
        height: 120px;
        gap: 15px;
    }
    
    .cup {
        width: 50px;
        height: 25px;
    }
}

@media (max-width: 360px) and (orientation: portrait) {
	.selected-cards-grid {
		flex-direction: row;
		flex-wrap: nowrap;
	}
	
	.card-container {
		width: 50px;
		height: 80px;
	}
	
	.selected-card {
		width: 50px;
		height: 80px;
	}
	
	.fan-card {
		width: 15px;
		height: 25px;
	}
	
	h1 {
		font-size: 24px;
	}
	
	button {
		padding: 8px 16px;
		font-size: 14px;
		margin: 5px;
	}
	
	.process-message, .draw-progress {
		display: inline-block;
		font-size: 14px;
		padding: 8px;
	}
	
	.audio-control {
		bottom: 60px;
		right: 15px;
		width: 36px;
		height: 36px;
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
	
	.audio-control i {
		font-size: 16px;
	}
    
    .matsu-stick-container {
        width: 100px;
        height: 180px;
    }
    
    .matsu-sticks {
        width: 80px;
    }
    
    .cup-area {
        width: 180px;
        height: 100px;
        gap: 10px;
    }
    
    .cup {
        width: 40px;
        height: 20px;
    }
}

/* 洗牌和切牌區域 */
.tarot-deck, .cut-deck {
	width: 140px;
	height: 220px;
	background-image: url('tarot-back.jpg');
	background-size: cover;
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(153, 0, 204, 0.5);
	margin: 30px auto;
	cursor: pointer;
	transition: transform 0.3s;
}

.tarot-deck:hover, .cut-deck:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(153, 0, 204, 0.7);
}

.instruction {
	color: #cc99ff;
	margin: 20px 0;
	font-size: 18px;
	text-shadow: 
        -1px -1px 0 #3a0066,
        1px -1px 0 #3a0066,
        -1px 1px 0 #3a0066,
        1px 1px 0 #3a0066;
    letter-spacing: 1px;
}

#remainingCount {
	background-color: rgba(20, 20, 40, 0.7);
	padding: 8px 15px;
	border-radius: 20px;
	display: inline-block;
	margin: 10px 0;
	font-size: 14px;
	color: #cc99ff;
	border: 1px solid rgba(153, 0, 204, 0.3);
}

.serial-container {
	background-color: rgba(40, 40, 70, 0.7);
	padding: 20px;
	border-radius: 10px;
	margin-top: 30px;
	border: 1px solid rgba(153, 0, 204, 0.3);
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.serial-container h3 {
	color: #cc99ff;
	margin-top: 0;
}

.serial-input {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

/* YouTube 影片容器樣式 - 修改為寬版時不滿版 */
.youtube-container {
	width: 100%;
	max-width: 600px;
	margin: 20px auto;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 0 15px rgba(153, 0, 204, 0.5);
	border: 1px solid rgba(153, 0, 204, 0.3);
}

.youtube-container iframe {
	width: 100%;
	height: 225px; /* 16:9 比例 */
	border: none;
}

/* 首頁內容容器 - 新增 */
.home-content {
	max-width: 600px;
	margin: 0 auto;
}

/* 按鈕容器樣式 - 新增 */
.buttons-container {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 15px 0;
}

/* 首頁按鈕樣式 - 修正 */
.home-button {
	display: inline-block;
	background-color: rgba(153, 0, 204, 0.7);
	color: white;
	text-decoration: none;
	padding: 10px 20px;
	border-radius: 30px;
	font-weight: bold;
	transition: all 0.3s;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 0 10px rgba(153, 0, 204, 0.5);
	flex: 1;
	min-width: 120px;
	max-width: 200px;
}

/* LINE按鈕樣式 - 新增 */
.line-button {
	display: inline-block;
	background-color: rgba(0, 185, 0, 0.7); /* LINE綠色 */
	color: white;
	text-decoration: none;
	padding: 10px 20px;
	border-radius: 30px;
	font-weight: bold;
	transition: all 0.3s;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 0 10px rgba(0, 185, 0, 0.5);
	flex: 1;
	min-width: 120px;
	max-width: 200px;
}

.home-button:hover {
	background-color: rgba(153, 0, 204, 0.9);
	transform: translateY(-3px);
	box-shadow: 0 5px 15px rgba(153, 0, 204, 0.7);
}

.line-button:hover {
	background-color: rgba(0, 185, 0, 0.9);
	transform: translateY(-3px);
	box-shadow: 0 5px 15px rgba(0, 185, 0, 0.7);
}

/* 常用問題按鈕容器 */
.common-questions-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 20px 0;
}

/* 常用問題按鈕樣式 */
.common-question-btn {
	background: linear-gradient(135deg, #6600cc, #9900cc);
	color: white;
	border: none;
	padding: 12px 20px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	text-align: left;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	box-shadow: 0 3px 10px rgba(102, 0, 204, 0.3);
}

.common-question-btn i {
	margin-right: 10px;
	font-size: 16px;
}

.common-question-btn:hover {
	background: linear-gradient(135deg, #7700e6, #b300e6);
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(102, 0, 204, 0.5);
}

/* 針對小螢幕的常用問題按鈕樣式 */
@media (max-width: 480px) {
	.common-question-btn {
		font-size: 12px;
		padding: 10px 15px;
	}
	
	.common-question-btn i {
		font-size: 14px;
		margin-right: 8px;
	}
}

/* 新增進場動畫相關媒體查詢 */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        animation: none;
        opacity: 1;
    }
}

