/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  width: 1200px;
  max-width: 90%;
  margin: 0 auto;
  padding: 0 15px;
}

/* 头部样式 */
.header {
  background: linear-gradient(135deg, #ff4400 0%, #ff6b35 100%);
  color: white;
  padding: 12px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-bar {
  flex: 1;
  max-width: 500px;
  margin: 0 20px;
}

.search-bar form {
  display: flex;
}

.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  outline: none;
}

.search-bar button {
  background: #333;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 14px;
}

.user-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.user-nav a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.user-nav a:hover {
  color: #ffe6dc;
}

/* 登录页面样式 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 40px 0;
}

.login-box {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.login-tabs {
  display: flex;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: all 0.3s;
}

.tab-btn.active {
  background: white;
  color: #ff4400;
  border-bottom: 2px solid #ff4400;
  font-weight: 600;
}

.tab-content {
  padding: 30px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border 0.3s;
}

.form-group input:focus {
  border-color: #ff4400;
  outline: none;
}

.btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: #ff4400;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn:hover {
  background: #e63a00;
}

.btn-secondary {
  background: #666;
}

.btn-secondary:hover {
  background: #555;
}

/* 扫码登录样式 */
.qr-login {
  text-align: center;
  padding: 30px 0;
}

.qr-code {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #eee;
}

.qr-code span {
  color: #999;
  font-size: 14px;
}

.qr-tip {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}

/* 登录选项 */
.login-options {
  margin-top: 20px;
  text-align: center;
}

.login-options a {
  color: #ff4400;
  text-decoration: none;
  font-size: 14px;
  margin: 0 10px;
}

.login-options a:hover {
  text-decoration: underline;
}

.login-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
  color: #999;
  font-size: 12px;
}

/* 注册页面样式 */
.register-container {
  max-width: 400px;
  margin: 40px auto;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.register-title {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
  font-size: 24px;
}

.agreement {
  margin: 20px 0;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.agreement a {
  color: #ff4400;
  text-decoration: none;
}

.agreement a:hover {
  text-decoration: underline;
}

/* 个人资料页面样式 */
.profile-container {
  display: flex;
  gap: 30px;
  margin: 30px 0;
}

.sidebar {
  width: 200px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li a {
  display: block;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.3s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  background: #fff7f2;
  border-left-color: #ff4400;
  color: #ff4400;
}

.profile-content {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.avatar {
  position: relative;
  width: 80px;
  height: 80px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.avatar-upload {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #ff4400;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-form .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-form .form-group {
  flex: 1;
}

.gender-options {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.gender-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* 地址管理样式 */
.address-list {
  margin: 20px 0;
}

.address-item {
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  position: relative;
}

.address-item.default {
  border-color: #ff4400;
  background: #fff7f2;
}

.address-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.address-name {
  font-weight: 600;
}

.address-phone {
  color: #666;
}

.address-detail {
  color: #666;
  margin-bottom: 10px;
}

.address-actions {
  display: flex;
  gap: 10px;
}

.address-actions a {
  color: #ff4400;
  text-decoration: none;
  font-size: 14px;
}

.address-actions a:hover {
  text-decoration: underline;
}

.default-tag {
  background: #ff4400;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-left: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 15px;
  }

  .search-bar {
    width: 100%;
    margin: 10px 0;
  }

  .profile-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }
}