/* ===== CSS Variables ===== */
:root {
  --primary: #3B82F6;
  --primary-light: #EFF6FF;
  --primary-dark: #1E40AF;
  --bg: #F0F5FA;
  --white: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --border: #E2E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --shadow: 0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.04);
  --radius: 8px;
  --radius-lg: 12px;
}

[v-cloak] { display: none; }

/* ===== Homepage ===== */
.homepage { min-height: 100vh; background: var(--white); }

/* ===== Header ===== */
.home-header {
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 50%, #60A5FA 100%);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  .home-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;

    .logo-icon {
      width: 36px;
      height: 36px;
      background: rgba(255,255,255,.2);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
    }

    h1 {
      font-size: 20px;
      font-weight: 600;
      letter-spacing: 1px;
      color: #fff;
    }
  }

  .home-nav {
    display: flex;
    align-items: center;
    gap: 20px;

    a {
      color: rgba(255,255,255,.85);
      font-size: 15px;
      padding: 6px 0;
      border-bottom: 2px solid transparent;
      transition: .2s;

      &:hover, &.active {
        color: #fff;
        border-bottom-color: #fff;
      }
    }

    .btn-login {
      background: rgba(255,255,255,.2);
      padding: 6px 20px;
      border-radius: 20px;
      border: 1px solid rgba(255,255,255,.4);
      font-size: 14px;
      cursor: pointer;
      transition: .2s;

      &:hover {
        background: rgba(255,255,255,.3);
      }
    }

    .user-info {
      display: flex;
      align-items: center;
      gap: 12px;
      color: rgba(255,255,255,.9);
      font-size: 14px;

      .user-name {
        font-weight: 600;
        color: #93C5FD;
      }
    }

    .logout-btn {
      color: rgba(255,255,255,.7);
      font-size: 13px;
      cursor: pointer;
      transition: .2s;

      &:hover { color: #fff; }
    }
  }
}

/* ===== Banner ===== */
.banner {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.banner-bg {
  position: absolute;
  inset: 0;
  background: url('/zhwyShouye/images/banner-bg.png') center center / cover no-repeat;
}

.banner-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(15,27,61,.88) 0%,
    rgba(30,58,138,.78) 25%,
    rgba(37,99,235,.6) 55%,
    rgba(96,165,250,.45) 100%);
}

.banner-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.banner-dot1,.banner-dot2,.banner-dot3,.banner-dot4,.banner-dot5 {
  position: absolute;
  border-radius: 50%;
  background: rgba(147,197,253,.6);
  box-shadow: 0 0 12px rgba(147,197,253,.5);
  animation: dotFloat 5s ease-in-out infinite;
  z-index: 2;
}
.banner-dot1 { top:15%; left:12%; animation-delay:0s; width:8px; height:8px; }
.banner-dot2 { top:25%; right:20%; animation-delay:1.2s; width:6px; height:6px; }
.banner-dot3 { top:50%; left:25%; animation-delay:2.4s; width:10px; height:10px; }
.banner-dot4 { top:12%; right:30%; animation-delay:.8s; width:7px; height:7px; }
.banner-dot5 { top:55%; right:15%; animation-delay:3s; width:6px; height:6px; }

@keyframes dotFloat {
  0%,100% { transform: translateY(0); opacity:.4; }
  50% { transform: translateY(-16px); opacity:1; }
}

.banner-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px;
  display: flex;
  align-items: center;
  gap: 60px;
  height: 100%;
}

.banner-text {
  flex: 1;

  .sub-title {
    display: inline-block;
    font-size: 12px;
    color: rgba(255,255,255,.6);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding: 4px 14px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px;
  }

  h2 {
    font-size: 32px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.35;
    letter-spacing: 3px;

    em {
      font-style: normal;
      color: #93C5FD;
    }
  }

  p {
    font-size: 14px;
    color: rgba(255,255,255,.7);
    line-height: 1.8;
  }
}

.banner-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  z-index: 2;
}

/* ===== News Section ===== */
.home-news {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;

  .news-layout {
    display: flex;
    gap: 24px;
    height: 340px;
    margin-top: 10px;
  }
}

.news-carousel {
  position: relative;
  flex: 0 0 55%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);

  .swiper {
    width: 100%;
    height: 100%;
  }

  .swiper-slide {
    cursor: pointer;

    .carousel-slide-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .carousel-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 16px 20px;
      background: linear-gradient(transparent, rgba(0,0,0,.65));
      color: #fff;

      h4 {
        font-size: 15px;
        font-weight: 500;
        line-height: 1.5;
        text-shadow: 0 1px 3px rgba(0,0,0,.3);
      }
    }
  }

  .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,.45);
    opacity: 1;
    transition: .2s;
  }

  .swiper-pagination-bullet-active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
  }
}

.news-list {
  flex: 1;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;

  .nl-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;

    h3 {
      font-size: 16px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;

      &::before {
        content: '';
        width: 3px;
        height: 16px;
        background: var(--primary);
        border-radius: 2px;
      }

      span {
        color: var(--primary);
        font-weight: 700;
      }
    }

    a, .more-link {
      font-size: 13px;
      color: var(--primary);
      cursor: pointer;
      text-decoration: none;
    }
  }

  ul {
    list-style: none;
    flex: 1;
    overflow: hidden;
    padding: 4px 0;
    margin: 0;
  }

  li {
    padding: 10px 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: .15s;
    cursor: pointer;
    line-height: 1.5;

    &:hover {
      background: var(--primary-light);
    }

    .dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--primary);
      flex-shrink: 0;
      margin-top: 8px;
    }

    .n-title {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .n-date {
      font-size: 12px;
      color: var(--text-light);
      flex-shrink: 0;
      margin-left: 8px;
    }
  }
}

