* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 从 logo 提取的主题色 */
  --primary-green: #1FD15B;
  --primary-dark: #015d26;
  --secondary-dark: #2C3E50;
  --secondary-darker: #1A252F;
  --accent-light: #E8F8F0;
  --text-dark: #2C3E50;
  --text-light: #6C757D;
  --white: #FFFFFF;
  --error: #e74c3c;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* background: linear-gradient(135deg, #f0f9f4 0%, #e1f5e8 50%, #d4f1e0 100%); */
  background: var(--secondary-darker);
  overflow: hidden;
}

/* 登录页面样式 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px 35px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(10px);
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 35px;
}

.login-header h1 {
  color: var(--secondary-dark);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-header h1 img {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(31, 209, 91, 0.2));
}

.login-header p {
  color: var(--text-light);
  font-size: 14px;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  padding-left: 5px;
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
  background: #f8f9fa;
}

.form-group input:focus {
  border-color: var(--primary-green);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(31, 209, 91, 0.15);
}

.btn-login {
  width: 100%;
  padding: 15px;
  background: var(--primary-green);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(31, 209, 91, 0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 209, 91, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-message {
  color: var(--error);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  display: none;
  padding: 10px;
  background: #ffe6e6;
  border-radius: 8px;
}

.error-message.show {
  display: block;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* 直播页面样式 */
.live-header-wrap {
  display: none;
}

.live-header-wrap.active {
    display: block;
}

.live-header-wrap{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 4%;
}

.live-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  padding: 15px 20px;
}

.live-header h2 {
  color: var(--white);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-header h2 img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(31, 209, 91, 0.3));
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(31, 209, 91, 0.3);
}

.user-name {
  color: #fff;
  font-size: 14px;
}

.btn-logout {
  padding: 8px 16px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--primary-green);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: var(--primary-green);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(31, 209, 91, 0.4);
}

.cklink-live-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .login-box {
    padding: 30px 25px;
    border-radius: 15px;
  }

  .login-header h1 {
    font-size: 24px;
  }

  .form-group input {
    padding: 12px 16px;
    font-size: 16px; /* 防止iOS自动缩放 */
  }

  .btn-login {
    padding: 14px;
    font-size: 15px;
  }

  .live-header {
    padding: 12px 15px;
    flex-wrap: wrap;
  }

  .live-header h2 {
    font-size: 16px;
  }

  .user-info {
    gap: 8px;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .user-name {
    font-size: 13px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-logout {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 25px 20px;
  }

  .login-header h1 {
    font-size: 22px;
  }
}

