/* 表现层 */
:root {
  --marquee-duration: 38s;    /* 动画时长 */
  --link-hover: #ff8800;      /* 悬停颜色 */
  --safe-margin: 10px;        /* 安全边距 */
}
/* 外部容器，限制字幕的显示区域 */
.marquee-container {
    max-width: 1340px;
    overflow: hidden;      /* 隐藏超出的文字 */
    white-space: nowrap;   /* 禁止换行 */
    /*border-top: 2px solid #555;  增加顶部边框 */
    margin: 0 auto;
    padding: 5px 0;        /* 上下内边距 */
}

.marquee-container {
  position: relative;
  overflow: hidden;
  contain: content;  /* 限制渲染边界 */
  will-change: contents;
}

.marquee {
  display: inline-block;
  white-space: nowrap;
  transform: translate3d(0,0,0); /* GPU加速 */
  backface-visibility: hidden;
  
  /* 响应式动画控制 */
  animation: scroll-left var(--marquee-duration) linear infinite;
}

@keyframes scroll-left {
  0% { transform: translateX(100vw); }       /* 视口单位 */
  100% { transform: translateX(calc(-100% - var(--safe-margin))); } /* 百分比+变量 */
}


/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
  .marquee {
    animation: none;
    white-space: normal;
  }
}

/* 交互优化 */
.marquee:hover {
  animation-play-state: paused;
}

.marquee a {
  font: 700 14px/1.5 system-ui;
  color: #fff;
  padding: 8px 10px;
  transition: color 0.3s, transform 0.2s;
}

.marquee a:hover {
  color: var(--link-hover);
  transform: scale(1.05);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .marquee {
    animation-duration: calc(var(--marquee-duration) * 1.5);
  }
}

#site_name {
    display: inline-block;
    font-size: 2rem;
    line-height: normal !important;
    font-weight: bold;
    background: linear-gradient(45deg, #b400ff, #f9ff00, #00d4ff, #ff0018, #ff07ea, #ff9900, #0bff08);
    background-size: 300% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient-move 6s ease-in-out infinite;
}
@keyframes gradient-move {
	0%   { background-position: 0% center; }
	50%  { background-position: 100% center; }
	100% { background-position: 0% center; }
}

.hengfu img {
	height: 60px;
	width: 100%;
}

.menu dl:first-child {
	border-top: 0
}

.menu-wrap dt a {
	background: #e7cdaa;
	padding: 5px;
	border-radius: 10px;
	color: black;
	font-size: 16px
}

.menu-wrap::after {
	content: "";
	display: table;
	clear: both
}

.menu-wrap dl {
	margin: auto;
	display: block;
	float: left;
	width: 100%;
	padding: 10px 0;
	background-color: #000000;
}

.menu-wrap dt {
	width: 8%;
	font-size: 20px;
	color: #000
}

.menu-wrap dt, .menu-wrap dd {
	float: left;
	line-height: 40px;
	text-align: center
}

.menu-wrap dd {
	width: 11.5%;
	margin: 0;
	font-size: 16px
}

.bba-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
	gap: 4px;
	max-width: 1200px;
	margin: 2px auto;
	padding-bottom: 8px;
	background-color: #000000;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1)
}
.bba-item {
	margin: 2px;
	text-align: center;
	border-radius: 8px;
	transition: transform 0.3s ease, box-shadow 0.3s ease
}

.bba-item img {
	width: 80%;
	display: inline-block;
	object-fit: contain;
	border-radius: 10px;
	max-width: 80px
}

.bba-item div {
	font-size: 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: bold;
	color: #f35626;
	background-image: -webkit-linear-gradient(92deg, #f35626, #7100ff);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	-webkit-animation: hue 10s infinite linear
}

.bba-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2)
}

@-webkit-keyframes hue {
	from {
		-webkit-filter: hue-rotate(0deg);
		-moz-filter: hue-rotate(0deg)
	}

	to {
		-webkit-filter: hue-rotate(-360deg);
		-moz-filter: hue-rotate(-360deg)
	}
}


@media screen and (max-width:750px) {
    .hengfu img {
		height: 45px;
	}
	.menu {
		margin: 0px 0 0;
		border-radius: 0;
		padding: 0;
		width: 100%
	}
	.menu-wrap dl {
		padding: 0 0 6px
	}
	
	.menu-wrap dd {
		width: 21%;
		line-height: 30px;
		font-size: 13px
	}
	.menu dt {
		width: 14%;
		line-height: 50px;
		font-size: 14px
	}
	.menu-wrap dt a {
	font-size: 14px
    }
    .bba-grid {
		max-width: 85%;
		margin: 2px 0;
	}
}
/*悬浮*/
#kpfloatright {
    position: fixed;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 1900;
}
#kpfloatright img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
}

#bottom-float-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    gap: 4px;
    width: 100%;
    max-width: 750px;
    padding: 4px;
    background-color: rgba(0, 0, 0, 0.95);
    border-top: 2px solid #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    border-radius: 10px 10px 0 0;
    text-align: center;
}

.bottom-item {
    text-align: center;
}

.bottom-item a {
    text-decoration: none;
    color: #fff;
    font-size: 12px;
    display: inline-block;
}

.bottom-item img {
    width: 55px;
    height: 55px;
    margin-bottom: 2px;
    border-radius: 5px;
    object-fit: cover;
}

.close-btn {
    position: absolute;
    top: -15px;
    right: 0;
    background: #d90000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 14px;
    cursor: pointer;
    line-height: 25px;
    text-align: center;
}