/* 现代温暖风格设计 - 登录页面 */

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 浅色主题（默认） */
:root,
[data-theme="light"] {
  --bg-primary: #F5F1E8;
  --bg-secondary: #FFFFFF;
  --bg-card: #FEFDFB;
  --text-primary: #1a1a1a;
  --text-secondary: #6B6B6B;
  --accent-primary: #6B7A5A;
  --accent-hover: #5A6849;
  --accent-light: #8A9A7A;
  --border-color: rgba(107, 122, 90, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 深色主题 */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-card: #262626;
  --text-primary: #F5F1E8;
  --text-secondary: #B0B0B0;
  --accent-primary: #8A9A7A;
  --accent-hover: #9BAA8A;
  --accent-light: #6B7A5A;
  --border-color: rgba(138, 154, 122, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Songti SC', 'SimSun', '宋体', STSong, serif, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  background: var(--bg-primary);
  transition: background-color 0.3s ease;
}

/* 移除原有的复杂背景 */
.grid-background,
#particles-js {
  display: none;
}

.main-container {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

/* 标题区域 */
.app-header {
  margin-bottom: 48px;
}

.title-container {
  margin-bottom: 16px;
}

.cyber-title {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  font-family: 'Songti SC', 'SimSun', '宋体', STSong, serif;
  transition: color 0.3s ease;
}

.cyber-title span {
  animation: none;
}

.app-description {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

/* 登录卡片 */
.content-area {
  margin-bottom: 40px;
}

.login-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-light));
  border-radius: 20px 20px 0 0;
}

.login-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
  font-family: 'Songti SC', 'SimSun', '宋体', STSong, serif;
  transition: color 0.3s ease;
}

.card-title i {
  display: none;
}

/* 表单 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  width: 100%;
  margin: 0;
}

/* 密码输入框 */
.password-field {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.cyber-input {
  width: 100%;
  height: 38px;
  padding: 0 44px 0 16px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.02em;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Songti SC', 'SimSun', '宋体', STSong, serif;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cyber-input:hover {
  border-color: var(--accent-light);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), var(--shadow-sm);
}

.cyber-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.05),
    0 0 0 4px rgba(107, 122, 90, 0.1);
}

.cyber-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* 密码可见性按钮 */
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  font-size: 18px;
  opacity: 0.7;
  transition: all 0.2s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.04);
  color: var(--accent-primary);
}

.toggle-password:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.06);
}

/* 提交按钮 */
.submit-btn {
  width: 100%;
  max-width: 320px;
  height: 38px;
  margin: 8px auto 0;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Songti SC', 'SimSun', '宋体', STSong, serif;
  box-shadow: var(--shadow-sm);
}

.submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.submit-btn:active {
  background: var(--accent-hover);
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.submit-btn i {
  font-size: 16px;
}

/* 错误消息 */
.error-message {
  background: #fff3f3;
  border: 1px solid #ffdbdb;
  color: #c41e3a;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 20px;
  text-align: left;
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  transition: all 0.3s ease;
}

[data-theme="dark"] .error-message {
  background: rgba(196, 30, 58, 0.15);
  border-color: rgba(196, 30, 58, 0.3);
  color: #ff6482;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* 页脚 */
.app-footer {
  margin-top: 40px;
}

.footer-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  transition: color 0.3s ease;
}

.footer-text a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-text a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .cyber-title {
    font-size: 44px;
  }
  
  .app-description {
    font-size: 17px;
  }
  
  .login-card {
    padding: 32px 28px;
  }
  
  .card-title {
    font-size: 21px;
  }
}

/* 平滑过渡 */
* {
  transition-property: background-color, border-color, color;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* 覆盖特定元素的过渡 */
.cyber-input,
.submit-btn,
.toggle-password {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
