/* 用户系统相关样式 */

/* 用户状态栏 */
.user-status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }
  
  /* 右上角用户状态栏 */
  .user-status-bar-corner {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 100;
  }
  
  .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .user-status-bar-corner .user-info {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  
  .user-avatar {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
  }
  
  .user-nickname {
    font-weight: bold;
    color: #333;
    font-size: 16px;
  }
  
  .user-type {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
  }
  
  .user-type.registered {
    background: #e6f7ff;
    color: #1890ff;
  }
  
  .user-type.guest {
    background: #fff7e6;
    color: #fa8c16;
  }
  
  .auth-buttons {
    display: flex;
    gap: 10px;
  }
  
  .user-status-bar-corner .auth-buttons {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  
  /* 认证模态框样式 */
  .auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .auth-modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 420px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    position: relative;
  }
  
  .auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
  }
  
  .auth-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: #fafafa;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  .auth-tab:hover {
    background: #f0f0f0;
    color: #333;
  }
  
  .auth-tab.active {
    background: white;
    border-bottom-color: #1890ff;
    color: #1890ff;
  }
  
  .auth-form {
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .auth-form input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease;
  }
  
  .auth-form input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24,144,255,0.1);
  }
  
  .auth-form button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: none;
  }
  
  .auth-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  .close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
  }
  
  .close-modal:hover {
    background: #f5f5f5;
    color: #666;
  }
  
  /* 用户统计模态框 */
  .user-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
  }
  
  .stats-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  }
  
  .stats-content h3 {
    text-align: center;
    margin-bottom: 24px;
    color: #333;
    font-size: 20px;
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
  }
  
  .stat-item {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease;
  }
  
  .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #1890ff;
    margin-bottom: 4px;
  }
  
  .stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
  }
  
  /* 用户消息提示 */
  .user-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
  }
  
  .user-message.show {
    transform: translateX(0);
  }
  
  .user-message-success {
    background: linear-gradient(135deg, #52c41a, #73d13d);
  }
  
  .user-message-error {
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
  }
  
  .user-message-warning {
    background: linear-gradient(135deg, #faad14, #ffc53d);
  }
  
  .user-message-info {
    background: linear-gradient(135deg, #1890ff, #40a9ff);
  }
  
  /* 响应式设计 */
  @media (max-width: 768px) {
    .user-status-bar {
      margin: 15px 10px;
      padding: 12px;
    }
    
    .user-status-bar-corner {
      top: 10px;
      right: 10px;
    }
    
    .auth-modal-content {
      padding: 24px;
      margin: 20px;
    }
    
    .stats-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
    }
    
    .user-info {
      gap: 8px;
      padding: 6px 12px;
    }
    
    .user-nickname {
      font-size: 14px;
    }
    
    .user-avatar {
      width: 32px;
      height: 32px;
      font-size: 18px;
    }
    
    .user-status-bar-corner .user-info {
      gap: 6px;
      padding: 6px 10px;
    }
    
    .user-status-bar-corner .auth-buttons {
      padding: 6px;
    }
  }
  
  @media (max-width: 480px) {
    .auth-tabs {
      flex-direction: column;
    }
    
    .auth-tab {
      border-bottom: 1px solid #e8e8e8;
      border-right: none;
    }
    
    .stats-content {
      padding: 20px;
    }
    
    .stats-grid {
      grid-template-columns: 1fr 1fr;
    }
  }
  
  /* 动画效果 */
  @keyframes slideInRight {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  @keyframes slideOutRight {
    from {
      transform: translateX(0);
      opacity: 1;
    }
    to {
      transform: translateX(100%);
      opacity: 0;
    }
  }
  
  .user-message-enter {
    animation: slideInRight 0.3s ease-out;
  }
  
  .user-message-exit {
    animation: slideOutRight 0.3s ease-out;
  }
  
  /* 用户类型标识 */
  .user-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }
  
  .user-badge.registered {
    background: #e6f7ff;
    color: #1890ff;
  }
  
  .user-badge.guest {
    background: #fff7e6;
    color: #fa8c16;
  }
  
  .user-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
  }
  
  /* 加载状态 */
  .auth-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }