
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Sans:wght@300;400;500;700&display=swap');

:root {
	--primary-color: #1E88E5;
	--secondary-color: #4CAF50;
	--accent-color: #FF9800;
	--dark-color: #263238;
	--light-color: #ECEFF1;
	--danger-color: #F44336;
	--success-color: #4CAF50;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
	color: var(--dark-color);
}


.language-dropdown {
	position: relative;
	display: inline-block;
}

.language-dropdown-content {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	background-color: white;
	min-width: 160px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	z-index: 1;
	padding: 8px 0;
}

.language-dropdown:hover .language-dropdown-content {
	display: block;
}

/* 添加这行来解决Safari兼容性问题 */
/* 为Safari和移动设备添加更稳定的解决方案 */
.language-dropdown.active .language-dropdown-content,
.language-dropdown:focus-within .language-dropdown-content {
	display: block;
}
.language-option {
	display: flex;
	align-items: center;
	padding: 8px 16px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.language-option:hover {
	background-color: #f3f4f6;
}

.language-option img {
	width: 20px;
	height: 20px;
	margin-right: 8px;
	border-radius: 50%;
}

.hero-section {
	/*background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');*/
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.btn-primary {
	background-color: var(--primary-color);
	color: white;
	transition: all 0.3s ease;
}

.btn-primary:hover {
	background-color: #1565C0;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
	background-color: var(--secondary-color);
	color: white;
	transition: all 0.3s ease;
}

.btn-secondary:hover {
	background-color: #388E3C;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-accent {
	background-color: var(--accent-color);
	color: white;
	transition: all 0.3s ease;
}

.btn-accent:hover {
	background-color: #F57C00;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card {
	transition: all 0.3s ease;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.progress-bar {
	background-color: var(--secondary-color);
}

.nav-link {
	position: relative;
	transition: all 0.3s ease;
}

.nav-link::after {
	content: '';
	position: absolute;
	width: 0;
	height: 2px;
	bottom: -2px;
	left: 0;
	background-color: var(--primary-color);
	transition: width 0.3s ease;
}

.nav-link:hover::after {
	width: 100%;
}

.active-nav::after {
	width: 100%;
}

.currency-card {
	border: 1px solid #E0E0E0;
	border-radius: 8px;
	padding: 1rem;
	transition: all 0.3s ease;
	cursor: pointer;
}

.currency-card:hover {
	border-color: var(--primary-color);
	box-shadow: 0 4px 8px rgba(30, 136, 229, 0.1);
}

.currency-card.selected {
	border-color: var(--primary-color);
	background-color: rgba(30, 136, 229, 0.05);
}

.donation-step {
	display: none;
}

.donation-step.active {
	display: block;
	animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.step-indicator {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: #E0E0E0;
	color: #757575;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 0.5rem;
	transition: all 0.3s ease;
}

.step-indicator.active {
	background-color: var(--primary-color);
	color: white;
}

.step-line {
	flex: 1;
	height: 2px;
	background-color: #E0E0E0;
	transition: all 0.3s ease;
}

.step-line.active {
	background-color: var(--primary-color);
}

.modal {
	/*display: none;*/
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	animation: fadeIn 0.3s ease;
}

.modal-content {
	background-color: white;
	border-radius: 8px;
	width: 90%;
	max-width: 500px;
	margin: 10% auto;
	padding: 2rem;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		transform: translateY(-50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.close {
	float: right;
	font-size: 1.6rem;
	cursor: pointer;
	/*font-weight: bold;*/
	color: #757575;
}

.close:hover {
	color: var(--dark-color);
}

.comment-form textarea {
	resize: none;
}

.comment {
	border-bottom: 1px solid #E0E0E0;
	padding: 1rem 0;
}

.comment:last-child {
	border-bottom: none;
}

.comment-reply {
	margin-left: 2rem;
	border-left: 3px solid #E0E0E0;
	padding-left: 1rem;
}

.search-bar {
	transition: all 0.3s ease;
}

.search-bar:focus {
	box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.25);
}

.language-dropdown {
	position: relative;
}

/*.language-dropdown-content {*/
/*	display: none;*/
/*	position: absolute;*/
/*	top: 100%;*/
/*	right: 0;*/
/*	background-color: white;*/
/*	min-width: 160px;*/
/*	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);*/
/*	border-radius: 8px;*/
/*	z-index: 1;*/
/*	padding: 8px 0;*/
/*}*/
/*.language-dropdown:hover .language-dropdown-content {*/
/*	display: block;*/
/*}*/

/*!* 添加这行来解决Safari兼容性问题 *!*/
/*.language-dropdown:focus-within .language-dropdown-content {*/
/*	display: block;*/
/*}*/

.language-dropdown-content {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	background-color: white;
	min-width: 160px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	z-index: 1001; /* 提高z-index确保在最上层 */
	padding: 8px 0;
}

/* 使用.active类来控制显示 */
.language-dropdown.active .language-dropdown-content {
	display: block;
}

/* 保留focus-within作为辅助 */
.language-dropdown:focus-within .language-dropdown-content {
	display: block;
}
.language-option {
	display: flex;
	align-items: center;
	padding: 8px 16px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.language-option:hover {
	background-color: #f3f4f6;
}

.language-option img {
	width: 20px;
	height: 20px;
	margin-right: 8px;
	border-radius: 50%;
}

/* Dark mode styles */
.dark-mode {
	background-color: #121212;
	color: #E0E0E0;
}

.dark-mode .bg-white {
	background-color: #1E1E1E;
}

.dark-mode .text-gray-800 {
	color: #E0E0E0;
}

.dark-mode .border {
	border-color: #333;
}

.dark-mode .shadow-lg {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.dark-mode .card {
	background-color: #1E1E1E;
}

.dark-mode .input-field {
	background-color: #2D2D2D;
	color: #E0E0E0;
	border-color: #333;
}

.dark-mode .input-field:focus {
	border-color: var(--primary-color);
}

/* Responsive styles */
@media (max-width: 768px) {
	.desktop-nav {
		display: none;
	}

	.mobile-nav {
		display: block;
	}
}

@media (min-width: 769px) {
	.desktop-nav {
		display: flex;
	}

	.mobile-nav {
		display: none;
	}
}

/* Loading animation */
.loading {
	display: inline-block;
	width: 30px;
	height: 30px;
	border: 3px solid rgba(30, 136, 229, 0.3);
	border-radius: 50%;
	border-top-color: var(--primary-color);
	animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* RTL support */
[dir="rtl"] .ml-auto {
	margin-right: auto;
	margin-left: 0 !important;
}

[dir="rtl"] .mr-auto {
	margin-left: auto;
	margin-right: 0 !important;
}

[dir="rtl"] .text-right {
	text-align: left;
}

[dir="rtl"] .text-left {
	text-align: right;
}

[dir="rtl"] .step-indicator {
	margin: 0 0.5rem;
}

[dir="rtl"] .comment-reply {
	margin-right: 2rem;
	margin-left: 0;
	border-right: 3px solid #E0E0E0;
	border-left: none;
	padding-right: 1rem;
	padding-left: 0;
}

.language-dropdown button {
	border: none;
	background: transparent;
	cursor: pointer;
}

.mobile-nav.active {
	display: block;
}
/* 优化弹窗在小屏幕上的显示 */
.modal-content {
	background-color: white;
	border-radius: 8px;
	width: 90%;
	max-width: 500px;
	margin: 5% auto;
	padding: 1.5rem;
	animation: slideIn 0.3s ease;
	max-height: 85vh;
	overflow-y: auto;
	position: relative;
}

/* 大弹窗的特殊样式 */
.modal-content.max-w-4xl {
	max-width: 800px;
	max-height: 90vh;
}

/* 弹窗内容区域滚动 */
.modal-body {
	max-height: calc(85vh - 120px);
	overflow-y: auto;
	padding-right: 5px;
}

/* 大弹窗的内容区域 */
.modal-content.max-w-4xl .modal-body {
	max-height: calc(90vh - 120px);
}

/* 自定义滚动条样式 */
.modal-content::-webkit-scrollbar {
	width: 6px;
}

.modal-content::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

/* 弹窗关闭按钮定位优化 */
.modal-content .close {
	position: absolute;
	top: 15px;
	right: 20px;
	z-index: 10;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
}

/* 弹窗标题固定 */
.modal-header {
	position: sticky;
	top: 0;
	background: white;
	z-index: 5;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e5e5e5;
}

/* 弹窗底部按钮固定 */
.modal-footer {
	position: sticky;
	bottom: 0;
	background: white;
	z-index: 5;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e5e5e5;
}

/* 捐赠步骤指示器在小屏幕上的优化 */
@media (max-width: 640px) {
	.step-indicator {
		width: 25px;
		height: 25px;
		font-size: 0.875rem;
	}

	.step-line {
		margin: 0 0.25rem;
	}
}

/* 货币选择网格在小屏幕上的优化 */
@media (max-width: 640px) {
	.currency-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0.5rem !important;
	}
}

/* 表单元素在小屏幕上的优化 */
@media (max-width: 640px) {
	.modal-content {
		margin: 2% auto;
		padding: 1rem;
		width: 95%;
		max-height: 96vh;
	}

	.modal-content.max-w-4xl {
		margin: 1% auto;
		max-height: 98vh;
	}

	.donation-step {
		padding: 0.5rem;
	}

	.grid-cols-2 {
		grid-template-columns: 1fr !important;
		gap: 0.75rem !important;
	}

	.flex.justify-between {
		/*flex-direction: column;*/
		/*gap: 0.75rem;*/
	}

	.flex.justify-between button {
		/*width: 100%;*/
	}
}

/* 项目详情弹窗在小屏幕上的优化 */
@media (max-width: 768px) {
	.modal-content.max-w-4xl .grid-cols-1.md\\:grid-cols-2 {
		grid-template-columns: 1fr !important;
	}

	.modal-content.max-w-4xl .grid-cols-1.md\\:grid-cols-3 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
	.modal-content {
		padding: 0.75rem;
		border-radius: 4px;
	}

	.modal-content .close {
		top: 10px;
		right: 15px;
		width: 25px;
		height: 25px;
		font-size: 1rem;
	}

	h2.text-2xl {
		font-size: 1.5rem;
	}

	h3.text-xl {
		font-size: 1.25rem;
	}

	.text-lg {
		font-size: 1rem;
	}
}

/* 暗色模式下的弹窗样式 */
.dark-mode .modal-content {
	background-color: #1E1E1E;
	color: #E0E0E0;
}

.dark-mode .modal-header {
	background: #1E1E1E;
	border-bottom-color: #333;
}

.dark-mode .modal-footer {
	background: #1E1E1E;
	border-top-color: #333;
}

.dark-mode .modal-content::-webkit-scrollbar-track {
	background: #2D2D2D;
}

.dark-mode .modal-content::-webkit-scrollbar-thumb {
	background: #555;
}

.dark-mode .modal-content::-webkit-scrollbar-thumb:hover {
	background: #666;
}

.dark-mode .modal-content .close {
	background: rgba(30, 30, 30, 0.9);
	color: #E0E0E0;
}
.fas22{ color: orangered;}

/* 复制成功提示样式 */
#copy-toast {
	z-index: 9999;
	pointer-events: none;
	transition: all 0.3s ease;
}

/* 确保模态框中的复制按钮样式正确 */
.modal-content button:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

/* 提高输入框的可复制性 */
#wallet-address-input {
	cursor: text;
	user-select: all;
}

#wallet-address-input:focus {
	outline: none;
}
