﻿/* ============================================
   登录页样式 - 气泡云布局版
   适配：PC大屏/中屏/小屏 + 手机端
   ============================================ */

/* ---- 基础重置 ---- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #faf8ff 0%, #f0ebfa 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- 容器 ---- */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - 70px);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #e8e0f0;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.logo-text img {
  height: 90px;
  max-height: 90px;
  display: block;
}

.logo-text {
  padding: 4px 8px;
  font-size: 12px;
  color: #6a0dad;
  flex-shrink: 0;
}

.contact {
  background: linear-gradient(135deg, #f9f5ff 0%, #f0e6fa 100%);
  padding: 6px 14px;
  border: 1px solid #d4c4e8;
  border-radius: 20px;
  font-size: 12px;
  color: #6a0dad;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s;
}

.contact:hover {
  background: linear-gradient(135deg, #6a0dad 0%, #9b3ddb 100%);
  color: white;
  border-color: transparent;
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  display: flex;
  gap: 0;
  min-height: 0;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  margin: 0 auto;
}

/* ---- 左侧面板 ---- */
.left-panel {
  flex: 0 0 55%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

/* ---- 气泡云容器 ---- */
.flower-layout {
  position: relative;
  width: 100%;
  aspect-ratio: 1.35 / 1;
  margin: 0 auto;
}

/* ---- 气泡基础样式 ---- */
.petal {
  position: absolute;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 35% 25%, #ffffff 0%, #f8f5ff 40%, #f0ebfa 100%);
  border: none;
  box-shadow:
    0 6px 20px rgba(106, 13, 173, 0.08),
    0 2px 6px rgba(106, 13, 173, 0.05),
    inset 0 -2px 8px rgba(106, 13, 173, 0.03);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
  animation: float 5s ease-in-out infinite;
  overflow: hidden;
}

.petal::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 20%;
  width: 30%;
  height: 20%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.2));
  filter: blur(2px);
  pointer-events: none;
  z-index: 1;
}

.petal::after {
  content: '';
  position: absolute;
  bottom: 5%;
  right: 15%;
  width: 40%;
  height: 30%;
  border-radius: 50%;
  background: linear-gradient(315deg, rgba(106,13,173,0.04), transparent);
  filter: blur(3px);
  pointer-events: none;
}

.petal:hover {
  transform: scale(1.15) translateY(-4px);
  box-shadow:
    0 14px 40px rgba(106, 13, 173, 0.15),
    0 6px 15px rgba(106, 13, 173, 0.1);
  z-index: 20;
}

/* 气泡内容 */
.petal .petal-title {
  font-size: 14px;
  font-weight: 700;
  color: #6a0dad;
  line-height: 1.2;
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}

.petal .petal-desc {
  font-size: 11px;
  color: #666;
  line-height: 1.25;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.petal .petal-sub {
  font-size: 10px;
  color: #aaa;
  margin-top: 1px;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

/* ---- 花心（核心气泡）---- */
.petal.petal-center {
  width: 26%;
  height: 20%;
  left: 37%;
  top: 34%;
  background: radial-gradient(ellipse at 35% 25%, #8e3ddb 0%, #7e2dcb 30%, #6a0dad 70%, #5a0a9d 100%);
  border: none;
  box-shadow:
    0 10px 35px rgba(106, 13, 173, 0.35),
    0 4px 12px rgba(106, 13, 173, 0.25),
    inset 0 2px 6px rgba(255, 255, 255, 0.25);
  z-index: 10;
  animation-delay: 0s;
}

.petal.petal-center::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 20%;
  width: 30%;
  height: 20%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.1));
  filter: blur(2px);
  pointer-events: none;
  z-index: 1;
}

.petal.petal-center::after {
  background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.05));
}

