/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

/* 卡片样式 */
.login-card, .user-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.logo {
  text-align: center;
  margin-bottom: 24px;
}

.logo h1 {
  font-size: 24px;
  color: #24292e;
  font-weight: 600;
}

/* 标签页样式 */
.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid #e1e4e8;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 16px;
  font-size: 16px;
  color: #586069;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn:hover {
  color: #24292e;
}

.tab-btn.active {
  color: #0366d6;
  font-weight: 500;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #0366d6;
}

/* 表单内容样式 */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #0366d6;
  box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.error-message {
  color: #d73a49;
  font-size: 14px;
  margin-top: 4px;
  min-height: 20px;
}

/* 验证码按钮样式 */
.code-group {
  display: flex;
  gap: 10px;
}

.code-group input {
  flex: 1;
}

.code-btn {
  white-space: nowrap;
  padding: 0 12px;
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  font-size: 14px;
  color: #24292e;
  cursor: pointer;
  transition: all 0.3s ease;
}

.code-btn:hover {
  background-color: #e1e4e8;
}

.code-btn:disabled {
  background-color: #f6f8fa;
  color: #959da5;
  cursor: not-allowed;
}

/* 提交按钮样式 */
.submit-btn {
  width: 100%;
  padding: 12px;
  background-color: #2ea44f;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #2c974b;
}

.submit-btn:disabled {
  background-color: #94d3a2;
  cursor: not-allowed;
}

/* GitHub按钮样式 */
.github-btn {
  width: 100%;
  padding: 12px;
  background-color: #24292e;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.3s ease;
}

.github-btn:hover {
  background-color: #1b1f23;
}

.github-btn svg {
  fill: #fff;
}

/* 表单底部样式 */
.form-footer {
  margin-top: 16px;
  text-align: center;
}

.form-footer a {
  color: #0366d6;
  text-decoration: none;
  font-size: 14px;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* 状态消息样式 */
.status-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.status-message.error {
  background-color: #ffebe9;
  color: #d73a49;
  border: 1px solid #f97583;
  display: block;
}

.status-message.success {
  background-color: #e6ffed;
  color: #22863a;
  border: 1px solid #85e89d;
  display: block;
}

/* 用户信息卡片样式 */
.user-card {
  display: none;
}

.user-card h2 {
  font-size: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.user-info-content {
  margin-bottom: 24px;
}

.info-item {
  display: flex;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eaecef;
}

.info-item .label {
  flex: 0 0 100px;
  font-weight: 500;
  color: #586069;
}

.info-item .value {
  flex: 1;
  color: #24292e;
  word-break: break-all;
}

.logout-btn {
  width: 100%;
  padding: 12px;
  background-color: #f6f8fa;
  color: #24292e;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background-color: #e1e4e8;
}

/* 提示框样式 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  background-color: #24292e;
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* 响应式样式 */
@media (max-width: 576px) {
  .container {
    padding: 10px;
  }
  
  .login-card, .user-card {
    padding: 20px;
  }
  
  .auth-tabs button {
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .github-btn {
    width: 100%;
  }
  
  .code-btn {
    padding: 0 8px;
    font-size: 12px;
  }
}