/* 开门效果样式 */
.door-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
  transition: 0.2s opacity ease-out;
}

/* 左右门扇 - 应用金属材质 */
.door-half {
  position: absolute;
  width: 50%;
  height: 100%;
  transition: transform 1.5s cubic-bezier(0.86, 0, 0.07, 1);
  background: linear-gradient(135deg, #8a9db5 0%, #4a5568 40%, #2d3748 60%, #4a5568 100%);
  overflow: hidden;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(0,0,0,0.21),
    inset 0 0 100px rgba(0, 0, 0, 0.5),
    0 2px 12.5px rgba(0,0,0,0.175);
}

/* 钢铁纹理和细节 - 主体纹理 */
.door-half::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="none" stroke="rgba(255,255,255,0.07)" stroke-width="1"/></svg>'),
    linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.3));
  background-size: 50px 50px, 100% 100%;
  background-position: center center;
  opacity: 0.8;
}

/* 铆钉效果和细节结构 */
.door-half::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 30%, transparent 70%),
    radial-gradient(circle, #a9b4c7 3px, rgba(169, 180, 199, 0.7) 4px, transparent 6px);
  background-size: 200px 200px, 60px 60px;
  background-position: center center, 0 0;
  opacity: 0.8;
}

/* 左门 */
.door-left {
  left: 0;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(0,0,0,0.21),
    inset -5px 0 10px rgba(0, 0, 0, 0.3),
    5px 0 25px rgba(0, 0, 0, 0.7);
  border-right: 6px solid #1a202c;
}

/* 右门 */
.door-right {
  right: 0;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(0,0,0,0.21),
    inset 5px 0 10px rgba(0, 0, 0, 0.3),
    -5px 0 25px rgba(0, 0, 0, 0.7);
  border-left: 6px solid #1a202c;
}

/* 装饰条纹 */
.door-half .stripe {
  position: absolute;
  background: linear-gradient(to right, #4a5568, #a0aec0, #4a5568);
  height: 50px;
  width: 100%;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.32),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    0 2px 5px rgba(0,0,0,0.15);
}

.door-half .stripe-top {
  top: 100px;
}

.door-half .stripe-middle {
  top: 50%;
  transform: translateY(-50%);
}

.door-half .stripe-bottom {
  bottom: 100px;
}

/* 警示条纹 */
.door-half .warning-stripe {
  position: absolute;
  width: 100%;
  height: 50px;
  background: repeating-linear-gradient(
    45deg,
    #ecc94b,
    #ecc94b 10px,
    #1a202c 10px,
    #1a202c 20px
  );
  opacity: 0.4;
  bottom: 30px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* 中间的分割线 */
.door-divider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 100%;
  background: #1a202c;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.5);
}

/* 门把手 */
.door-handle {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 100px;
  background: linear-gradient(90deg, #4a5568, #a0aec0, #4a5568);
  border-radius: 4px;
  transform: translateY(-50%);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(0,0,0,0.21),
    0 5px 15px rgba(0,0,0,0.35);
  border: 2px solid #1a202c;
}

.door-left .door-handle {
  right: 40px;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

.door-right .door-handle {
  left: 40px;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

/* 门把手细节 */
.door-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 70%;
  height: 5px;
  background: #1a202c;
  transform: translateY(-50%);
  border-radius: 2px;
  box-shadow: 0 -15px 0 #1a202c, 0 15px 0 #1a202c;
}

.door-left .door-handle::after {
  right: 5px;
}

.door-right .door-handle::after {
  left: 5px;
}

/* 公司Logo */
.door-logo {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 70px;
  font-weight: 900;
  color: #ecc94b;
  text-shadow: 
    0 0 10px rgba(236, 201, 75, 0.8),
    0 0 20px rgba(236, 201, 75, 0.4),
    0 2px 2px rgba(0, 0, 0, 0.7);
  opacity: 0.8;
  transition: opacity 0.5s ease;
  z-index: 15;
  letter-spacing: -2px;
  font-family: 'Arial Black', 'Roboto', sans-serif;
}

/* Logo图片样式 */
.door-logo-img {
  max-width: 120px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(236, 201, 75, 0.8));
  transition: all 0.3s ease;
}

/* Logo边框效果 */
.door-logo::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: radial-gradient(circle, rgba(236, 201, 75, 0.15), transparent 70%);
  z-index: -1;
  border-radius: 10px;
}

