body {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer */
    user-select: none;
    -webkit-touch-callout: none; /* 禁用长按菜单 */
	touch-action: manipulation; /* Disable double-tap zoom */
}

/* General readonly input style for all input fields */
input[readonly], textarea[readonly], select[readonly] {
    background-color: #f7fafc; /* Light gray background */
    color: #4a4a4a; /* Dark text color */
    border: 1.5px solid #cbd5e0; /* Subtle border color */
    cursor: not-allowed; /* Change cursor to indicate it's readonly */
}

select {
    /* 1. Remove default iOS styling */
    -webkit-appearance: none;
    appearance: none;

    /* 2. Set your white background */
    background-color: #ffffff;

    /* 3. Add a custom arrow icon */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;

    /* 4. Add padding to prevent text from going under the new arrow */
    padding: 8px 30px 8px 10px; /* Top/Right/Bottom/Left */

    /* 5. Optional: Add your own border */
    border: 1px solid #ccc;
    border-radius: 4px;
}

.backbtn {
    cursor: pointer;
    color: #333;
}

.backbtn:hover {
    color: var(--primary-color);
}

/* 添加蓝色三行图标样式 */
.home-menu-toggle-btn {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 40;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	border-radius: 0.375rem;
}

.page-menu-toggle-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	border-radius: 0.375rem;
}

#menu-toggle-btn:hover {
	background-color: rgba(74, 111, 165, 0.1);
}

.three-line-icon {
	width: 20px;
	height: 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.three-line-icon span {
	display: block;
	height: 3px;
	width: 100%;
	background-color: #ccc; /* 蓝色 */
	border-radius: 1.5px;
	transition: all 0.3s ease;
}

.three-line-icon span:nth-child(1) {
	width: 100%;
}

.three-line-icon span:nth-child(2) {
	width: 80%;
	margin-left: 20%;
}

.three-line-icon span:nth-child(3) {
	width: 60%;
	margin-left: 40%;
}

#fullscreen-ad .bg-gradient-to-br {
	width: 100%;
	height: 250px; /* Default height for mobile */
}
		
#floating-ad {
	width: auto; /* Adjust as needed */
}

@media (max-width: 768px) {
	#floating-ad {
		bottom: 10px; /* Increased spacing for mobile */
		right: 10px;  /* Increased spacing for mobile */
	}
}


@media (min-width: 769px) {
	#fullscreen-ad .bg-gradient-to-br {
		height: 400px; /* Adjust to desired height for larger ads */
	}
}

/* pop-up modal */
.modal-show {
	transform: scale(100) !important;
	opacity: 1 !important;
}

.modal-success .modal-icon {
	color: #10b981;
}

.modal-error .modal-icon {
	color: #ef4444;
}

.modal-warning .modal-icon {
	color: #f59e0b;
}

.modal-info .modal-icon {
	color: #3b82f6;
}

/* 三點圖標菜單樣式 */
.more-options-btn {
	width: 40px;
	height: 40px;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.more-options-btn:hover {
	background: #f3f4f6;
	transform: rotate(90deg);
}

/* 更多選單樣式 */
.dropdown-menu {
	position: absolute;
	top: 0;
	right: 0;
	background: white;
	border-radius: 0.5rem;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	min-width: 180px;
	z-index: 10;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s ease;
}

.dropdown-menu.active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dropdown-item {
	padding: 0.75rem 1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
	transition: all 0.2s ease;
	color: #374151;
}

.dropdown-item:hover {
	background: #f3f4f6;
}

.dropdown-item.delete:hover {
	color: #ef4444;
	background: #fef2f2;
}

#cookie-notification {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 1000; /* Ensures it is above all other content */
}

/* 儲存按鈕容器 */
.save-btn-container {
	position: relative;
	margin-top: 2rem;
	padding-top: 1rem;
	min-height: 60px;
	overflow: visible;
}

/* 桌面版儲存按鈕 */
.save-btn-desktop {
	position: absolute;
	padding: 0.75rem 1.5rem;
	background: linear-gradient(135deg, #4a6fa5 0%, #3a5a80 100%);
	color: white;
	font-weight: 600;
	border-radius: 0.5rem;
	transition: all 0.2s ease;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1rem;
	right: 0;
	bottom: 0px;
	z-index: 10;
}

.save-btn-desktop:hover:not(:disabled) {
	background: linear-gradient(135deg, #3a5a80 0%, #2c3e50 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

.save-btn-desktop:active:not(:disabled) {
	transform: translateY(0) scale(0.98);
}

.save-btn-desktop:disabled {
	background: #cbd5e0;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* 移動版儲存按鈕 */
.save-btn-mobile {
	width: 100%;
	padding: 0.5rem;
	background: linear-gradient(135deg, #4a6fa5 0%, #3a5a80 100%);
	color: white;
	font-weight: 600;
	border-radius: 0.5rem;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	font-size: 1.1rem;
	transition: all 0.2s ease;
}

.save-btn-mobile:hover:not(:disabled) {
	background: linear-gradient(135deg, #3a5a80 0%, #2c3e50 100%);
}

.save-btn-mobile:disabled {
	background: #cbd5e0;
	cursor: not-allowed;
}

/* 錯誤訊息 */
.error-message {
	color: #e53e3e;
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

/* 成功訊息 */
.success-message {
	color: #38a169;
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

/* 表單輸入錯誤樣式 */
.border-red-500 {
	border-color: #e53e3e !important;
}

/* 自定義表單樣式 */
.form-input, .form-textarea, .form-select {
	border: 1.5px solid #e2e8f0;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
	width: 100%;
	font-size: 1rem;
	transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
	outline: none;
	border-color: #4a6fa5;
	box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.form-textarea {
	min-height: 200px;
	resize: vertical;
}

.form-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #2c3e50;
}

.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 頁頭樣式 */
.page-header-wrapper {
    position: relative;
}

/* 移动端广告 */
.mobile-ad {
	display: block !important;
	min-height: 100px;
	max-width: 320px;
	margin: 0 auto;
}

/* 桌面端广告 */
.desktop-ad {
	display: none !important;
	min-height: 90px;
	max-width: 728px;
	margin: 0 auto;
}

/* 广告容器样式 */
.ad-container {
	width: 100%;
	margin: 1.5rem 0;
	text-align: center;
	page-break-inside: avoid;
}

/* 广告占位符 */
.ad-placeholder {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: loading 1.5s infinite;
	border-radius: 0.5rem;
	padding: 1rem;
	margin-bottom: 0.5rem;
	min-height: 90px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.display-avatar-placeholder
{
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	color: #FFF;
}

/* 响应式设计 */
@media (min-width: 768px) {
	.mobile-ad {
		display: none !important;
	}
	
	.desktop-ad {
		display: block !important;
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 脈衝動畫 */
.pulse-animation {
	animation: pulse 1s infinite ease-in-out;
}

@keyframes pulse {
	0% {
		transform: scale(1);
		opacity: 0.8;
	}
	50% {
		transform: scale(1.3);
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 0.8;
	}
}