/* ===========================
   全站样式总入口（已迁移到 style 目录）
   说明：
   1) 详情页（template.php / currency.php）样式
   2) 首页（index.php）补充样式
   =========================== */

/* ===========================
   A. 页面头部与主容器
   =========================== */
/* 页面头部 - 通用样式 */
.header {
	color: #fff;
	padding: 30px 0;
	text-align: center;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	position: relative;
	overflow: hidden;
}

/* 汇率页面头部 - 蓝色渐变 */
body.huilv-page .header {
	background: linear-gradient(135deg, #4A90E2 0%, #357ABD 50%, #2E5B8A 100%);
}

.header h1 {
	margin: 0;
	font-size: 2.8rem;
	font-weight: 400;
}

.header p {
	margin: 15px 0 0 0;
	opacity: 0.9;
	font-size: 1.2rem;
}

/* 主容器 */
.main-container {
	padding: 30px 15px 0px;
	max-width: 1400px;
	margin: 0 auto;
}

/* ===========================
   B. 汇率表格与数据展示
   =========================== */
/* 汇率表格样式 */
.rate-table {
	background: white;
	border: 1px solid #e6e6e6;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	border-radius: 4px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
}

/* 自定义滚动条样式 */
.rate-table::-webkit-scrollbar {
	height: 8px;
}

.rate-table::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.rate-table::-webkit-scrollbar-thumb {
	background: #4A90E2;
	border-radius: 4px;
}

.rate-table::-webkit-scrollbar-thumb:hover {
	background: #357ABD;
}

.rate-table table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.rate-table th {
	background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
	color: white;
	padding: 15px 10px;
	text-align: center;
	font-weight: 600;
	font-size: 0.9rem;
	border: none;
}

.rate-table td {
	padding: 12px 10px;
	text-align: center;
	border-bottom: 1px solid #f0f0f0;
	font-size: 0.9rem;
}

.rate-table tr:hover {
	background-color: #f8f9fa;
}

.rate-table tr:last-child td {
	border-bottom: none;
}

.currency-name {
	font-weight: 500;
	color: #333;
}

.currency-icon {
	width: 24px;
	height: 18px;
	object-fit: contain;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 货币名称链接样式 */
.currency-name a {
	display: inline-flex;
	align-items: center;
	width: 130px;
	text-align: left;
	color: #0053bb;
	white-space: nowrap;
	text-decoration: none;
	gap: 8px;
}

.currency-name a:hover {
	color: #ff5722;
}

.rate-value {
	color: #666;
}

.update-info {
	background: #f8f9fa;
	padding: 15px;
	border-top: 1px solid #e6e6e6;
	text-align: center;
	color: #666;
	font-size: 0.9rem;
}

/* ===========================
   C. 交互区域（搜索、银行信息卡片）
   =========================== */
/* 搜索框样式 */
.search-container {
	margin-bottom: 20px;
	text-align: center;
}

.search-input {
	width: 100%;
	max-width: 400px;
	padding: 10px 15px;
	border: 2px solid #e6e6e6;
	border-radius: 25px;
	font-size: 1rem;
	outline: none;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.search-input:focus {
	border-color: #4A90E2;
	box-shadow: 0 0 10px rgba(74, 144, 226, 0.2);
}

/* 银行信息卡片样式 */
.bank-info-card {
	background: white;
	border: 1px solid #e6e6e6;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	padding: 20px;
	margin: 20px 0;
	position: relative;
}

.bank-info-card::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: linear-gradient(90deg, #4A90E2 0%, #357ABD 100%);
}

.bank-info-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 15px;
	position: relative;
}

.bank-info-left {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
}

.bank-info-logo {
	width: 80px;
	height: 60px;
	object-fit: contain;
	margin-right: 15px;
	flex-shrink: 0;
}

.bank-info-title {
	flex: 1;
	min-width: 0;
}

.bank-info-title h2 {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 600;
	color: #333;
	word-wrap: break-word;
}

.bank-info-service {
	margin: 8px 0 0 0;
	font-size: 0.9rem;
	color: #666;
}

.bank-info-right {
	flex-shrink: 0;
	margin-left: 10px;
}

.bank-info-intro {
	width: 100%;
	font-size: 0.95rem;
	line-height: 1.8;
	color: #555;
	margin-top: 10px;
	padding-top: 15px;
	border-top: 1px solid #f0f0f0;
}

.bank-info-intro strong {
	color: #4A90E2;
	margin-right: 5px;
}

/* 银行信息卡片响应式设计 */
@media screen and (max-width: 768px) {
	.bank-info-card {
		padding: 15px;
	}
	
	.bank-info-top {
		margin-bottom: 15px;
		justify-content: center;
	}
	
	.bank-info-left {
		min-width: 0;
		flex: 0 0 auto;
		justify-content: center;
		margin: 0 auto;
	}
	
	.bank-info-logo {
		width: 60px;
		height: 45px;
		margin-right: 10px;
	}
	
	.bank-info-title h2 {
		font-size: 1.1rem;
		line-height: 1.3;
		text-align: center;
	}
	
	.bank-info-service {
		font-size: 0.8rem;
	}
	
	.bank-info-right {
		margin-left: 8px;
		flex-shrink: 0;
	}
	
	.bank-info-intro {
		font-size: 0.85rem;
		line-height: 1.6;
		margin-top: 15px;
	}
}

/* 卡片顶部装饰条 - 汇率页面 */
body.huilv-page .card-top-bar {
	height: 4px;
	background: linear-gradient(90deg, #4A90E2 0%, #357ABD 100%);
	width: 100%;
}

/* ===========================
   D. 银行链接宫格
   =========================== */
/* 银行链接区域样式 */
.bank-links-section {
	background: #fff;
	padding: 20px 0px;
	margin-top: 20px;
	border: 1px solid #e6e6e6;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bank-links-container {
	max-width: 100%;
	margin: 0 10px;
}

.bank-links-grid {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 10px;
	row-gap: 10px;
}

.bank-link-item {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	transition: all 0.3s ease;
	overflow: hidden;
}

.bank-link-item:hover {
	background: #e9ecef;
	border-color: #4A90E2;
	box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
	transform: translateY(-2px);
}

.bank-link-item a {
	display: flex;
	align-items: center;
	padding: 10px 8px;
	text-decoration: none;
	color: #333;
	height: 100%;
	box-sizing: border-box;
	min-height: 45px;
}

.bank-logo {
	width: 26px;
	height: 18px;
	object-fit: contain;
	margin-right: 6px;
	flex-shrink: 0;
}

.bank-name {
	font-size: 0.85rem;
	font-weight: 500;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

/* 银行链接区域响应式设计 */
@media screen and (max-width: 1200px) {
	.bank-links-grid {
		grid-template-columns: repeat(5, 1fr);
	}
}

@media screen and (max-width: 992px) {
	.bank-links-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media screen and (max-width: 768px) {
	.bank-links-section {
		padding: 20px 0px;
		margin-top: 20px;
	}
	
	.bank-links-title {
		font-size: 1.5rem;
		margin-bottom: 20px;
	}
	
	.bank-links-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
		row-gap: 15px;
	}
	
	.bank-link-item a {
		padding: 12px 10px;
	}
	
	.bank-logo {
		width: 28px;
		height: 20px;
		margin-right: 8px;
	}
	
	.bank-name {
		font-size: 0.85rem;
	}
}

/* ===========================
   E. 页脚与提示状态（加载、错误、涨跌）
   =========================== */
/* 页脚 - 通用样式 */
.footer {
	background: #2c3e50;
	color: #ecf0f1;
	padding: 30px 20px;
	margin-top: 50px;
	text-align: center;
}

/* 汇率页面页脚 */
body.huilv-page .footer {
	border-top: 3px solid #4A90E2;
}

.footer-content {
	max-width: 1200px;
	margin: 0 auto;
}

.disclaimer {
	font-size: 0.95rem;
	margin: 0 0 15px 0;
	padding: 15px;
	text-align: left;
	max-width: 800px;
	margin: 0 auto 15px;
}

/* 汇率页面免责声明 */
body.huilv-page .disclaimer {
	background: rgba(74, 144, 226, 0.1);
	border-left: 3px solid #4A90E2;
}

body.huilv-page .disclaimer strong {
	color: #4A90E2;
}

.disclaimer i {
	margin-right: 5px;
	vertical-align: middle;
}

.copyright {
	font-size: 0.85rem;
	color: #95a5a6;
	margin: 10px 0 0 0;
}

/* 加载动画 */
.loading {
	text-align: center;
	padding: 40px 20px;
	color: #999;
}

/* 错误提示 */
.error-message {
	background: #fff2f0;
	color: #ff4d4f;
	padding: 20px;
	border: 1px solid #ffccc7;
	margin: 20px 10px;
	border-radius: 4px;
	text-align: center;
}

/* 价格涨跌颜色 */
.price-up {
	color: #FF5722;
}

.price-down {
	color: #5FB878;
}

.price-neutral {
	color: #333;
}

/* 最优价格标注 - Safari兼容性优化 */
.rate-table td.rate-value.price-best {
	color: #ff5722 !important;
	font-weight: bold !important;
	-webkit-text-fill-color: #ff5722 !important; /* Safari专用 */
}

/* 确保最优价格标注不被动画覆盖 */
.rate-table td.rate-value.price-best.price-up,
.rate-table td.rate-value.price-best.price-down {
	color: #ff5722 !important;
	-webkit-text-fill-color: #ff5722 !important;
}

/* 最优买入价行的背景色 - 浅绿色背景 */
.rate-table tr.row-best-buy {
	background-color: #f0f9f5 !important;
}

.rate-table tr.row-best-buy:hover {
	background-color: #e0f4ea !important;
}

/* 最优卖出价行的背景色 - 浅蓝色背景 */
.rate-table tr.row-best-sell {
	background-color: #f0f7ff !important;
}

.rate-table tr.row-best-sell:hover {
	background-color: #e0efff !important;
}

/* 同时拥有两种最优价格的行 - 浅紫色背景 */
.rate-table tr.row-best-buy.row-best-sell {
	background-color: #f5f0ff !important;
}

.rate-table tr.row-best-buy.row-best-sell:hover {
	background-color: #eae0ff !important;
}

/* 价格闪烁动画 */
.price-flash-up {
	animation: flashUp 0.5s ease-in-out;
}

.price-flash-down {
	animation: flashDown 0.5s ease-in-out;
}

@keyframes flashUp {
	0% { background-color: #fff; }
	50% { background-color: #FF5722; color: white; }
	100% { background-color: #fff; }
}

@keyframes flashDown {
	0% { background-color: #fff; }
	50% { background-color: #5FB878; color: white; }
	100% { background-color: #fff; }
}

/* ===========================
   F. 响应式适配（移动端）
   =========================== */
/* 响应式设计 - 移动端适配 */
@media screen and (max-width: 768px) {
	/* 钞汇同价提示移动端优化 */
	.layui-alert {
		font-size: 0.85rem;
		line-height: 1.6;
		padding: 12px 15px;
	}
	
	.layui-alert strong {
		display: block;
		margin-bottom: 5px;
	}
	
	/* 页头调整 */
	.header {
		padding: 20px 10px;
	}
	.header h1 {
		font-size: 1.8rem;
	}
	.header p {
		font-size: 0.9rem;
	}
	
	/* 导航栏调整 */
	.nav-item {
		padding: 12px 20px;
		font-size: 1rem;
	}
	
	/* 主容器调整 */
	.main-container {
		padding: 20px 10px 0px;
	}
	
	/* 搜索框调整 */
	.search-input {
		width: calc(100% - 40px);
		max-width: 300px;
		font-size: 0.8rem;
	}
	
	/* 表格调整 */
	.rate-table {
		font-size: 0.8rem;
		margin: 0;
		overflow-x: visible; /* 移除横向滚动 */
	}
	
	.rate-table table {
		width: 100%;
		table-layout: auto; /* 自动调整列宽 */
	}
	
	.rate-table th,
	.rate-table td {
		padding: 8px 4px;
		font-size: 0.75rem;
	}
	
	/* 货币名称列 */
	.currency-name {
		font-size: 0.8rem;
		max-width: 80px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		text-align: left;
		padding-left: 6px;
	}
	
	/* 移动端货币名称链接样式 */
	.currency-name a {
		width: 80px;
		gap: 4px;
		font-size: 0.8rem;
	}
	
	.currency-icon {
		width: 16px;
		height: 12px;
	}
	
	/* 更新信息调整 */
	.update-info {
		font-size: 0.8rem;
		padding: 12px;
	}
	
	/* 页脚调整 */
	.footer {
		padding: 20px 15px;
		margin-top: 30px;
	}
	.disclaimer {
		font-size: 0.85rem;
		padding: 12px;
	}
	.copyright {
		font-size: 0.75rem;
	}
}

/* 超小屏幕适配
@media screen and (max-width: 480px) {
	.header h1 {
		font-size: 1.5rem;
	}
	.header p {
		font-size: 0.85rem;
	}
	
	.nav-item {
		padding: 10px 15px;
		font-size: 0.95rem;
	}
	

	.search-input {
		max-width: 280px;
		font-size: 0.85rem;
	}
	
	.rate-table th,
	.rate-table td {
		padding: 6px 2px;
		font-size: 0.7rem;
	}
	

	.currency-name {
		font-size: 0.75rem;
		max-width: 60px;
	}
	

	.update-info {
		font-size: 0.7rem;
		padding: 8px;
	}
} */


/* ===========================
   首页补充样式（从旧 index.css 合并）
   =========================== */
.home-main {
    padding-top: 20px;
}

.home-rate-table {
    overflow: hidden;
}

.home-rate-head {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e6e6e6;
    text-align: left;
}

.home-rate-head h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #333;
    font-weight: 600;
}

.home-rate-head p {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: #666;
}

.section-title {
    font-size: 1.15rem;
    color: #333;
    font-weight: 600;
    margin: 0 0 14px;
    text-align: left;
}

.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    margin-top: 35px;
    border-top: 3px solid #4A90E2;
}

.site-footer .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 15px;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer p {
    margin: 6px 0;
}

/* 首页“关于外汇牌价”正文排版 */
.home-intro-text p {
    margin: 0 0 12px 0;
}

.home-intro-text p:last-child {
    margin-bottom: 0;
}

/* 首页“关于外汇牌价”与上方银行列表间距微调 */
.about-forex-card {
    margin-top: 20px;
}

.about-forex-card .bank-info-title h2 {
    font-size: 1.15rem; /* 与“各大银行外汇牌价查询”一致 */
    text-align: left;
}

.about-forex-card .bank-info-top {
    margin-bottom: 8px;
}

.about-forex-card .bank-info-intro {
    padding-top: 10px;
}

@media screen and (max-width: 768px) {
    .home-rate-head {
        padding: 12px;
    }

    /* 移动端关于外汇牌价标题保持左对齐，不居中 */
    .about-forex-card .bank-info-top {
        justify-content: flex-start;
    }

    .about-forex-card .bank-info-left {
        justify-content: flex-start;
        margin: 0;
        width: 100%;
    }

    .about-forex-card .bank-info-title h2 {
        text-align: left;
        font-size: 1.15rem;
    }
}