.door-left .door-logo {
  left: 60%;
  right: auto;
}

.door-right .door-logo {
  left: 40%;
  right: auto;
}

/* Welcome文本样式 */
.welcome-text {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(0, 120, 215, 0.6),
    0 0 30px rgba(0, 120, 215, 0.4);
  z-index: 15;
  font-family: 'Roboto', 'Noto Sans SC', 'Noto Sans Arabic', sans-serif;
  letter-spacing: 0.5px;
  text-align: center;
}

/* 国家名称高亮样式 */
.welcome-text .country-name {
  display: inline-block;
  color: #3498db;
  font-weight: 800;
  text-shadow: 
    0 0 10px rgba(52, 152, 219, 0.8),
    0 0 20px rgba(52, 152, 219, 0.6),
    0 0 30px rgba(52, 152, 219, 0.4);
  animation: countryGlow 1.5s ease-in-out infinite alternate;
  padding: 0 5px;
  position: relative;
}

@keyframes countryGlow {
  from {
    text-shadow: 
      0 0 10px rgba(52, 152, 219, 0.8),
      0 0 20px rgba(52, 152, 219, 0.6),
      0 0 30px rgba(52, 152, 219, 0.4);
  }
  to {
    text-shadow: 
      0 0 15px rgba(52, 152, 219, 0.9),
      0 0 25px rgba(52, 152, 219, 0.7),
      0 0 35px rgba(52, 152, 219, 0.5);
  }
}

/* 增强欢迎文本样式 */
.welcome-text {
  font-size: 2.5rem;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(0, 120, 215, 0.6),
    0 0 30px rgba(0, 120, 215, 0.4);
  letter-spacing: 1px;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(to bottom, #ffffff, #e6e6e6);
  -webkit-background-clip: text;
  background-clip: text;
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from {
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(0, 120, 215, 0.6),
      0 0 30px rgba(0, 120, 215, 0.4);
  }
  to {
    text-shadow: 
      0 0 15px rgba(255, 255, 255, 0.9),
      0 0 25px rgba(0, 120, 215, 0.7),
      0 0 35px rgba(0, 120, 215, 0.5);
  }
}

/* 金属光泽效果 */
.door-half .shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 70%
  );
  animation: shine 8s infinite;
  pointer-events: none;
  z-index: 3;
  opacity: 0.6;
  transform-origin: center center;
}

@keyframes shine {
  0% {
    transform: scale(1.5) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 0.6;
  }
  35% {
    opacity: 0;
  }
  50% {
    transform: scale(1.5) rotate(180deg);
    opacity: 0;
  }
  70% {
    opacity: 0.6;
  }
  85% {
    opacity: 0;
  }
  100% {
    transform: scale(1.5) rotate(360deg);
    opacity: 0;
  }
}

/* 开门后的动画效果 - 平行滑动 */
.door-container.opened .door-left {
  transform: translateX(-100%);
}

.door-container.opened .door-right {
  transform: translateX(100%);
}

/* 关门状态的样式 */
.door-container.closed .door-left {
  transform: translateX(0);
}

.door-container.closed .door-right {
  transform: translateX(0);
}

/* 关门动画中隐藏分割线 */
.door-container.opening .door-divider,
.door-container.opened .door-divider {
  opacity: 0;
}

/* 显示分割线 */
.door-container.closed .door-divider {
  opacity: 1;
}

/* 加载指示器 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.3s ease-out;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ecc94b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 钢铁门打开声音效果反馈 */
.door-open-sound {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
}

/* 钢铁反光闪光 */
@keyframes doorMetal {
  0% { opacity: 0; }
  25% { opacity: 0; }
  30% { opacity: 0.3; }
  35% { opacity: 0; }
  60% { opacity: 0; }
  65% { opacity: 0.3; }
  70% { opacity: 0; }
  100% { opacity: 0; }
}

.door-half .metal-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: doorMetal 10s infinite;
  overflow: hidden;
}

/* 磨砂钢铁纹理效果 */
.door-half .brushed-texture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 50%, 
    rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0.03) 75%, transparent 75%, transparent);
  background-size: 75px 75px;
  opacity: 0.3;
}

/* 添加金属板块效果 */
.door-half .panel {
  position: absolute;
  width: 80%;
  height: 25%;
  left: 10%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.1) 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.1),
    0 1px 2px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 2px;
}