.petal.petal-center .petal-title {
  color: white;
  font-size: 15px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.petal.petal-center .petal-desc {
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
}

.petal.petal-center .petal-sub {
  color: rgba(255, 255, 255, 0.8);
}

/* ---- 外围气泡位置（有机分布）---- */
.petal:nth-child(2) {
  width: 20%;
  height: 15%;
  left: 3%;
  top: 4%;
  animation-delay: 0.3s;
}

.petal:nth-child(3) {
  width: 20%;
  height: 15%;
  left: 76%;
  top: 2%;
  animation-delay: 0.7s;
}

.petal:nth-child(4) {
  width: 20%;
  height: 15%;
  left: 78%;
  top: 30%;
  animation-delay: 1.1s;
}

.petal:nth-child(5) {
  width: 20%;
  height: 15%;
  left: 70%;
  top: 70%;
  animation-delay: 1.5s;
}

.petal:nth-child(6) {
  width: 20%;
  height: 15%;
  left: 6%;
  top: 72%;
  animation-delay: 1.9s;
}

.petal:nth-child(7) {
  width: 20%;
  height: 15%;
  left: 1%;
  top: 36%;
  animation-delay: 2.3s;
}

.petal:nth-child(8) {
  width: 26%;
  height: 13%;
  left: 38%;
  top: 4%;
  animation-delay: 2.7s;
}

/* ---- 浮动动画 ---- */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.petal:hover {
  animation-play-state: paused;
}

/* ============================================
   右侧登录面板
   ============================================ */

.right-panel {
  flex: 0 0 35%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(106, 13, 173, 0.08);
  backdrop-filter: blur(10px);
}

.btn-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.btn {
  width: 160px;
  min-width: 160px;
  height: 34px;
  flex-shrink: 0;
  flex-grow: 0;
  white-space: nowrap;
  padding: 0 12px;
  border: 1px solid #6a0dad;
  border-radius: 8px;
  background: white;
  color: #6a0dad;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.btn:hover {
  background: #6a0dad;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 13, 173, 0.25);
}

.input-group {
  margin-bottom: 6px;
  width: 100%;
}

.input-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #e0d4ee;
  border-radius: 8px;
  font-size: 13px;
  color: #6a0dad;
  background: white;
  transition: all 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: #6a0dad;
  box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1);
}

.input-group input::placeholder {
  color: #bbb;
}

.switch-login {
  width: 100%;
  text-align: right;
  margin: 2px 0 6px;
  font-size: 12px;
  color: #6a0dad;
  cursor: pointer;
  transition: opacity 0.2s;
}

.switch-login:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.yzm-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

.yzm-container input {
  flex: 1;
}

.yzm-btn {
  width: auto;
  min-width: 100px;
  white-space: nowrap;
  font-size: 12px;
  height: 34px;
}

/* 协议勾选区域 */
.agreement-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
  gap: 4px;
}

.agreement-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #6a0dad;
  cursor: pointer;
}

.agreement-row label {
  color: #6a0dad;
  cursor: pointer;
  line-height: 1.4;
}

.agreement-row .text-dark {
  color: #333;
}

.agreement-row .text-link {
  color: #6a0dad;
  cursor: pointer;
  text-decoration: none;
}

