/* ============================================================
   楚汉争霸 - 登录页面样式
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
  overflow: hidden;
}

#app {
  min-height: 100vh;
  background-image: url('images/welcome-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.main-container {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  width: 100%;
  max-width: 420px;
}

/* 标题区 */
header {
  margin-bottom: 30px;
}

header h1 {
  font-size: 48px;
  color: #f0c040;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
  letter-spacing: 8px;
}

header .subtitle {
  font-size: 16px;
  color: #aaa;
  letter-spacing: 2px;
}

/* 登录/注册卡片 */
.auth-card {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid #334;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* 标签切换 */
.auth-tabs {
  display: flex;
  margin-bottom: 25px;
  border-bottom: 1px solid #334;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.tab-btn:hover {
  color: #ccc;
}

.tab-btn.active {
  color: #f0c040;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #f0c040;
}

/* 表单 */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  background: #252540;
  border: 1px solid #334;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 15px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #f0c040;
}

.form-group input::placeholder {
  color: #666;
}

/* 按钮 */
.btn-primary {
  background: linear-gradient(135deg, #2471a3, #1a5276);
  color: white;
  border: none;
  padding: 14px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2e86c1, #1f618d);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  width: 100%;
}

/* 提示信息 */
.auth-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.auth-message.show {
  display: block;
}

.auth-message.error {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

.auth-message.success {
  background: rgba(39, 174, 96, 0.2);
  border: 1px solid #27ae60;
  color: #27ae60;
}

/* 底部 */
footer {
  margin-top: 30px;
  font-size: 12px;
  color: #666;
}

/* 加载动画 */
.loading {
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 响应式 */
@media (max-width: 480px) {
  header h1 {
    font-size: 36px;
    letter-spacing: 4px;
  }
  
  .auth-card {
    padding: 20px;
  }
  
  .main-container {
    padding: 15px;
  }
}