.door-half .panel-top {
  top: 15%;
}

.door-half .panel-bottom {
  bottom: 15%;
}

/* 移动设备适配 */
@media (max-width: 768px) {
  .door-handle {
    width: 24px;
    height: 80px;
  }

  .door-left .door-handle {
    right: 30px;
  }

  .door-right .door-handle {
    left: 30px;
  }

  .door-logo {
    font-size: 50px;
  }
  
  .door-half .stripe {
    height: 30px;
  }
  
  .door-half .warning-stripe {
    height: 30px;
  }
  
  .welcome-text {
    font-size: 28px;
    top: 25%;
  }
  
  .welcome-text .country-name {
    font-size: 30px;  /* 稍微放大国家名称 */
    display: inline-block;
  }
  
  .door-logo-img {
    max-width: 80px;
  }
}

/* RTL 支持 */
[dir="rtl"] .door-left {
  left: auto;
  right: 0;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(0,0,0,0.21),
    inset 5px 0 10px rgba(0, 0, 0, 0.3),
    -5px 0 25px rgba(0, 0, 0, 0.7);
  border-right: none;
  border-left: 6px solid #1a202c;
}

[dir="rtl"] .door-right {
  right: auto;
  left: 0;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(0,0,0,0.21),
    inset -5px 0 10px rgba(0, 0, 0, 0.3),
    5px 0 25px rgba(0, 0, 0, 0.7);
  border-left: none;
  border-right: 6px solid #1a202c;
}

[dir="rtl"] .door-container.opened .door-left {
  transform: translateX(100%);
}

[dir="rtl"] .door-container.opened .door-right {
  transform: translateX(-100%);
}

[dir="rtl"] .door-left .door-handle {
  right: auto;
  left: 40px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

[dir="rtl"] .door-right .door-handle {
  left: auto;
  right: 40px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

[dir="rtl"] .door-left .door-handle::after {
  right: auto;
  left: 5px;
}

[dir="rtl"] .door-right .door-handle::after {
  left: auto;
  right: 5px;
}

/* 不同语言的字体调整 */
:lang(ar) .door-company {
  font-family: 'Noto Sans Arabic', sans-serif;
  line-height: 1.4;
}

:lang(ar) .door-slogan {
  font-family: 'Noto Sans Arabic', sans-serif;
  line-height: 1.6;
}

:lang(zh) .door-company,
:lang(zh) .door-slogan {
  font-family: 'Noto Sans SC', sans-serif;
}

:lang(ru) .door-company,
:lang(ru) .door-slogan {
  letter-spacing: 0.2px;
}

/* 局部眩光效果 */
.door-half .highlight {
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  animation: moveHighlight 15s infinite ease-in-out;
}

.door-left .highlight {
  top: 30%;
  left: 40%;
}

.door-right .highlight {
  top: 60%;
  left: 30%;
}

@keyframes moveHighlight {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  20% {
    opacity: 0.7;
    transform: translate(50px, 30px);
  }
  40% {
    opacity: 0;
    transform: translate(0, 60px);
  }
  60% {
    opacity: 0.7;
    transform: translate(-30px, 20px);
  }
  80% {
    opacity: 0;
    transform: translate(20px, -40px);
  }
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}

/* 移动端眩光效果放大 */
@media (max-width: 768px) {
  .door-half .highlight {
    width: 300px;
    height: 300px;
    background: radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.15) 30%,
      transparent 70%
    );
    animation: moveHighlight 12s infinite ease-in-out;
  }
  
  .door-left .highlight {
    top: 25%;
    left: 35%;
  }
  
  .door-right .highlight {
    top: 65%;
    left: 25%;
  }
  
  /* 额外的眩光元素的样式 */
  .door-half .extra-highlight {
    opacity: 0;
    width: 300px;
    height: 300px;
    animation: moveExtraHighlight 10s infinite ease-in-out;
    background: radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(255, 255, 255, 0.2) 30%,
      transparent 70%
    );
    animation-delay: 1.5s; /* 与主要眩光错开 */
  }
}

