:root {
  --auth-primary: #667eea;
  --auth-primary-dark: #764ba2;
  --auth-success: #10B981;
  --auth-error: #EF4444;
  --auth-text: #1F2937;
  --auth-text-muted: #6B7280;
  --auth-bg: #F9FAFB;
  --auth-card-bg: #FFFFFF;
  --auth-border: #E5E7EB;
  --auth-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --auth-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.auth-container,
.vip-container,
.profile-container,
.history-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card,
.vip-card {
  background: var(--auth-card-bg);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--auth-shadow-lg);
  text-align: center;
}

.auth-card h1,
.vip-card h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--auth-text);
  margin-bottom: 8px;
}

.auth-card .subtitle {
  color: var(--auth-text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--auth-bg);
  padding: 4px;
  border-radius: 12px;
}

.tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: white;
  color: var(--auth-primary);
  box-shadow: var(--auth-shadow);
}

.tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: transparent;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.input-group {
  margin-bottom: 16px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--auth-border);
  border-radius: 12px;
  font-size: 16px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  border-color: var(--auth-primary);
}

.input-group input::placeholder {
  color: var(--auth-text-muted);
}

.code-group {
  display: flex;
  gap: 12px;
}

.code-group input {
  flex: 1;
}

.btn-code {
  padding: 14px 20px;
  background: var(--auth-bg);
  border: 2px solid var(--auth-border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-code:hover:not(:disabled) {
  background: var(--auth-primary);
  color: white;
  border-color: var(--auth-primary);
}

.btn-code:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.wechat-login {
  padding: 20px 0;
}

.wechat-login p {
  color: var(--auth-text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.wechat-login .qrcode {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.wechat-login .hint {
  font-size: 12px;
  color: var(--auth-text-muted);
}

.wechat-login .wechat-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(7, 193, 96, 0.3);
}

.wechat-login h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 8px;
}

.wechat-login .wechat-desc {
  font-size: 14px;
  color: var(--auth-text-muted);
  margin-bottom: 24px;
}

.btn-wechat {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-wechat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(7, 193, 96, 0.4);
}

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

.wechat-login .wechat-hint {
  font-size: 12px;
  color: var(--auth-text-muted);
  margin-top: 16px;
}

.vip-benefits {
  text-align: left;
  margin-bottom: 24px;
}

.vip-benefits h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 12px;
}

.vip-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vip-benefits li {
  padding: 8px 0;
  color: var(--auth-text-muted);
  font-size: 14px;
}

.vip-price {
  margin-bottom: 24px;
}

.vip-price .price {
  font-size: 48px;
  font-weight: 700;
  color: var(--auth-primary);
}

.vip-price .period {
  font-size: 16px;
  color: var(--auth-text-muted);
}

.vip-note {
  font-size: 12px;
  color: var(--auth-text-muted);
  margin-top: 16px;
}

.vip-status {
  font-size: 18px;
  color: var(--auth-success);
  margin-bottom: 8px;
}

.vip-expire {
  color: var(--auth-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.profile-header {
  text-align: center;
  padding: 32px 0;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
}

.profile-name {
  font-size: 24px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 4px;
}

.profile-id {
  font-size: 14px;
  color: var(--auth-text-muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 16px;
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: var(--auth-bg);
  border-radius: 12px;
  text-decoration: none;
}

.stat-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--auth-text-muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--auth-text);
}

.profile-list {
  background: var(--auth-card-bg);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--auth-shadow);
}

.list-item {
  display: flex;
  align-items: center;
  padding: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--auth-border);
  transition: background 0.2s;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: var(--auth-bg);
}

.list-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.list-label {
  flex: 1;
  font-size: 15px;
  color: var(--auth-text);
}

.profile-actions {
  padding: 16px;
}

.action-btn {
  width: 100%;
  padding: 14px;
  background: var(--auth-bg);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  color: var(--auth-error);
  cursor: pointer;
  transition: background 0.2s;
}

.action-btn:hover {
  background: #FEE2E2;
}

.history-list {
  padding: 16px;
}

.history-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--auth-card-bg);
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: var(--auth-shadow);
  text-decoration: none;
  transition: transform 0.2s;
}

.history-item:hover {
  transform: translateX(4px);
}

.history-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 16px;
  background: var(--auth-bg);
}

.history-info {
  flex: 1;
}

.history-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--auth-text);
  margin-bottom: 4px;
}

.history-date {
  font-size: 12px;
  color: var(--auth-text-muted);
}

.history-arrow {
  color: var(--auth-text-muted);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  color: var(--auth-text-muted);
  margin-bottom: 24px;
}

@media (max-width: 480px) {
  .auth-card,
  .vip-card {
    padding: 24px;
    border-radius: 20px;
  }

  .auth-card h1,
  .vip-card h1 {
    font-size: 24px;
  }

  .vip-price .price {
    font-size: 36px;
  }

  .profile-stats {
    gap: 8px;
    padding: 0;
  }

  .stat-item {
    padding: 12px 8px;
  }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--auth-text);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  animation: fadeInUp 0.3s ease;
}

.toast.success {
  background: var(--auth-success);
}

.toast.error {
  background: var(--auth-error);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