/* ===== Section Header ===== */
.section-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 48px;

  h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;

    &::before {
      content: '';
      width: 4px;
      height: 20px;
      background: var(--primary);
      border-radius: 2px;
    }
  }

  a {
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
  }
}

/* ===== Function Grid (信息集成) ===== */
.home-functions {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;

  .func-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;

    &::before {
      content: '';
      width: 4px;
      height: 20px;
      background: var(--primary);
      border-radius: 2px;
    }
  }

  .func-grid {
    display: flex;
    gap: 20px;
  }

  .func-item {
    flex: 1;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: .3s;

    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(59,130,246,.12);
    }

    img {
      width: 48px;
      height: 48px;
      margin-bottom: 10px;
    }

    .func-name {
      font-size: 14px;
      font-weight: 500;
      color: var(--text);
    }
  }
}

/* ===== Content Section ===== */
.home-content {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.content-box {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;

  .content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);

    h3 {
      font-size: 16px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;

      &::before {
        content: '';
        width: 3px;
        height: 16px;
        background: var(--primary);
        border-radius: 2px;
      }
    }

    a, .more-link {
      font-size: 13px;
      color: var(--primary);
      cursor: pointer;
      text-decoration: none;
    }
  }

  .content-list {
    padding: 8px 0;
  }

  .content-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    transition: .15s;
    cursor: pointer;

    &:hover {
      background: var(--primary-light);
    }

    .title {
      font-size: 14px;
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .date {
      font-size: 12px;
      color: var(--text-light);
      margin-left: 16px;
      flex-shrink: 0;
    }
  }
}

/* ===== Video Section ===== */
.home-video {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;

  .video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .video-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: .3s;
    cursor: pointer;

    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(59,130,246,.12);
    }

    .video-thumb {
      height: 160px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      background: linear-gradient(135deg, #1E3A8A, #3B82F6);

      video {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }

    .play-btn {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: rgba(255,255,255,.3);
      backdrop-filter: blur(4px);
      color: #fff;
      font-size: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: .2s;
      position: absolute;
    }

    &:hover .play-btn {
      background: rgba(255,255,255,.5);
      transform: scale(1.1);
    }

    .video-info {
      padding: 16px;

      h4 {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 6px;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      p {
        font-size: 12px;
        color: var(--text-light);
        line-height: 1.5;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }
}

/* ===== Footer ===== */
.home-footer {
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 50%, #60A5FA 100%);
  color: #93C5FD;
  text-align: center;
  padding: 24px;
  margin-top: 48px;
  font-size: 13px;

  p {
    margin: 4px 0;
  }

  span {
    color: #93C5FD;
  }

  .contact-link {
    cursor: pointer;
    transition: color .2s;

    &:hover { color: #fff; }
  }
}

/* ===== Login Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 400px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  position: relative;
  animation: modalIn .25s ease;

  h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 8px;
  }

  .sub {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 32px;
  }

  .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-light);
    transition: .2s;
    cursor: pointer;

    &:hover { background: #E2E8F0; }
  }

  .form-group {
    margin-bottom: 20px;

    label {
      display: block;
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 6px;
      color: var(--text);
    }

    input, select {
      width: 100%;
      height: 42px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 0 14px;
      font-size: 14px;
      transition: .2s;
      outline: none;

      &:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(59,130,246,.1);
      }
    }
  }

  .captcha-group {
    display: flex;
    gap: 12px;

    input { flex: 1; }

    .captcha-img {
      height: 42px;
      border-radius: var(--radius);
      cursor: pointer;
      border: 1px solid var(--border);
      flex-shrink: 0;
    }
  }

  .login-error {
    background: #FEF2F2;
    color: #DC2626;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid #FECACA;
  }

  .btn-submit {
    width: 100%;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    transition: .2s;
    cursor: pointer;

    &:hover { background: var(--primary-dark); }
    &:disabled { opacity: .6; cursor: not-allowed; }
  }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Element UI Dialog Override ===== */
.el-message-box { border-radius: 16px; border: 0; width: 860px; }
.el-message-box__header { background: var(--primary); border-radius: 16px 16px 0 0; padding: 16px 20px; }
.el-message-box__title span { color: #fff; font-weight: 600; font-size: 16px; }
.el-icon-close:before { color: #fff; }

.lxtitle { text-align: center; color: var(--primary); font-weight: 600; font-size: 18px; padding: 8px 0; margin-bottom: 8px; }
.lxli {
  display: flex; margin: 12px 0; font-size: 16px;
  div:first-child { width: 30%; line-height: 36px; text-align: right; }
  div:last-child { width: 50%; border-radius: 6px; padding: 6px 12px; margin-left: 10px; background: #f5f7fa; border: 1px solid var(--border); }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .home-header { padding: 0 20px; }
  .home-content { grid-template-columns: 1fr; }
  .home-video .video-grid { grid-template-columns: repeat(2, 1fr); }
  .home-functions .func-grid { flex-wrap: wrap; }
  .news-layout { flex-direction: column; height: auto; }
  .news-carousel { flex: none; height: 240px; }
  .news-list { flex: none; }
}