/* 额外眩光的动画 */
@keyframes moveExtraHighlight {
  0% {
    opacity: 0;
    transform: scale(0.8) translate(0, 0);
  }
  20% {
    opacity: 0.8;
    transform: scale(1.1) translate(70px, -50px);
  }
  40% {
    opacity: 0.2;
    transform: scale(0.9) translate(30px, 80px);
  }
  60% {
    opacity: 0.8;
    transform: scale(1.2) translate(-50px, 30px);
  }
  80% {
    opacity: 0.2;
    transform: scale(1) translate(60px, -60px);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translate(0, 0);
  }
}

/* Defs */
@property --angle-1 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -75deg;
}

@property --angle-2 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -45deg;
}

/* 动画时间和缓动函数变量 */
:root {
  --anim--hover-time: 0.4s;
  --anim--hover-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ========== 玻璃按钮组件 ========== */

/* 按钮包装容器 */
.glass-button-wrap {
  position: relative;
  z-index: 2;
  border-radius: 999vw;
  background: transparent;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5em;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* 按钮阴影容器 */
.glass-button-shadow {
  --shadow-cuttoff-fix: 2em;
  position: absolute;
  width: calc(100% + var(--shadow-cuttoff-fix));
  height: calc(100% + var(--shadow-cuttoff-fix));
  top: calc(0% - var(--shadow-cuttoff-fix) / 2);
  left: calc(0% - var(--shadow-cuttoff-fix) / 2);
  filter: blur(clamp(3px, 0.2em, 15px));
  -webkit-filter: blur(clamp(3px, 0.2em, 15px));
  -moz-filter: blur(clamp(3px, 0.2em, 15px));
  -ms-filter: blur(clamp(3px, 0.2em, 15px));
  overflow: visible;
  pointer-events: none;
}

/* 阴影效果 */
.glass-button-shadow::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 999vw;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.15));
  width: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  height: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  top: calc(var(--shadow-cuttoff-fix) - 0.5em);
  left: calc(var(--shadow-cuttoff-fix) - 0.875em);
  padding: 0.125em;
  box-sizing: border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  overflow: visible;
  opacity: 1;
}

/* 按钮基本样式 */
.glass-button {
  /* 基础样式 */
  --border-width: clamp(1px, 0.0625em, 4px);
  all: unset;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  pointer-events: auto;
  z-index: 3;
  background: linear-gradient(
    -75deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.1)
  );
  border-radius: 999vw;
  box-shadow: 
    inset 0 0.125em 0.25em rgba(0, 0, 0, 0.1),
    inset 0 -0.125em 0.25em rgba(255, 255, 255, 0.7),
    0 0.35em 0.2em -0.125em rgba(0, 0, 0, 0.25),
    0 0 0.15em 0.35em inset rgba(255, 255, 255, 0.3),
    0 0 0 0.05em rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(clamp(5px, 0.3em, 15px));
  -webkit-backdrop-filter: blur(clamp(5px, 0.3em, 15px));
  -moz-backdrop-filter: blur(clamp(5px, 0.3em, 15px));
  -ms-backdrop-filter: blur(clamp(5px, 0.3em, 15px));
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  transform: translateZ(0);
}

.glass-button:hover {
  transform: scale(0.975) translateZ(5px);
  backdrop-filter: blur(clamp(8px, 0.5em, 20px));
  -webkit-backdrop-filter: blur(clamp(8px, 0.5em, 20px));
  -moz-backdrop-filter: blur(clamp(8px, 0.5em, 20px));
  -ms-backdrop-filter: blur(clamp(8px, 0.5em, 20px));
  background: linear-gradient(
    -75deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0.12)
  );
  box-shadow: 
    inset 0 0.125em 0.25em rgba(0, 0, 0, 0.1),
    inset 0 -0.125em 0.25em rgba(255, 255, 255, 0.7),
    0 0.25em 0.15em -0.1em rgba(0, 0, 0, 0.3),
    0 0 0.1em 0.2em inset rgba(255, 255, 255, 0.6),
    0 0 0 0.05em rgba(255, 255, 255, 0.6);
}

