/* ========== 重置 & 基础 ========== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

body {
	background: linear-gradient(135deg, #0A0A2A 0%, #1E1B4B 30%, #312E81 70%, #4F46E5 100%);
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
	overflow-x: hidden;
	min-height: 100vh;
	padding: 16px 12px 30px 12px;
}

    /* 动态光晕背景 */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	background: radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.2) 0%, transparent 55%),
                  radial-gradient(circle at 70% 65%, rgba(234, 179, 8, 0.18) 0%, transparent 55%);
	animation: bgPulse 16s ease-in-out infinite alternate;
	z-index: -1;
	pointer-events: none;
}

@keyframes bgPulse {
	0% {
		opacity: 0.4;
		transform: scale(1);
	}

	100% {
		opacity: 0.8;
		transform: scale(1.05);
	}
}

    /* 至尊卡片样式 — 支持旋转+缩放 */
.luxury-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	background-image: linear-gradient(145deg, #ffffff 0%, #fff9ef 100%);
	border: 2px solid #fbbf24;
	border-radius: 24px;
	box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(251, 191, 36, 0.3) inset;
	aspect-ratio: 1 / 1;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
	position: relative;
	overflow: hidden;
	will-change: transform;
	transform: translateZ(0);
	-webkit-transform: translateZ(0);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

    /* 图标旋转容器 */
.luxury-card .icon-wrapper {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	width: 100%;
	margin-bottom: 6px;
	-webkit-transition: transform 0.45s cubic-bezier(0.2, 1.2, 0.4, 1);
	transition: transform 0.45s cubic-bezier(0.2, 1.2, 0.4, 1);
	will-change: transform;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
}

.luxury-card img {
	width: 58px;
	height: 58px;
	max-width: 100%;
	object-fit: contain;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-filter: drop-shadow(0 6px 12px rgba(234, 179, 8, 0.4));
	filter: drop-shadow(0 6px 12px rgba(234, 179, 8, 0.4));
	transition: all 0.3s ease;
	pointer-events: none;
}

.luxury-card .text {
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	color: #1f2937;
	padding: 0 6px;
	line-height: 1.3;
	letter-spacing: 0.3px;
	pointer-events: none;
	word-break: break-word;
	max-width: 100%;
}

    /* ========== 桌面端 HOVER 效果 ========== */
@media (hover: hover) and (pointer: fine) {
	.luxury-card:hover {
		transform: translateY(-8px) scale(1.05);
		border-color: #f59e0b;
		box-shadow: 0 20px 35px -10px rgba(245, 158, 11, 0.5);
	}

	.luxury-card:hover .icon-wrapper {
		transform: scale(1.18) rotate(360deg);
	}

	.luxury-card:hover img {
		-webkit-filter: drop-shadow(0 0 16px #fbbf24) brightness(1.2);
		filter: drop-shadow(0 0 16px #fbbf24) brightness(1.2);
	}
}

    /* ========== 移动端核心动效: 卡片整体放大 + 图标旋转360° ========== */
.luxury-card.touch-active {
	transform: scale(1.06) translateY(-4px) translateZ(0) !important;
	-webkit-transform: scale(1.06) translateY(-4px) translateZ(0) !important;
	border-color: #f59e0b;
	box-shadow: 0 18px 32px -8px rgba(245, 158, 11, 0.6);
	transition: transform 0.2s cubic-bezier(0.18, 1.2, 0.4, 1);
}

.luxury-card.touch-active .icon-wrapper {
	transform: scale(1.22) rotate(360deg) translateZ(0) !important;
	-webkit-transform: scale(1.22) rotate(360deg) translateZ(0) !important;
	transition: transform 0.38s cubic-bezier(0.2, 1.4, 0.4, 1.2);
}

.luxury-card.touch-active img {
	-webkit-filter: drop-shadow(0 0 20px #fbbf24) brightness(1.25);
	filter: drop-shadow(0 0 20px #fbbf24) brightness(1.25);
	-webkit-transition: filter 0.2s;
	transition: filter 0.2s;
}

.luxury-card.touch-release {
	transform: scale(1) translateY(0) translateZ(0) !important;
	-webkit-transform: scale(1) translateY(0) translateZ(0) !important;
	transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.luxury-card.touch-release .icon-wrapper {
	transform: scale(1) rotate(0deg) translateZ(0) !important;
	-webkit-transform: scale(1) rotate(0deg) translateZ(0) !important;
	transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.luxury-card.touch-release img {
	-webkit-filter: drop-shadow(0 6px 12px rgba(234, 179, 8, 0.4));
	filter: drop-shadow(0 6px 12px rgba(234, 179, 8, 0.4));
}

    /* 搜索高亮专用类 */
.search-match {
	opacity: 1 !important;
	-webkit-filter: drop-shadow(0 0 8px gold) brightness(1.02) !important;
	filter: drop-shadow(0 0 8px gold) brightness(1.02) !important;
	border: 3px solid #FBBF24 !important;
	-webkit-transform: scale(1.02) translateZ(0);
	transform: scale(1.02) translateZ(0);
}

.search-mismatch {
	opacity: 0.45 !important;
	-webkit-filter: grayscale(0.3) blur(0.2px) !important;
	filter: grayscale(0.3) blur(0.2px) !important;
	border: 1px solid rgba(245,158,11,0.5) !important;
	-webkit-transform: scale(0.98) translateZ(0);
	transform: scale(0.98) translateZ(0);
}

    /* 图片标题框 + 流光渐变（替换版） */
.gold-bar {
	--bar-max-width: 600px;
	position: relative;
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	width: min(100%, var(--bar-max-width));
	margin: 8px auto 16px auto;
	padding: 0 4px;
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
	isolation: isolate;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
}

.gold-bar--top {
	margin-top: 2px;
	margin-bottom: 14px;
}

.gold-bar--bottom {
	margin-top: 4px;
	margin-bottom: 14px;
}

.gold-bar__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
	position: relative;
	z-index: 2;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.18))
        drop-shadow(0 10px 22px rgba(255, 184, 28, 0.20))
        drop-shadow(0 0 12px rgba(255, 224, 128, 0.28));
	filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.18))
        drop-shadow(0 10px 22px rgba(255, 184, 28, 0.20))
        drop-shadow(0 0 12px rgba(255, 224, 128, 0.28));
}

.gold-bar::before {
	content: '';
	position: absolute;
	left: 2.5%;
	right: 2.5%;
	top: 18%;
	bottom: 18%;
	z-index: 0;
	pointer-events: none;
	border-radius: 999px;
	background: linear-gradient(90deg,
          rgba(255, 210, 110, 0) 0%,
          rgba(255, 228, 155, 0.14) 18%,
          rgba(255, 248, 220, 0.24) 50%,
          rgba(255, 219, 120, 0.14) 82%,
          rgba(255, 210, 110, 0) 100%),
        radial-gradient(circle at 50% 50%, rgba(255, 232, 155, 0.22), transparent 64%);
	filter: blur(18px);
	animation: titleAura 3.8s ease-in-out infinite alternate;
}

.gold-bar::after {
	content: '';
	position: absolute;
	top: 6%;
	bottom: 6%;
	left: -28%;
	width: 24%;
	z-index: 3;
	pointer-events: none;
	border-radius: 999px;
	background: linear-gradient(
        102deg,
        rgba(255,255,255,0) 0%,
        rgba(255,250,220,0.12) 18%,
        rgba(255,255,255,0.85) 50%,
        rgba(255,235,166,0.24) 72%,
        rgba(255,255,255,0) 100%
      );
	filter: blur(6px);
	transform: skewX(-20deg);
	mix-blend-mode: screen;
	opacity: 0.95;
	animation: titleFlow 3.6s linear infinite;
}

@keyframes titleAura {
	0% {
		opacity: 0.55;
		transform: scaleX(0.985);
	}

	100% {
		opacity: 0.95;
		transform: scaleX(1.015);
	}
}

@keyframes titleFlow {
	0% {
		left: -28%;
		opacity: 0;
	}

	10% {
		opacity: 1;
	}

	50% {
		opacity: 0.98;
	}

	100% {
		left: 104%;
		opacity: 0;
	}
}


    /* 搜索栏 */
.search-wrapper {
	max-width: 600px;
	margin: 0 auto 20px auto;
	padding: 0 4px;
}

.search-container {
	display: flex;
	width: 100%;
	background: rgba(255, 255, 255, 0.97);
	border: 2px solid #fbbf24;
	border-radius: 60px;
	overflow: hidden;
	box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.2);
}

.search-input {
	flex: 1;
	background: transparent;
	border: none;
	padding: 14px 18px;
	font-size: 1rem;
	font-weight: 500;
	color: #1f2937;
	outline: none;
	min-width: 0;
}

.search-input::placeholder {
	color: #9ca3af;
	font-weight: 400;
}

.search-btn {
	background: linear-gradient(135deg, #f59e0b, #ea580c);
	border: none;
	color: white;
	font-weight: 700;
	font-size: 1rem;
	padding: 0 22px;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.search-btn:active {
	transform: scale(0.95);
}

    /* 基础网格布局 (默认桌面多列) */
.grid-layout {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 14px;
	margin-bottom: 30px;
}

.grid-layout-6 {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
}

    /* 手机端：强制改为 4 列，实现“第一行四个名片” */
@media (max-width: 639px) {
	.grid-layout,
      .grid-layout-6 {
		grid-template-columns: repeat(4, 1fr);
		gap: 12px;
	}

	.luxury-card img {
		width: 52px;
		height: 52px;
	}

	.luxury-card .text {
		font-size: 11px;
	}
}

@media (min-width: 640px) and (max-width: 1024px) {
	.grid-layout {
		grid-template-columns: repeat(5, 1fr);
		gap: 18px;
	}

	.grid-layout-6 {
		grid-template-columns: repeat(6, 1fr);
		gap: 16px;
	}
}

@media (min-width: 1025px) {
	.grid-layout {
		grid-template-columns: repeat(5, 1fr);
		gap: 20px;
	}

	.grid-layout-6 {
		grid-template-columns: repeat(6, 1fr);
		gap: 18px;
	}

	.luxury-card img {
		width: 64px;
		height: 64px;
	}

	.luxury-card .text {
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.luxury-card img {
		width: 46px;
		height: 46px;
	}

	.luxury-card .text {
		font-size: 10px;
	}

	.gold-bar {
		width: min(100%, 600px);
		margin: 4px auto 12px auto;
	}

	.gold-bar__img {
		width: 100%;
		height: auto;
	}

	.search-input {
		padding: 11px 14px;
		font-size: 0.9rem;
	}

	.search-btn {
		padding: 0 16px;
		font-size: 0.9rem;
	}
}

h1 {
	text-align: center;
	font-size: clamp(1.6rem, 7vw, 3.5rem);
	font-weight: 900;
	color: white;
	text-shadow: 0 0 18px #f59e0b, 0 0 35px #fbbf24;
	margin-bottom: 18px;
	white-space: nowrap;
	letter-spacing: 1px;
}

@media (max-width: 480px) {
	h1 {
		font-size: 7vw;
		white-space: nowrap;
		letter-spacing: -0.3px;
	}
}

footer {
	text-align: center;
	color: rgba(255, 255, 255, 0.75);
	font-size: 11px;
	margin-top: 36px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 215, 0, 0.4);
	font-weight: 500;
}

.custom-toast {
	transition: opacity 0.25s ease;
	font-weight: 600;
	letter-spacing: 0.3px;
	backdrop-filter: blur(12px);
	background: linear-gradient(135deg, #f59e0b, #d97706);
	border-radius: 60px;
	font-size: 14px;
	z-index: 9999;
}

    /* 小图标悬停效果 - 图标放大360度旋转 */
.luxury-card:hover .icon-wrapper {
	-webkit-animation: iconSpin 0.8s ease-out forwards;
	animation: iconSpin 0.8s ease-out forwards;
}

@-webkit-keyframes iconSpin {
	0% {
		-webkit-transform: scale(1) rotate(0deg);
		transform: scale(1) rotate(0deg);
	}

	50% {
		-webkit-transform: scale(1.4) rotate(180deg);
		transform: scale(1.4) rotate(180deg);
	}

	100% {
		-webkit-transform: scale(1) rotate(360deg);
		transform: scale(1) rotate(360deg);
	}
}

@keyframes iconSpin {
	0% {
		transform: scale(1) rotate(0deg);
	}

	50% {
		transform: scale(1.4) rotate(180deg);
	}

	100% {
		transform: scale(1) rotate(360deg);
	}
}

    /* 悬停时文字下移放大效果 */
.luxury-card:hover .text {
	-webkit-animation: textPopup 0.8s ease-out forwards;
	animation: textPopup 0.8s ease-out forwards;
}

@-webkit-keyframes textPopup {
	0% {
		-webkit-transform: translateY(0) scale(1);
		transform: translateY(0) scale(1);
	}

	50% {
		-webkit-transform: translateY(8px) scale(1.3);
		transform: translateY(8px) scale(1.3);
	}

	100% {
		-webkit-transform: translateY(0) scale(1);
		transform: translateY(0) scale(1);
	}
}

@keyframes textPopup {
	0% {
		transform: translateY(0) scale(1);
	}

	50% {
		transform: translateY(8px) scale(1.3);
	}

	100% {
		transform: translateY(0) scale(1);
	}
}

    /* ========== iPhone / iPad Safari 显示修复补丁 ========== */
html {
	width: 100%;
	min-height: 100%;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	background: #0A0A2A;
}

body {
	width: 100%;
	min-height: 100svh;
	min-height: -webkit-fill-available;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	padding-left: max(12px, env(safe-area-inset-left));
	padding-right: max(12px, env(safe-area-inset-right));
	padding-bottom: max(30px, env(safe-area-inset-bottom));
}

img {
	display: block;
	max-width: 100%;
	border: 0;
	image-rendering: auto;
	-webkit-user-select: none;
	user-select: none;
}

a,
    button,
    input {
	touch-action: manipulation;
	-webkit-touch-callout: none;
}

.luxury-card,
    .icon-wrapper,
    .gold-bar,
    .gold-bar__img {
	min-width: 0;
}

.img-fallback {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	color: #7c2d12;
	font-size: 11px;
	font-weight: 900;
	text-align: center;
	background: radial-gradient(circle at 30% 25%, #fff7cc 0%, #fbbf24 52%, #b45309 100%);
	box-shadow: 0 5px 14px rgba(245, 158, 11, 0.38), inset 0 0 0 1px rgba(255,255,255,0.5);
	padding: 4px;
	line-height: 1.1;
}

    /* iOS WebKit 对 filter / blend / fixed 动画较敏感，移动端降级保证图片不黑屏不消失 */
@supports (-webkit-touch-callout: none) {
	body::before {
		animation: none;
		opacity: 0.62;
	}

	.gold-bar::after {
		mix-blend-mode: normal;
		-webkit-transform: skewX(-20deg) translateZ(0);
		transform: skewX(-20deg) translateZ(0);
	}

	.luxury-card,
      .luxury-card .icon-wrapper,
      .luxury-card img,
      .gold-bar__img {
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
	}

	.luxury-card img {
		-webkit-filter: drop-shadow(0 4px 9px rgba(234, 179, 8, 0.32));
		filter: drop-shadow(0 4px 9px rgba(234, 179, 8, 0.32));
	}

	.luxury-card.touch-active img {
		-webkit-filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.72)) brightness(1.16);
		filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.72)) brightness(1.16);
	}
}

@media (max-width: 390px) {
	body {
		padding-top: 12px;
		padding-left: max(8px, env(safe-area-inset-left));
		padding-right: max(8px, env(safe-area-inset-right));
	}

	.grid-layout,
      .grid-layout-6 {
		gap: 8px;
	}

	.luxury-card {
		border-radius: 18px;
		min-height: 76px;
	}

	.luxury-card img {
		width: 40px;
		height: 40px;
	}

	.luxury-card .text {
		font-size: 9.5px;
		line-height: 1.2;
		padding: 0 3px;
	}
}