/* ============================================
   iOS 6 PJAX — 加载动画 & 页面过渡
   兼容: iOS 6 Safari (WebKit 536)
   必须: -webkit- 前缀, 无 flexbox/grid
   ============================================ */

/* ========================
   全屏遮罩层
   ======================== */
#ios6-pjax-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.4);
}

/* ========================
   中央加载面板
   ======================== */
#ios6-pjax-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 99999;
  width: 80px;
  height: 80px;
  margin-top: -40px;
  margin-left: -40px;
  background: rgba(0, 0, 0, 0.7);
  -webkit-border-radius: 14px;
  border-radius: 14px;
  display: none;
}

/* ========================
   12 点旋转指示器 (Activity Indicator)
   iOS 6 经典风格
   ======================== */
.ios6-spinner-inner {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 20px auto 0;
}

/* 每个小圆点 */
.ios6-spinner-blade {
  position: absolute;
  top: 0;
  left: 18px;
  width: 4px;
  height: 12px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  -webkit-transform-origin: 2px 20px;
  transform-origin: 2px 20px;
}

/* 12 个刀片的旋转角度 */
.ios6-spinner-blade:nth-child(1)  { -webkit-transform: rotate(0deg);   transform: rotate(0deg);   -webkit-animation-delay: -1.1s;  animation-delay: -1.1s;  }
.ios6-spinner-blade:nth-child(2)  { -webkit-transform: rotate(30deg);  transform: rotate(30deg);  -webkit-animation-delay: -1.0s;  animation-delay: -1.0s;  }
.ios6-spinner-blade:nth-child(3)  { -webkit-transform: rotate(60deg);  transform: rotate(60deg);  -webkit-animation-delay: -0.916s; animation-delay: -0.916s; }
.ios6-spinner-blade:nth-child(4)  { -webkit-transform: rotate(90deg);  transform: rotate(90deg);  -webkit-animation-delay: -0.833s; animation-delay: -0.833s; }
.ios6-spinner-blade:nth-child(5)  { -webkit-transform: rotate(120deg); transform: rotate(120deg); -webkit-animation-delay: -0.75s;  animation-delay: -0.75s;  }
.ios6-spinner-blade:nth-child(6)  { -webkit-transform: rotate(150deg); transform: rotate(150deg); -webkit-animation-delay: -0.666s; animation-delay: -0.666s; }
.ios6-spinner-blade:nth-child(7)  { -webkit-transform: rotate(180deg); transform: rotate(180deg); -webkit-animation-delay: -0.583s; animation-delay: -0.583s; }
.ios6-spinner-blade:nth-child(8)  { -webkit-transform: rotate(210deg); transform: rotate(210deg); -webkit-animation-delay: -0.5s;   animation-delay: -0.5s;   }
.ios6-spinner-blade:nth-child(9)  { -webkit-transform: rotate(240deg); transform: rotate(240deg); -webkit-animation-delay: -0.416s; animation-delay: -0.416s; }
.ios6-spinner-blade:nth-child(10) { -webkit-transform: rotate(270deg); transform: rotate(270deg); -webkit-animation-delay: -0.333s; animation-delay: -0.333s; }
.ios6-spinner-blade:nth-child(11) { -webkit-transform: rotate(300deg); transform: rotate(300deg); -webkit-animation-delay: -0.25s;  animation-delay: -0.25s;  }
.ios6-spinner-blade:nth-child(12) { -webkit-transform: rotate(330deg); transform: rotate(330deg); -webkit-animation-delay: -0.166s; animation-delay: -0.166s; }

/* 旋转亮度动画 */
@-webkit-keyframes ios6SpinFade {
  0%   { background: rgba(255, 255, 255, 0.85); }
  100% { background: rgba(255, 255, 255, 0.25); }
}
@keyframes ios6SpinFade {
  0%   { background: rgba(255, 255, 255, 0.85); }
  100% { background: rgba(255, 255, 255, 0.25); }
}

/* 激活状态：当遮罩显示时启动动画 */
#ios6-pjax-overlay.active,
#ios6-pjax-overlay.active + #ios6-pjax-spinner {
  display: block;
}

/* 重新触发：通过 active class 控制显示和动画 */
#ios6-pjax-spinner.active {
  display: block;
}
#ios6-pjax-spinner.active .ios6-spinner-blade {
  -webkit-animation: ios6SpinFade 1.2s linear infinite;
  animation: ios6SpinFade 1.2s linear infinite;
}

/* ========================
   过渡动画 — 淡入淡出 (fade)
   ======================== */
.ios6-pjax-fade-out {
  -webkit-animation: ios6FadeOut 0.2s ease-out forwards;
  animation: ios6FadeOut 0.2s ease-out forwards;
}
.ios6-pjax-fade-in {
  -webkit-animation: ios6FadeIn 0.25s ease-in forwards;
  animation: ios6FadeIn 0.25s ease-in forwards;
}

@-webkit-keyframes ios6FadeOut {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ios6FadeOut {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
@-webkit-keyframes ios6FadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes ios6FadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* ========================
   过渡动画 — 左右滑动 (slide)
   ======================== */
.ios6-pjax-slide-out-left {
  -webkit-animation: ios6SlideOutLeft 0.3s ease-out forwards;
  animation: ios6SlideOutLeft 0.3s ease-out forwards;
}
.ios6-pjax-slide-in-right {
  -webkit-animation: ios6SlideInRight 0.3s ease-out forwards;
  animation: ios6SlideInRight 0.3s ease-out forwards;
}
.ios6-pjax-slide-out-right {
  -webkit-animation: ios6SlideOutRight 0.3s ease-out forwards;
  animation: ios6SlideOutRight 0.3s ease-out forwards;
}
.ios6-pjax-slide-in-left {
  -webkit-animation: ios6SlideInLeft 0.3s ease-out forwards;
  animation: ios6SlideInLeft 0.3s ease-out forwards;
}

@-webkit-keyframes ios6SlideOutLeft {
  0%   { -webkit-transform: translateX(0);     opacity: 1; }
  100% { -webkit-transform: translateX(-100%); opacity: 0; }
}
@keyframes ios6SlideOutLeft {
  0%   { transform: translateX(0);     opacity: 1; }
  100% { transform: translateX(-100%); opacity: 0; }
}
@-webkit-keyframes ios6SlideInRight {
  0%   { -webkit-transform: translateX(100%); opacity: 0; }
  100% { -webkit-transform: translateX(0);    opacity: 1; }
}
@keyframes ios6SlideInRight {
  0%   { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0);    opacity: 1; }
}
@-webkit-keyframes ios6SlideOutRight {
  0%   { -webkit-transform: translateX(0);    opacity: 1; }
  100% { -webkit-transform: translateX(100%); opacity: 0; }
}
@keyframes ios6SlideOutRight {
  0%   { transform: translateX(0);    opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
@-webkit-keyframes ios6SlideInLeft {
  0%   { -webkit-transform: translateX(-100%); opacity: 0; }
  100% { -webkit-transform: translateX(0);     opacity: 1; }
}
@keyframes ios6SlideInLeft {
  0%   { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0);     opacity: 1; }
}

/* 防止滑动时水平溢出 */
.ios6-pjax-animating {
  overflow-x: hidden;
}