/* 按钮文本 */
.glass-button span {
  position: relative;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.02em;
  font-weight: 600;
  font-size: 1em;
  color: rgba(40, 40, 40, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: 0 0.05em 0.1em rgba(0, 0, 0, 0.15);
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  padding-inline: 1.75em;
  padding-block: 0.9em;
}

.glass-button:hover span {
  text-shadow: 0 0.05em 0.15em rgba(0, 0, 0, 0.2);
  color: rgba(20, 20, 20, 1);
}

/* 文本光效 */
.glass-button span::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  width: calc(100% - var(--border-width)); /* 防止与边框重叠 */
  height: calc(100% - var(--border-width));
  top: calc(0% + var(--border-width) / 2);
  left: calc(0% + var(--border-width) / 2);
  box-sizing: border-box;
  border-radius: 999vw;
  overflow: clip;
  background: linear-gradient(
    var(--angle-2),
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.7) 40% 50%,
    rgba(255, 255, 255, 0) 55%
  );
  z-index: 3;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-size: 300% 300%;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  transition: background-position calc(var(--anim--hover-time) * 1.25)
      var(--anim--hover-ease),
    --angle-2 calc(var(--anim--hover-time) * 1.25) var(--anim--hover-ease);
}

.glass-button:hover span::after {
  background-position: 35% 50%;
}

.glass-button:active span::after {
  background-position: 50% 15%;
  --angle-2: -15deg;
}

/* 触摸设备 */
@media (hover: none) and (pointer: coarse) {
  .glass-button span::after,
  .glass-button:active span::after {
    --angle-2: -45deg;
  }
}

/* 按钮轮廓 */
.glass-button::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 999vw;
  width: calc(100% + var(--border-width));
  height: calc(100% + var(--border-width));
  top: calc(0% - var(--border-width) / 2);
  left: calc(0% - var(--border-width) / 2);
  padding: var(--border-width);
  box-sizing: border-box;
  background: conic-gradient(
      from var(--angle-1) at 50% 50%,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0) 5% 40%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(0, 0, 0, 0) 60% 95%,
      rgba(0, 0, 0, 0.5)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--anim--hover-time) var(--anim--hover-ease),
    --angle-1 500ms ease;
  box-shadow: inset 0 0 0 calc(var(--border-width) / 2) rgba(255, 255, 255, 0.7);
}

.glass-button:hover::after {
  --angle-1: -125deg;
}

.glass-button:active::after {
  --angle-1: -75deg;
}

@media (hover: none) and (pointer: coarse) {
  .glass-button::after,
  .glass-button:hover::after,
  .glass-button:active::after {
    --angle-1: -75deg;
  }
}

/* 悬停阴影效果 */
.glass-button-wrap:has(.glass-button:hover) .glass-button-shadow {
  filter: blur(clamp(4px, 0.25em, 12px));
  -webkit-filter: blur(clamp(4px, 0.25em, 12px));
  -moz-filter: blur(clamp(4px, 0.25em, 12px));
  -ms-filter: blur(clamp(4px, 0.25em, 12px));
  transition: filter var(--anim--hover-time) var(--anim--hover-ease);
}

.glass-button-wrap:has(.glass-button:hover) .glass-button-shadow::after {
  top: calc(var(--shadow-cuttoff-fix) - 0.875em);
  opacity: 1.2;
}

/* 点击旋转效果 */
.glass-button-wrap:has(.glass-button:active) {
  transform: rotate3d(1, 0, 0, 25deg);
}

.glass-button-wrap:has(.glass-button:active) .glass-button {
  box-shadow: 
    inset 0 0.125em 0.25em rgba(0, 0, 0, 0.1),
    inset 0 -0.125em 0.25em rgba(255, 255, 255, 0.5),
    0 0.125em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.15em 0.25em inset rgba(255, 255, 255, 0.3),
    0 0.225em 0.05em 0 rgba(0, 0, 0, 0.1),
    0 0.25em 0 0 rgba(255, 255, 255, 0.75),
    inset 0 0.25em 0.05em 0 rgba(0, 0, 0, 0.15);
  transform: translateZ(2px);
}

.glass-button-wrap:has(.glass-button:active) .glass-button-shadow {
  filter: blur(clamp(3px, 0.15em, 10px));
  -webkit-filter: blur(clamp(3px, 0.15em, 10px));
  -moz-filter: blur(clamp(3px, 0.15em, 10px));
  -ms-filter: blur(clamp(3px, 0.15em, 10px));
}

.glass-button-wrap:has(.glass-button:active) .glass-button-shadow::after {
  top: calc(var(--shadow-cuttoff-fix) - 0.5em);
  opacity: 0.9;
}