.agreement-row .text-link:hover {
  text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
  width: 100%;
  height: 38px;
  background: linear-gradient(135deg, #6a0dad 0%, #8e3ddb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 4px;
}

.login-btn:hover {
  background: linear-gradient(135deg, #5a0a9d 0%, #7e2dcb 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(106, 13, 173, 0.3);
}

.footer-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  justify-content: center;
}

.footer-btn span {
  color: #6a0dad;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.footer-btn span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #6a0dad;
  transition: width 0.3s;
}

.footer-btn span:hover::after {
  width: 100%;
}

/* ============================================
   响应式适配 - 大屏
   ============================================ */
@media (min-width: 1400px) {
  .flower-layout {
    max-width: 540px;
  }

  .petal .petal-title {
    font-size: 13px;
  }

  .petal .petal-desc {
    font-size: 10px;
  }

  .petal .petal-sub {
    font-size: 9px;
  }

  .petal.petal-center .petal-title {
    font-size: 14px;
  }

  .right-panel {
    padding: 16px 20px;
  }
}

@media (min-width: 1600px) {
  .container {
    padding: 12px 20px;
  }

  .flower-layout {
    max-width: 580px;
  }

  .petal .petal-title {
    font-size: 14px;
  }

  .petal .petal-desc {
    font-size: 11px;
  }

  .petal .petal-sub {
    font-size: 10px;
  }


}

/* ============================================
   响应式适配 - 中屏
   ============================================ */
@media (max-width: 1100px) {
  .main-content {
    gap: 20px;
  }

  .flower-layout {
    max-width: 420px;
  }

  .right-panel {
    padding: 6px 12px;
  }

  .btn {
    width: 120px;
    min-width: 120px;
    font-size: 12px;
  }
}

/* ============================================
   响应式适配 - 小屏（平板/小笔记本）
   ============================================ */
@media (max-width: 900px) {
  .container {
    padding: 8px 16px;
  }

  .main-content {
    gap: 12px;
  }

  .flower-layout {
    max-width: 340px;
  }

  .petal .petal-title {
    font-size: 10px;
  }

  .petal .petal-desc {
    font-size: 8px;
  }

  .petal .petal-sub {
    font-size: 7px;
  }

  .petal.petal-center .petal-title {
    font-size: 11px;
  }

  .petal.petal-center .petal-desc {
    font-size: 9px;
  }

  .right-panel {
    padding: 8px;
    gap: 4px;
  }

  .btn {
    width: 110px;
    min-width: 110px;
    height: 32px;
    font-size: 11px;
  }

  .input-group input {
    padding: 8px 10px;
    font-size: 12px;
  }

  .login-btn {
    height: 36px;
    font-size: 13px;
  }
}

/* ============================================
   响应式适配 - 手机端（上下排列）
   ============================================ */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
  }

  .container {
    min-height: auto;
    padding: 8px 12px;
  }

  .header {
    margin-bottom: 8px;
    padding: 4px 0;
  }

  .logo-text img {
    height: 48px;
    max-height: 48px;
  }

  .contact {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
  }

  /* 手机端 header-banner 压缩 */
  .header-banner {
    max-height: 60px !important;
    margin: 0 8px !important;
  }

  .header-banner img {
    height: 60px !important;
  }

  .main-content {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    margin: 0 auto;
  }

  /* 上方气泡云 */
  .left-panel {
    flex: none;
    width: 100%;
    max-width: 100%;
    padding: 4px;
    order: 0;
  }

  .flower-layout {
    max-width: 100%;
    aspect-ratio: 1.5 / 1;
    min-height: 220px;
    max-height: 280px;
  }

  /* 手机端气泡重新分布 - 横向扁圆 */
  .petal.petal-center {
    width: 28%;
    height: 24%;
    left: 36%;
    top: 24%;
  }

  .petal.petal-center .petal-title {
    font-size: 13px;
  }

  .petal.petal-center .petal-desc {
    font-size: 11px;
  }

  .petal:nth-child(2) {
    width: 22%;
    height: 20%;
    left: 6%;
    top: 10%;
  }

  .petal:nth-child(3) {
    width: 22%;
    height: 20%;
    left: 66%;
    top: 6%;
  }

  .petal:nth-child(4) {
    width: 22%;
    height: 20%;
    left: 72%;
    top: 40%;
  }

  .petal:nth-child(5) {
    width: 22%;
    height: 20%;
    left: 66%;
    top: 66%;
  }

  .petal:nth-child(6) {
    width: 22%;
    height: 20%;
    left: 8%;
    top: 68%;
  }

  .petal:nth-child(7) {
    width: 22%;
    height: 20%;
    left: 3%;
    top: 42%;
  }

  .petal:nth-child(8) {
    width: 22%;
    height: 20%;
    left: 38%;
    top: 4%;
  }

  .petal .petal-title {
    font-size: 12px;
  }

  .petal .petal-desc {
    font-size: 10px;
    display: block;
  }

  .petal .petal-sub {
    font-size: 9px;
  }

  /* 下方登录表单 */
  .right-panel {
    flex: none;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    order: 1;
    padding: 12px 16px;
    gap: 6px;
  }

  .btn-group {
    justify-content: center;
    margin-bottom: 4px;
  }

  .btn {
    width: 130px;
    min-width: 130px;
    height: 36px;
    font-size: 13px;
  }

  .input-group {
    margin-bottom: 8px;
  }

  .input-group input {
    padding: 12px 14px;
    font-size: 14px;
  }

  .login-btn {
    height: 42px;
    font-size: 15px;
  }

  .footer-btn {
    gap: 12px;
    font-size: 13px;
  }
}

/* ============================================
   超小屏手机
   ============================================ */
@media (max-width: 480px) {
  .flower-layout {
    min-height: 180px;
    max-height: 240px;
  }

  .petal .petal-title {
    font-size: 8px;
  }

  .petal .petal-sub {
    font-size: 6px;
  }

  .petal.petal-center .petal-title {
    font-size: 9px;
  }

  .right-panel {
    padding: 10px;
  }

  .btn {
    width: 120px;
    min-width: 120px;
  }
}

/* ============================================
   协议弹窗（HTML 内联样式补充）
   ============================================ */
#agreementModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

#agreementModal > div {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

#agreementModal h3 {
  text-align: center;
  color: #6a0dad;
  margin-bottom: 16px;
  font-size: 18px;
}

#agreementModal h4 {
  color: #333;
  margin: 16px 0 8px 0;
  font-size: 15px;
}

#agreementModal p {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 8px;
  color: #555;
}

#confirmAgreement {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #6a0dad 0%, #8e3ddb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 8px;
  transition: all 0.3s;
}

#confirmAgreement:hover {
  background: linear-gradient(135deg, #5a0a9d 0%, #7e2dcb 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(106, 13, 173, 0.3);
}



