/**
 * 现代化头部导航样式
 * 包含玻璃拟态效果和动画
 */

/* 头部导航基础样式 */
.modern-header {
  min-width: 1200px;
  background: rgba(11, 87, 163, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 滚动时的头部样式 */
.modern-header-scrolled {
  background: rgba(11, 87, 163, 0.95);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 主内容区域 */
.modern-main {
  width: 100%;
  max-width: 1200px;
  padding: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  position: relative;
}

/* Logo 区域 */
.modern-logo {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 7px 0 7px 0;
  transition: all 0.3s ease;
}

.modern-logo img {
  width: 180px;
  height: 40px;
  transition: all 0.3s ease;
}

/* 导航菜单 */
.modern-nav {
  margin-left: 20px;
  display: flex;
}

.modern-nav li {
  position: relative;
}

.modern-nav li a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 68px;
  line-height: 68px;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

.modern-nav li a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
  border-radius: 3px;
  opacity: 0;
}

.modern-nav li a:hover,
.modern-nav li a.modern-act {
  color: #fff;
  background-color: transparent;
}

.modern-nav li a:hover:after,
.modern-nav li a.modern-act:after {
  width: 60%;
  opacity: 1;
}

.modern-nav li a.modern-hover-effect {
  transform: translateY(-2px);
}

/* 右侧信息区域 */
.modern-info {
  display: flex;
  align-items: center;
  margin-right: 0;
  padding-right: 0;
  position: absolute;
  right: 0;
  top: 0;
  height: 68px;
}

.modern-info > li {
  position: relative;
}

/* 消息通知 */
.modern-info > li.modern-msmq {
  margin-right: 10px;
}

.modern-info > li.modern-msmq a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.modern-info > li.modern-msmq:hover a {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.modern-info > li.modern-msmq a i.icon-bell-alt {
  font-size: 18px;
  color: #fff;
  transition: all 0.3s ease;
}

.modern-info > li.modern-msmq a i.modern-notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  font-style: normal;
  font-size: 12px;
  text-align: center;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  background-color: #ff6b00;
  color: #fff;
  border-radius: 9px;
  padding: 0 5px;
  box-shadow: 0 2px 5px rgba(255, 107, 0, 0.5);
  font-weight: bold;
}

/* 头像区域 */
.modern-info > li.modern-avatar {
  position: relative;
  margin-right: 0;
}

.modern-info > li.modern-avatar .modern-avatar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  margin: 10px 0 10px 0;
}

.modern-info > li.modern-avatar:hover .modern-avatar-link {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modern-info > li.modern-avatar .modern-avatar-link img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.modern-info > li.modern-avatar .modern-avatar-link em {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

/* 用户卡片 */
.modern-user-card {
  position: absolute;
  top: 78px;
  right: 0;
  width: 320px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 1000;
  transition: all 0.3s ease;
  transform-origin: top right;
  display: none;
}

.modern-user-card:before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.95);
  transform: rotate(45deg);
  border-radius: 2px;
  z-index: -1;
}

/* 用户卡片顶部横幅 */
.modern-user-card .modern-banner {
  background: linear-gradient(135deg, #3cb2e7, #0b57a3);
  padding: 20px;
  display: flex;
  align-items: center;
}

.modern-user-card .modern-banner .modern-user-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modern-user-card .modern-banner .modern-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modern-user-card .modern-banner .modern-user-info {
  margin-left: 15px;
}

.modern-user-card .modern-banner .modern-user-info p {
  color: #fff;
  margin: 0;
}

.modern-user-card .modern-banner .modern-user-info p.modern-username {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.modern-user-card .modern-banner .modern-user-info p.modern-user-id {
  font-size: 13px;
  opacity: 0.8;
}

/* 最近观看记录 */
.modern-user-card .modern-recent {
  padding: 15px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modern-user-card .modern-recent > ul > li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.modern-user-card .modern-recent > ul > li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.modern-user-card .modern-recent h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #333;
  margin: 0 0 5px;
}

.modern-user-card .modern-recent h4 i {
  color: #0b57a3;
  margin-right: 5px;
}

.modern-user-card .modern-recent h4 a {
  color: #ff6b00;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modern-user-card .modern-recent h4 a:hover {
  color: #ff4500;
}

.modern-user-card .modern-recent p {
  font-size: 13px;
  color: #666;
  margin: 0;
  padding-left: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 操作按钮区域 */
.modern-user-card .modern-operate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #f9f9f9;
}

.modern-user-card .modern-operate a {
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.modern-user-card .modern-operate a.modern-set {
  color: #0b57a3;
  background: rgba(11, 87, 163, 0.1);
}

.modern-user-card .modern-operate a.modern-set:hover {
  background: rgba(11, 87, 163, 0.2);
}

.modern-user-card .modern-operate a.modern-exit {
  color: #fff;
  background: #ff6b00;
  box-shadow: 0 2px 5px rgba(255, 107, 0, 0.3);
}

.modern-user-card .modern-operate a.modern-exit:hover {
  background: #ff4500;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(255, 107, 0, 0.4);
}

/* 动画效果 */
@keyframes bell-ring {
  0% {
    transform: rotate(0);
  }
  10% {
    transform: rotate(15deg);
  }
  20% {
    transform: rotate(-15deg);
  }
  30% {
    transform: rotate(10deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(5deg);
  }
  60% {
    transform: rotate(-5deg);
  }
  70% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(0);
  }
}

.modern-bell-animation {
  animation: bell-ring 0.8s ease;
}

/* 内容区域上边距，为固定导航腾出空间 */
.modern-content {
  margin-top: 88px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
}

/* 响应式调整 */
@media screen and (max-width: 1366px) {
  .modern-header {
    min-width: 1024px;
  }

  .modern-main {
    max-width: 1024px;
    padding: 0;
  }

  .modern-info {
    right: 0;
  }

  .modern-nav {
    margin-left: 10px;
  }

  .modern-nav li a {
    padding: 0 15px;
  }

  .modern-content {
    max-width: 1024px;
  }
}