.glass-button-wrap:has(.glass-button:active) span {
  text-shadow: 0.025em 0.25em 0.05em rgba(0, 0, 0, 0.15);
}

/* 点状背景 */
.dotted-background {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 0;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* ========== 玻璃内容框组件 ========== */

/* 内容框包装容器 */
.glass-panel-wrap {
  position: relative;
  z-index: 2;
  border-radius: 24px;
  background: transparent;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5em 0;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* 内容框阴影容器 */
.glass-panel-shadow {
  --shadow-cuttoff-fix: 2.5em;
  position: absolute;
  width: calc(100% + var(--shadow-cuttoff-fix));
  height: calc(100% + var(--shadow-cuttoff-fix));
  top: calc(0% - var(--shadow-cuttoff-fix) / 2);
  left: calc(0% - var(--shadow-cuttoff-fix) / 2);
  filter: blur(clamp(5px, 0.3em, 20px));
  -webkit-filter: blur(clamp(5px, 0.3em, 20px));
  -moz-filter: blur(clamp(5px, 0.3em, 20px));
  -ms-filter: blur(clamp(5px, 0.3em, 20px));
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

/* 阴影效果 */
.glass-panel-shadow::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15));
  width: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  height: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  top: calc(var(--shadow-cuttoff-fix) - 0.5em);
  left: calc(var(--shadow-cuttoff-fix) - 0.875em);
  padding: 0.125em;
  box-sizing: border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  overflow: visible;
  opacity: 0.9;
}

/* 内容框基本样式 */
.glass-panel {
  /* 基础样式 */
  --border-width: clamp(1px, 0.0625em, 4px);
  position: relative;
  pointer-events: auto;
  z-index: 3;
  background: linear-gradient(
    -75deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.1)
  );
  border-radius: 24px;
  box-shadow: 
    inset 0 0.125em 0.25em rgba(0, 0, 0, 0.1),
    inset 0 -0.125em 0.25em rgba(255, 255, 255, 0.7),
    0 0.35em 0.2em -0.125em rgba(0, 0, 0, 0.25),
    0 0 0.15em 0.35em inset rgba(255, 255, 255, 0.3),
    0 0 0 0.05em rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(clamp(8px, 0.5em, 20px));
  -webkit-backdrop-filter: blur(clamp(8px, 0.5em, 20px));
  -moz-backdrop-filter: blur(clamp(8px, 0.5em, 20px));
  -ms-backdrop-filter: blur(clamp(8px, 0.5em, 20px));
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  width: 100%;
  padding: 2.5em;
  background-color: rgba(255, 255, 255, 0.4);
  transform: translateZ(0);
}

/* 内容框悬停效果 */
.glass-panel:hover {
  background-color: rgba(255, 255, 255, 0.5);
  transform: translateZ(5px);
  backdrop-filter: blur(clamp(12px, 0.75em, 25px));
  -webkit-backdrop-filter: blur(clamp(12px, 0.75em, 25px));
  -moz-backdrop-filter: blur(clamp(12px, 0.75em, 25px));
  -ms-backdrop-filter: blur(clamp(12px, 0.75em, 25px));
  box-shadow: 
    inset 0 0.125em 0.25em rgba(0, 0, 0, 0.1),
    inset 0 -0.125em 0.25em rgba(255, 255, 255, 0.7),
    0 0.5em 0.35em -0.125em rgba(0, 0, 0, 0.25),
    0 0 0.2em 0.35em inset rgba(255, 255, 255, 0.4),
    0 0 0 0.05em rgba(255, 255, 255, 0.6);
}

/* 内容框轮廓 */
.glass-panel::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 24px;
  width: calc(100% + var(--border-width));
  height: calc(100% + var(--border-width));
  top: calc(0% - var(--border-width) / 2);
  left: calc(0% - var(--border-width) / 2);
  padding: var(--border-width);
  box-sizing: border-box;
  background: conic-gradient(
      from var(--angle-1) at 50% 50%,
      rgba(0, 0, 0, 0.4),
      rgba(0, 0, 0, 0) 5% 40%,
      rgba(0, 0, 0, 0.4) 50%,
      rgba(0, 0, 0, 0) 60% 95%,
      rgba(0, 0, 0, 0.4)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--anim--hover-time) var(--anim--hover-ease),
    --angle-1 500ms ease;
  box-shadow: inset 0 0 0 calc(var(--border-width) / 2) rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.glass-panel:hover::after {
  --angle-1: -125deg;
}

/* 内容框内部光效 */
.glass-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(
    var(--angle-2),
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 40% 50%,
    rgba(255, 255, 255, 0) 55%
  );
  background-size: 300% 300%;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  mix-blend-mode: overlay;
  transition: background-position calc(var(--anim--hover-time) * 1.25)
      var(--anim--hover-ease),
    --angle-2 calc(var(--anim--hover-time) * 1.25) var(--anim--hover-ease);
  pointer-events: none;
}

.glass-panel:hover::before {
  background-position: 35% 50%;
}

/* 内容框内部样式 */
.glass-panel-content {
  position: relative;
  z-index: 2;
}

/* 内容框标题 */
.glass-panel-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75em;
  color: rgba(40, 40, 40, 1);
  position: relative;
  text-shadow: 0 0.05em 0.1em rgba(0, 0, 0, 0.1);
}

/* 内容框标题装饰 */
.glass-panel-title::after {
  content: "";
  position: absolute;
  bottom: -0.25em;
  left: 0;
  width: 3em;
  height: 3px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1));
  border-radius: 3px;
}

/* 悬停阴影效果 */
.glass-panel-wrap:has(.glass-panel:hover) .glass-panel-shadow {
  filter: blur(clamp(8px, 0.4em, 22px));
  -webkit-filter: blur(clamp(8px, 0.4em, 22px));
  -moz-filter: blur(clamp(8px, 0.4em, 22px));
  -ms-filter: blur(clamp(8px, 0.4em, 22px));
  transition: filter var(--anim--hover-time) var(--anim--hover-ease);
}

.glass-panel-wrap:has(.glass-panel:hover) .glass-panel-shadow::after {
  opacity: 1.1;
} 

/* 添加加载指示器样式 */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinner 1s linear infinite;
}

.loading-text {
  margin-top: 20px;
  color: #fff;
  font-size: 18px;
  font-family: 'Roboto', sans-serif;
}

@keyframes spinner {
  to {transform: rotate(360deg);}
}

/* 国旗图标样式 */
.door-country-flag {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 30px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 10;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.flag-en {
  background-image: url('https://cdn.jsdelivr.net/gh/lipis/flag-icons@6.14.0/flags/4x3/us.svg');
}

.flag-zh {
  background-image: url('https://cdn.jsdelivr.net/gh/lipis/flag-icons@6.14.0/flags/4x3/cn.svg');
}

.flag-ru {
  background-image: url('https://cdn.jsdelivr.net/gh/lipis/flag-icons@6.14.0/flags/4x3/ru.svg');
}

.flag-es {
  background-image: url('https://cdn.jsdelivr.net/gh/lipis/flag-icons@6.14.0/flags/4x3/es.svg');
}

.flag-ar {
  background-image: url('https://cdn.jsdelivr.net/gh/lipis/flag-icons@6.14.0/flags/4x3/sa.svg');
}

.flag-fr {
  background-image: url('https://cdn.jsdelivr.net/gh/lipis/flag-icons@6.14.0/flags/4x3/fr.svg');
}

/* 移动端眩光效果放大 */
@media (max-width: 768px) {
  .welcome-text {
    font-size: 1.8rem;
    max-width: 80vw;
  }
  
  .door-country-flag {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 22px;
  }
}

/* 欢迎文本的全球图标 */
.welcome-globe-icon {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 16;
  opacity: 0.9;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
  animation: globeRotate 10s linear infinite;
}

@keyframes globeRotate {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

@media (max-width: 768px) {
  .welcome-globe-icon {
    width: 35px;
    height: 35px;
    top: 15%;
  }
}

/* 门轨道光效 */
.door-track-light {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(0, 120, 215, 0), 
    rgba(0, 120, 215, 0.8), 
    rgba(255, 255, 255, 0.9),
    rgba(0, 120, 215, 0.8), 
    rgba(0, 120, 215, 0)
  );
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
  opacity: 0;
  animation: tracklight 1.5s ease-in-out;
}

.door-track-light-left {
  left: 0;
  width: 50%;
}

.door-track-light-right {
  right: 0;
  width: 50%;
}

@keyframes tracklight {
  0% {
    opacity: 0;
    width: 0;
  }
  20% {
    opacity: 0.8;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    width: 50%;
  }
} 